Package com.mongodb.client
Interface ChangeStreamIterable<TResult>
- Type Parameters:
TResult
- The type of the result.
- All Superinterfaces:
Iterable<ChangeStreamDocument<TResult>>
,MongoIterable<ChangeStreamDocument<TResult>>
@Deprecated(since="2021-05-27")
public interface ChangeStreamIterable<TResult>
extends MongoIterable<ChangeStreamDocument<TResult>>
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Iterable for change streams.
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.
- Since:
- 3.6
-
Method Summary
Modifier and TypeMethodDescriptionbatchSize
(int batchSize) Deprecated.Sets the number of documents to return per batch.Deprecated.Sets the collation optionscursor()
Deprecated.Returns a cursor used for iterating over elements of typeChangeStreamDocument<TResult>
.fullDocument
(FullDocument fullDocument) Deprecated.Sets the fullDocument value.maxAwaitTime
(long maxAwaitTime, TimeUnit timeUnit) Deprecated.Sets the maximum await execution time on the server for this operation.resumeAfter
(BsonDocument resumeToken) Deprecated.Sets the logical starting point for the new change stream.startAfter
(BsonDocument startAfter) Deprecated.Similar toresumeAfter
, this option takes a resume token and starts a new change stream returning the first notification after the token.startAtOperationTime
(BsonTimestamp startAtOperationTime) Deprecated.The change stream will only provide changes that occurred at or after the specified timestamp.<TDocument>
MongoIterable<TDocument> withDocumentClass
(Class<TDocument> clazz) Deprecated.Returns aMongoIterable
containing the results of the change stream based on the document class provided.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
cursor
MongoChangeStreamCursor<ChangeStreamDocument<TResult>> cursor()Deprecated.Returns a cursor used for iterating over elements of typeChangeStreamDocument<TResult>
. The cursor has a covariant return type to additionally provide a method to access the resume token in change stream batches.- Specified by:
cursor
in interfaceMongoIterable<TResult>
- Returns:
- the change stream cursor
- Since:
- 3.11
-
fullDocument
Deprecated.Sets the fullDocument value.- Parameters:
fullDocument
- the fullDocument- Returns:
- this
-
resumeAfter
Deprecated.Sets the logical starting point for the new change stream.- Parameters:
resumeToken
- the resume token- Returns:
- this
-
batchSize
Deprecated.Sets the number of documents to return per batch.- Specified by:
batchSize
in interfaceMongoIterable<TResult>
- Parameters:
batchSize
- the batch size- Returns:
- this
-
maxAwaitTime
Deprecated.Sets the maximum await execution time on the server for this operation.- Parameters:
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 null- Returns:
- this
-
collation
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
-
withDocumentClass
Deprecated.Returns aMongoIterable
containing the results of the change stream based on the document class provided.- Type Parameters:
TDocument
- the result type- Parameters:
clazz
- the class to use for the raw result.- Returns:
- the new Mongo Iterable
-
startAtOperationTime
Deprecated.The change stream will only provide changes that occurred at or after the specified timestamp.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.
- Parameters:
startAtOperationTime
- the start at operation time- Returns:
- this
- Since:
- 3.8
-
startAfter
Deprecated.Similar toresumeAfter
, this option takes a resume token and starts a new change stream returning the first notification after the token.This will allow users to watch collections that have been dropped and recreated or newly renamed collections without missing any notifications.
Note: The server will report an error if both
startAfter
andresumeAfter
are specified.- Parameters:
startAfter
- the startAfter resumeToken- Returns:
- this
- Since:
- 3.11
-