TResult
- The type of the result.public interface ChangeStreamIterable<TResult> extends MongoIterable<ChangeStreamDocument<TResult>>
Note: the ChangeStreamDocument
class will not be applicable for all change stream outputs. If using custom pipelines that
radically change the result, then the withDocumentClass(Class)
method can be used to provide an alternative document format.
Modifier and Type | Method and Description |
---|---|
ChangeStreamIterable<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
ChangeStreamIterable<TResult> |
collation(Collation collation)
Sets the collation options
|
ChangeStreamIterable<TResult> |
fullDocument(FullDocument fullDocument)
Sets the fullDocument value.
|
ChangeStreamIterable<TResult> |
maxAwaitTime(long maxAwaitTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum await execution time on the server for this operation.
|
ChangeStreamIterable<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. |
ChangeStreamIterable<TResult> fullDocument(FullDocument fullDocument)
fullDocument
- the fullDocumentChangeStreamIterable<TResult> resumeAfter(BsonDocument resumeToken)
resumeToken
- the resume tokenChangeStreamIterable<TResult> batchSize(int batchSize)
batchSize
in interface MongoIterable<ChangeStreamDocument<TResult>>
batchSize
- the batch sizeChangeStreamIterable<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 nullChangeStreamIterable<TResult> collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use<TDocument> MongoIterable<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.