Class ChangeStreamRequest.ChangeStreamRequestOptions
java.lang.Object
org.springframework.data.mongodb.core.messaging.ChangeStreamRequest.ChangeStreamRequestOptions
- All Implemented Interfaces:
SubscriptionRequest.RequestOptions
- Enclosing class:
- ChangeStreamRequest<T>
public static class ChangeStreamRequest.ChangeStreamRequestOptions
extends Object
implements SubscriptionRequest.RequestOptions
SubscriptionRequest.RequestOptions
implementation specific to a ChangeStreamRequest
.- Since:
- 2.1
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorDescriptionChangeStreamRequestOptions
(String databaseName, String collectionName, Duration maxAwaitTime, ChangeStreamOptions options) Create newChangeStreamRequest.ChangeStreamRequestOptions
.ChangeStreamRequestOptions
(String databaseName, String collectionName, ChangeStreamOptions options) Create newChangeStreamRequest.ChangeStreamRequestOptions
. -
Method Summary
Modifier and TypeMethodDescriptionGet theChangeStreamOptions
defined.Get the collection name.Get the database name of the db.Get the maximum wait time (the time till the next Document is emitted) to apply when reading from the collection.of
(SubscriptionRequest.RequestOptions options)
-
Constructor Details
-
ChangeStreamRequestOptions
public ChangeStreamRequestOptions(@Nullable String databaseName, @Nullable String collectionName, ChangeStreamOptions options) Create newChangeStreamRequest.ChangeStreamRequestOptions
.- Parameters:
databaseName
- can be null.collectionName
- can be null.options
- must not be null.
-
ChangeStreamRequestOptions
public ChangeStreamRequestOptions(@Nullable String databaseName, @Nullable String collectionName, @Nullable Duration maxAwaitTime, ChangeStreamOptions options) Create newChangeStreamRequest.ChangeStreamRequestOptions
.- Parameters:
databaseName
- can be null.collectionName
- can be null.maxAwaitTime
- can be null.options
- must not be null.- Since:
- 3.0
-
-
Method Details
-
of
public static ChangeStreamRequest.ChangeStreamRequestOptions of(SubscriptionRequest.RequestOptions options) -
getChangeStreamOptions
Get theChangeStreamOptions
defined.- Returns:
- never null.
-
getCollectionName
Description copied from interface:SubscriptionRequest.RequestOptions
Get the collection name.- Specified by:
getCollectionName
in interfaceSubscriptionRequest.RequestOptions
- Returns:
- the name of the collection to subscribe to. Can be null.
-
getDatabaseName
Description copied from interface:SubscriptionRequest.RequestOptions
Get the database name of the db.- Specified by:
getDatabaseName
in interfaceSubscriptionRequest.RequestOptions
- Returns:
- the name of the database to subscribe to. Can be null in which case the default
database
is used.
-
maxAwaitTime
Description copied from interface:SubscriptionRequest.RequestOptions
Get the maximum wait time (the time till the next Document is emitted) to apply when reading from the collection.- Specified by:
maxAwaitTime
in interfaceSubscriptionRequest.RequestOptions
- Returns:
- never null.
Duration.ZERO
by default.
-