public interface GridFSFindIterable extends MongoIterable<GridFSFile>
Modifier and Type | Method and Description |
---|---|
GridFSFindIterable |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
GridFSFindIterable |
collation(Collation collation)
Sets the collation options
|
GridFSFindIterable |
filter(Bson filter)
Sets the query filter to apply to the query.
|
GridFSFindIterable |
limit(int limit)
Sets the limit to apply.
|
GridFSFindIterable |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
GridFSFindIterable |
noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
GridFSFindIterable |
skip(int skip)
Sets the number of documents to skip.
|
GridFSFindIterable |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
GridFSFindIterable 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"));
GridFSFindIterable limit(int limit)
limit
- the limit, which may be nullGridFSFindIterable skip(int skip)
skip
- the number of documents to skipGridFSFindIterable sort(Bson sort)
sort
- the sort criteria, which may be null.GridFSFindIterable noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout
- true if cursor timeout is disabledGridFSFindIterable maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullGridFSFindIterable batchSize(int batchSize)
batchSize
in interface MongoIterable<GridFSFile>
batchSize
- the batch sizeGridFSFindIterable collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use