Package io.vertx.mongo.client.gridfs
Class GridFSDownloadControlOptions
- java.lang.Object
-
- io.vertx.mongo.client.gridfs.GridFSDownloadControlOptions
-
public class GridFSDownloadControlOptions extends java.lang.Object
A GridFS Options for downloading data from GridFSProvides the
GridFSFile
for the file to being downloaded as well as a way to control the batchsize.- Since:
- 1.13
-
-
Constructor Summary
Constructors Constructor Description GridFSDownloadControlOptions()
GridFSDownloadControlOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getBufferSizeBytes()
GridFSDownloadControlOptions
setBufferSizeBytes(java.lang.Integer bufferSizeBytes)
The preferred number of bytes perByteBuffer
returned by thePublisher
.JsonObject
toJson()
-
-
-
Constructor Detail
-
GridFSDownloadControlOptions
public GridFSDownloadControlOptions()
-
GridFSDownloadControlOptions
public GridFSDownloadControlOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setBufferSizeBytes
public GridFSDownloadControlOptions setBufferSizeBytes(java.lang.Integer bufferSizeBytes)
The preferred number of bytes perByteBuffer
returned by thePublisher
.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.
- Parameters:
bufferSizeBytes
- the preferred buffer size in bytes to use perByteBuffer
in thePublisher
, defaults to chunk size.- Returns:
- this
-
getBufferSizeBytes
public java.lang.Integer getBufferSizeBytes()
-
-