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.
|
ChangeStreamIterable<TResult> |
startAtOperationTime(BsonTimestamp startAtOperationTime)
The change stream will only provide changes that occurred at or after the specified timestamp.
|
<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(@Nullable 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.ChangeStreamIterable<TResult> startAtOperationTime(BsonTimestamp startAtOperationTime)
Any command run against the server will return an operation time that can be used here.
The default value is an operation time obtained from the server before the change stream was created.
startAtOperationTime
- the start at operation timeCopyright © 2010 - 2020 Adobe. All Rights Reserved