public interface GridFSFindPublisher extends org.reactivestreams.Publisher<GridFSFile>
Modifier and Type | Method and Description |
---|---|
GridFSFindPublisher |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
GridFSFindPublisher |
collation(Collation collation)
Sets the collation options
|
GridFSFindPublisher |
filter(Bson filter)
Sets the query filter to apply to the query.
|
org.reactivestreams.Publisher<GridFSFile> |
first()
Helper to return a publisher limited first from the query.
|
GridFSFindPublisher |
limit(int limit)
Sets the limit to apply.
|
GridFSFindPublisher |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
GridFSFindPublisher |
noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
GridFSFindPublisher |
skip(int skip)
Sets the number of documents to skip.
|
GridFSFindPublisher |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
org.reactivestreams.Publisher<GridFSFile> first()
GridFSFindPublisher filter(Bson filter)
Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data:
Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));
GridFSFindPublisher limit(int limit)
limit
- the limit, which may be nullGridFSFindPublisher skip(int skip)
skip
- the number of documents to skipGridFSFindPublisher sort(Bson sort)
sort
- the sort criteria, which may be null.GridFSFindPublisher noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout
- true if cursor timeout is disabledGridFSFindPublisher maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullGridFSFindPublisher collation(Collation collation)
A null value represents the server default.
collation
- the collation options to useGridFSFindPublisher batchSize(int batchSize)
Overrides the Subscription.request(long)
value for setting the batch size, allowing for fine grained
control over the underlying cursor.
batchSize
- the batch size