T - The type of the result.public interface FindIterable<T> extends MongoIterable<T>
| Modifier and Type | Method and Description |
|---|---|
FindIterable<T> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
FindIterable<T> |
collation(Collation collation)
Sets the collation options
|
FindIterable<T> |
comment(String comment)
Sets the comment to the query.
|
FindIterable<T> |
cursorType(CursorType cursorType)
Sets the cursor type.
|
FindIterable<T> |
filter(Bson filter)
Sets the query filter to apply to the query.
|
FindIterable<T> |
hint(Bson hint)
Sets the hint for which index to use.
|
FindIterable<T> |
limit(int limit)
Sets the limit to apply.
|
FindIterable<T> |
max(Bson max)
Sets the exclusive upper bound for a specific index.
|
FindIterable<T> |
maxAwaitTime(long maxAwaitTime,
TimeUnit timeUnit)
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
query.
|
FindIterable<T> |
maxScan(long maxScan)
Sets the maximum number of documents or index keys to scan when executing the query.
|
FindIterable<T> |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
FindIterable<T> |
min(Bson min)
Sets the minimum inclusive lower bound for a specific index.
|
FindIterable<T> |
modifiers(Bson modifiers)
Deprecated.
use the individual setters instead
|
FindIterable<T> |
noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
FindIterable<T> |
oplogReplay(boolean oplogReplay)
Users should not set this under normal circumstances.
|
FindIterable<T> |
partial(boolean partial)
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
|
FindIterable<T> |
projection(Bson projection)
Sets a document describing the fields to return for all matching documents.
|
FindIterable<T> |
returnKey(boolean returnKey)
Sets the returnKey.
|
FindIterable<T> |
showRecordId(boolean showRecordId)
Sets the showRecordId.
|
FindIterable<T> |
skip(int skip)
Sets the number of documents to skip.
|
FindIterable<T> |
snapshot(boolean snapshot)
Sets the snapshot.
|
FindIterable<T> |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
batchCursor, first, forEach, into, mapFindIterable<T> filter(Bson filter)
filter - the filter, which may be null.FindIterable<T> limit(int limit)
limit - the limit, which may be nullFindIterable<T> skip(int skip)
skip - the number of documents to skipFindIterable<T> maxTime(long maxTime, TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullFindIterable<T> maxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)
maxAwaitTime - the max await timetimeUnit - the time unit to return the result in@Deprecated FindIterable<T> modifiers(Bson modifiers)
modifiers - the query modifiers to apply, which may be null.FindIterable<T> projection(Bson projection)
projection - the project document, which may be null.FindIterable<T> sort(Bson sort)
sort - the sort criteria, which may be null.FindIterable<T> noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout - true if cursor timeout is disabledFindIterable<T> oplogReplay(boolean oplogReplay)
oplogReplay - if oplog replay is enabledFindIterable<T> partial(boolean partial)
partial - if partial results for sharded clusters is enabledFindIterable<T> cursorType(CursorType cursorType)
cursorType - the cursor typeFindIterable<T> batchSize(int batchSize)
batchSize in interface MongoIterable<T>batchSize - the batch sizeFindIterable<T> collation(Collation collation)
A null value represents the server default.
collation - the collation options to useFindIterable<T> comment(String comment)
comment - the commentFindIterable<T> hint(Bson hint)
hint - the hintFindIterable<T> max(Bson max)
max - the maxFindIterable<T> min(Bson min)
min - the minFindIterable<T> maxScan(long maxScan)
maxScan - the maxScanFindIterable<T> returnKey(boolean returnKey)
returnKey - the returnKeyFindIterable<T> showRecordId(boolean showRecordId)
$recordId to the returned documents.showRecordId - the showRecordIdFindIterable<T> snapshot(boolean snapshot)
snapshot - the snapshot