TResult
- The type of the result.public interface FindPublisher<TResult>
extends org.reactivestreams.Publisher<TResult>
Modifier and Type | Method and Description |
---|---|
FindPublisher<TResult> |
cursorType(com.mongodb.CursorType cursorType)
Sets the cursor type.
|
FindPublisher<TResult> |
filter(org.bson.conversions.Bson filter)
Sets the query filter to apply to the query.
|
org.reactivestreams.Publisher<TResult> |
first()
Helper to return a publisher limited first from the query.
|
FindPublisher<TResult> |
limit(int limit)
Sets the limit to apply.
|
FindPublisher<TResult> |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
FindPublisher<TResult> |
modifiers(org.bson.conversions.Bson modifiers)
Sets the query modifiers to apply to this operation.
|
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(org.bson.conversions.Bson projection)
Sets a document describing the fields to return for all matching documents.
|
FindPublisher<TResult> |
skip(int skip)
Sets the number of documents to skip.
|
FindPublisher<TResult> |
sort(org.bson.conversions.Bson sort)
Sets the sort criteria to apply to the query.
|
org.reactivestreams.Publisher<TResult> first()
FindPublisher<TResult> filter(org.bson.conversions.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, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullFindPublisher<TResult> modifiers(org.bson.conversions.Bson modifiers)
modifiers
- the query modifiers to apply, which may be null.FindPublisher<TResult> projection(org.bson.conversions.Bson projection)
projection
- the project document, which may be null.FindPublisher<TResult> sort(org.bson.conversions.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(com.mongodb.CursorType cursorType)
cursorType
- the cursor type