public interface GridFSFindObservable extends MongoObservable<com.mongodb.client.gridfs.model.GridFSFile>
Modifier and Type | Method and Description |
---|---|
GridFSFindObservable |
collation(com.mongodb.client.model.Collation collation)
Sets the collation options
|
GridFSFindObservable |
filter(org.bson.conversions.Bson filter)
Sets the query filter to apply to the query.
|
rx.Observable<com.mongodb.client.gridfs.model.GridFSFile> |
first()
Helper to return an observable limited first from the query.
|
GridFSFindObservable |
limit(int limit)
Sets the limit to apply.
|
GridFSFindObservable |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
GridFSFindObservable |
noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
GridFSFindObservable |
skip(int skip)
Sets the number of documents to skip.
|
GridFSFindObservable |
sort(org.bson.conversions.Bson sort)
Sets the sort criteria to apply to the query.
|
subscribe, toObservable
rx.Observable<com.mongodb.client.gridfs.model.GridFSFile> first()
GridFSFindObservable 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
GridFSFindObservable limit(int limit)
limit
- the limit, which may be nullGridFSFindObservable skip(int skip)
skip
- the number of documents to skipGridFSFindObservable sort(org.bson.conversions.Bson sort)
sort
- the sort criteria, which may be null.GridFSFindObservable noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout
- true if cursor timeout is disabledGridFSFindObservable maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullGridFSFindObservable collation(com.mongodb.client.model.Collation collation)
A null value represents the server default.
collation
- the collation options to use