TResult
- The type of the result.public interface ChangeStreamPublisher<TResult> extends org.reactivestreams.Publisher<ChangeStreamDocument<TResult>>
Modifier and Type | Method and Description |
---|---|
ChangeStreamPublisher<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
ChangeStreamPublisher<TResult> |
collation(Collation collation)
Sets the collation options
|
org.reactivestreams.Publisher<ChangeStreamDocument<TResult>> |
first()
Helper to return a publisher limited to the first result.
|
ChangeStreamPublisher<TResult> |
fullDocument(FullDocument fullDocument)
Sets the fullDocument value.
|
ChangeStreamPublisher<TResult> |
maxAwaitTime(long maxAwaitTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum await execution time on the server for this operation.
|
ChangeStreamPublisher<TResult> |
resumeAfter(BsonDocument resumeToken)
Sets the logical starting point for the new change stream.
|
<TDocument> |
withDocumentClass(java.lang.Class<TDocument> clazz)
Returns a
MongoIterable containing the results of the change stream based on the document class provided. |
ChangeStreamPublisher<TResult> fullDocument(FullDocument fullDocument)
fullDocument
- the fullDocumentChangeStreamPublisher<TResult> resumeAfter(BsonDocument resumeToken)
resumeToken
- the resume tokenChangeStreamPublisher<TResult> maxAwaitTime(long maxAwaitTime, java.util.concurrent.TimeUnit timeUnit)
maxAwaitTime
- the max await time. A zero value will be ignored, and indicates that the driver should respect the server's
default valuetimeUnit
- the time unit, which may not be nullChangeStreamPublisher<TResult> collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use<TDocument> org.reactivestreams.Publisher<TDocument> withDocumentClass(java.lang.Class<TDocument> clazz)
MongoIterable
containing the results of the change stream based on the document class provided.TDocument
- the result typeclazz
- the class to use for the raw result.ChangeStreamPublisher<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 sizeorg.reactivestreams.Publisher<ChangeStreamDocument<TResult>> first()