public interface GridFSDownloadPublisher extends org.reactivestreams.Publisher<ByteBuffer>
Provides the GridFSFile for the file to being downloaded as well as a way to control the batchsize.
| Modifier and Type | Method and Description |
|---|---|
GridFSDownloadPublisher |
bufferSizeBytes(int bufferSizeBytes)
The preferred number of bytes per
ByteBuffer returned by the Publisher. |
org.reactivestreams.Publisher<com.mongodb.client.gridfs.model.GridFSFile> |
getGridFSFile()
Gets the corresponding
GridFSFile for the file being downloaded |
org.reactivestreams.Publisher<com.mongodb.client.gridfs.model.GridFSFile> getGridFSFile()
GridFSFile for the file being downloadedGridFSDownloadPublisher bufferSizeBytes(int bufferSizeBytes)
ByteBuffer returned by the Publisher.
Allows for larger than chunk size ByteBuffers. The actual chunk size of the data stored in MongoDB is the smallest allowable
ByteBuffer size.
Can be used to control the memory consumption of this Publisher. The smaller the bufferSizeBytes the lower the memory
consumption and higher latency.
Note: Must be set before the Publisher is subscribed to.
bufferSizeBytes - the preferred buffer size in bytes to use per ByteBuffer in the Publisher, defaults to chunk
size.