Interface SubscriptionRequest.RequestOptions
- All Known Implementing Classes:
ChangeStreamRequest.ChangeStreamRequestOptions, TailableCursorRequest.TailableCursorRequestOptions
- Enclosing interface:
SubscriptionRequest<S, T, O extends SubscriptionRequest.RequestOptions>
public static interface SubscriptionRequest.RequestOptions
Options for specifying the behaviour of the
SubscriptionRequest.- Since:
- 2.1
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionGet the collection name.Get the database name of the db.justCollection(String collection) Create options with the provided collection.justDatabase(String database) Create options with the provided database.default DurationGet the maximum wait time (the time till the next Document is emitted) to apply when reading from the collection.none()Create empty options.Create options with the provided database and collection.
-
Method Details
-
getDatabaseName
-
getCollectionName
-
maxAwaitTime
Get the maximum wait time (the time till the next Document is emitted) to apply when reading from the collection.- Returns:
- never null.
Duration.ZEROby default. - Since:
- 3.0
-
none
Create empty options.- Returns:
- new instance of empty
SubscriptionRequest.RequestOptions.
-
justDatabase
Create options with the provided database.- Parameters:
database- must not be null.- Returns:
- new instance of empty
SubscriptionRequest.RequestOptions.
-
justCollection
Create options with the provided collection.- Parameters:
collection- must not be null.- Returns:
- new instance of empty
SubscriptionRequest.RequestOptions.
-
of
Create options with the provided database and collection.- Parameters:
database- must not be null.collection- must not be null.- Returns:
- new instance of empty
SubscriptionRequest.RequestOptions.
-