Package io.quarkus.mongodb
Class ChangeStreamOptions
java.lang.Object
io.quarkus.mongodb.ChangeStreamOptions
Configures the Change Stream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> com.mongodb.reactivestreams.client.ChangeStreamPublisher<T>
apply
(com.mongodb.reactivestreams.client.ChangeStreamPublisher<T> stream) collation
(com.mongodb.client.model.Collation collation) Sets the collation optionsfullDocument
(com.mongodb.client.model.changestream.FullDocument fullDocument) Sets the fullDocument value.fullDocumentBeforeChange
(com.mongodb.client.model.changestream.FullDocumentBeforeChange fullDocumentBeforeChange) Sets the fullDocumentBeforeChange value.maxAwaitTime
(long maxAwaitTime, TimeUnit timeUnit) Sets the maximum await execution time on the server for this operation.resumeAfter
(org.bson.BsonDocument resumeToken) Sets the logical starting point for the new change stream.startAfter
(org.bson.BsonDocument resumeToken) Sets the logical starting point for the new change stream.startAtOperationTime
(org.bson.BsonTimestamp startAtOperationTime) The change stream will only provide changes that occurred after the specified timestamp.
-
Constructor Details
-
ChangeStreamOptions
public ChangeStreamOptions()
-
-
Method Details
-
fullDocument
public ChangeStreamOptions fullDocument(com.mongodb.client.model.changestream.FullDocument fullDocument) Sets the fullDocument value.- Parameters:
fullDocument
- the fullDocument- Returns:
- this
-
fullDocumentBeforeChange
public ChangeStreamOptions fullDocumentBeforeChange(com.mongodb.client.model.changestream.FullDocumentBeforeChange fullDocumentBeforeChange) Sets the fullDocumentBeforeChange value.- Parameters:
fullDocumentBeforeChange
- the fullDocumentBeforeChange- Returns:
- this
-
resumeAfter
Sets the logical starting point for the new change stream.- Parameters:
resumeToken
- the resume token- Returns:
- this
-
startAfter
Sets the logical starting point for the new change stream. Unlike resumeAfter, startAfter can resume notifications after an invalidate event by creating a new change stream.- Parameters:
resumeToken
- the resume token- Returns:
- this
-
startAtOperationTime
The change stream will only provide changes that occurred 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.
-
maxAwaitTime
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
Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
-
apply
public <T> com.mongodb.reactivestreams.client.ChangeStreamPublisher<T> apply(com.mongodb.reactivestreams.client.ChangeStreamPublisher<T> stream)
-