Interface GridFSUploadStream

  • All Superinterfaces:
    AsyncOutputStream

    @Deprecated
    public interface GridFSUploadStream
    extends AsyncOutputStream
    Deprecated.
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    A GridFS OutputStream for uploading data into GridFS

    Provides the id for the file to be uploaded as well as the write methods of a AsyncOutputStream

    Since:
    3.3
    • Method Detail

      • getObjectId

        ObjectId getObjectId()
        Deprecated.
        Gets the ObjectId for the file to be uploaded Throws a MongoGridFSException if the file id is not an ObjectId.
        Returns:
        the ObjectId for the file to be uploaded
      • getId

        BsonValue getId()
        Deprecated.
        The BsonValue id for this file.
        Returns:
        the id for this file
      • abort

        void abort​(SingleResultCallback<Void> callback)
        Deprecated.
        Aborts the upload and deletes any data.
        Parameters:
        callback - the callback that is triggered when the abort and cleanup has finished