TResult
- The type of the result.public interface FindPublisher<TResult>
extends org.reactivestreams.Publisher<TResult>
Modifier and Type | Method and Description |
---|---|
FindPublisher<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
FindPublisher<TResult> |
collation(Collation collation)
Sets the collation options
|
FindPublisher<TResult> |
comment(java.lang.String comment)
Sets the comment to the query.
|
FindPublisher<TResult> |
cursorType(CursorType cursorType)
Sets the cursor type.
|
FindPublisher<TResult> |
filter(Bson filter)
Sets the query filter to apply to the query.
|
org.reactivestreams.Publisher<TResult> |
first()
Helper to return a publisher limited to the first result.
|
FindPublisher<TResult> |
hint(Bson hint)
Sets the hint for which index to use.
|
FindPublisher<TResult> |
limit(int limit)
Sets the limit to apply.
|
FindPublisher<TResult> |
max(Bson max)
Sets the exclusive upper bound for a specific index.
|
FindPublisher<TResult> |
maxAwaitTime(long maxAwaitTime,
java.util.concurrent.TimeUnit timeUnit)
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
query.
|
FindPublisher<TResult> |
maxScan(long maxScan)
Sets the maximum number of documents or index keys to scan when executing the query.
|
FindPublisher<TResult> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
FindPublisher<TResult> |
min(Bson min)
Sets the minimum inclusive lower bound for a specific index.
|
FindPublisher<TResult> |
modifiers(Bson modifiers)
Deprecated.
use the individual setters instead
|
FindPublisher<TResult> |
noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
FindPublisher<TResult> |
oplogReplay(boolean oplogReplay)
Users should not set this under normal circumstances.
|
FindPublisher<TResult> |
partial(boolean partial)
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
|
FindPublisher<TResult> |
projection(Bson projection)
Sets a document describing the fields to return for all matching documents.
|
FindPublisher<TResult> |
returnKey(boolean returnKey)
Sets the returnKey.
|
FindPublisher<TResult> |
showRecordId(boolean showRecordId)
Sets the showRecordId.
|
FindPublisher<TResult> |
skip(int skip)
Sets the number of documents to skip.
|
FindPublisher<TResult> |
snapshot(boolean snapshot)
Sets the snapshot.
|
FindPublisher<TResult> |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
org.reactivestreams.Publisher<TResult> first()
FindPublisher<TResult> filter(Bson filter)
filter
- the filter, which may be null.FindPublisher<TResult> limit(int limit)
limit
- the limit, which may be nullFindPublisher<TResult> skip(int skip)
skip
- the number of documents to skipFindPublisher<TResult> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullFindPublisher<TResult> maxAwaitTime(long maxAwaitTime, java.util.concurrent.TimeUnit timeUnit)
maxAwaitTime
- the max await timetimeUnit
- the time unit to return the result in@Deprecated FindPublisher<TResult> modifiers(Bson modifiers)
modifiers
- the query modifiers to apply, which may be null.FindPublisher<TResult> projection(Bson projection)
projection
- the project document, which may be null.FindPublisher<TResult> sort(Bson sort)
sort
- the sort criteria, which may be null.FindPublisher<TResult> noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout
- true if cursor timeout is disabledFindPublisher<TResult> oplogReplay(boolean oplogReplay)
oplogReplay
- if oplog replay is enabledFindPublisher<TResult> partial(boolean partial)
partial
- if partial results for sharded clusters is enabledFindPublisher<TResult> cursorType(CursorType cursorType)
cursorType
- the cursor typeFindPublisher<TResult> collation(Collation collation)
A null value represents the server default.
collation
- the collation options to useFindPublisher<TResult> comment(java.lang.String comment)
comment
- the commentFindPublisher<TResult> hint(Bson hint)
hint
- the hintFindPublisher<TResult> max(Bson max)
max
- the maxFindPublisher<TResult> min(Bson min)
min
- the minFindPublisher<TResult> maxScan(long maxScan)
maxScan
- the maxScanFindPublisher<TResult> returnKey(boolean returnKey)
returnKey
- the returnKeyFindPublisher<TResult> showRecordId(boolean showRecordId)
$recordId
to the returned documents.showRecordId
- the showRecordIdFindPublisher<TResult> snapshot(boolean snapshot)
snapshot
- the snapshotFindPublisher<TResult> 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