Package io.quarkus.mongodb
Class ChangeStreamOptions
- java.lang.Object
-
- io.quarkus.mongodb.ChangeStreamOptions
-
public class ChangeStreamOptions extends Object
Configures the Change Stream
-
-
Constructor Summary
Constructors Constructor Description ChangeStreamOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> com.mongodb.reactivestreams.client.ChangeStreamPublisher<T>
apply(com.mongodb.reactivestreams.client.ChangeStreamPublisher<T> stream)
ChangeStreamOptions
collation(com.mongodb.client.model.Collation collation)
Sets the collation optionsChangeStreamOptions
fullDocument(com.mongodb.client.model.changestream.FullDocument fullDocument)
Sets the fullDocument value.ChangeStreamOptions
maxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)
Sets the maximum await execution time on the server for this operation.ChangeStreamOptions
resumeAfter(org.bson.BsonDocument resumeToken)
Sets the logical starting point for the new change stream.ChangeStreamOptions
startAtOperationTime(org.bson.BsonTimestamp startAtOperationTime)
The change stream will only provide changes that occurred after the specified timestamp.
-
-
-
Method Detail
-
fullDocument
public ChangeStreamOptions fullDocument(com.mongodb.client.model.changestream.FullDocument fullDocument)
Sets the fullDocument value.- Parameters:
fullDocument
- the fullDocument- Returns:
- this
-
resumeAfter
public ChangeStreamOptions resumeAfter(org.bson.BsonDocument resumeToken)
Sets the logical starting point for the new change stream.- Parameters:
resumeToken
- the resume token- Returns:
- this
-
startAtOperationTime
public ChangeStreamOptions startAtOperationTime(org.bson.BsonTimestamp 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
public ChangeStreamOptions maxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)
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
public ChangeStreamOptions collation(com.mongodb.client.model.Collation 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)
-
-