public interface GridFSFindPublisher
extends org.reactivestreams.Publisher<com.mongodb.client.gridfs.model.GridFSFile>
Modifier and Type | Method and Description |
---|---|
GridFSFindPublisher |
collation(com.mongodb.client.model.Collation collation)
Sets the collation options
|
GridFSFindPublisher |
filter(org.bson.conversions.Bson filter)
Sets the query filter to apply to the query.
|
org.reactivestreams.Publisher<com.mongodb.client.gridfs.model.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,
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(org.bson.conversions.Bson sort)
Sets the sort criteria to apply to the query.
|
org.reactivestreams.Publisher<com.mongodb.client.gridfs.model.GridFSFile> first()
GridFSFindPublisher filter(org.bson.conversions.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"));
filter
- the filter, which may be null.Filters
GridFSFindPublisher limit(int limit)
limit
- the limit, which may be nullGridFSFindPublisher skip(int skip)
skip
- the number of documents to skipGridFSFindPublisher sort(org.bson.conversions.Bson sort)
sort
- the sort criteria, which may be null.GridFSFindPublisher noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout
- true if cursor timeout is disabledGridFSFindPublisher maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullGridFSFindPublisher collation(com.mongodb.client.model.Collation collation)
A null value represents the server default.
collation
- the collation options to use