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 Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void abort​(com.mongodb.async.SingleResultCallback<Void> callback)
      Deprecated.
      Aborts the upload and deletes any data.
      org.bson.BsonValue getId()
      Deprecated.
      The BsonValue id for this file.
      org.bson.types.ObjectId getObjectId()
      Deprecated.
      Gets the ObjectId for the file to be uploaded Throws a MongoGridFSException if the file id is not an ObjectId.
    • Method Detail

      • getObjectId

        org.bson.types.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

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

        void abort​(com.mongodb.async.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