Interface ReactiveChangeStreamOperation
- All Known Subinterfaces:
ReactiveFluentMongoOperations
,ReactiveMongoOperations
- All Known Implementing Classes:
ReactiveMongoTemplate
public interface ReactiveChangeStreamOperation
ReactiveChangeStreamOperation
allows creation and execution of reactive MongoDB
Change Stream operations in a fluent API style. The starting domainType is used for mapping a potentially given
TypedAggregation
used for filtering. By default, the
originating domainType is also used for mapping back the result from the Document
.
However, it is possible to define an different returnType via as
.The collection to operate on is optional in which case call collection with the actual database are watched, use watchCollection to define a fixed collection.
changeStream(Jedi.class)
.watchCollection("star-wars")
.filter(where("operationType").is("insert"))
.resumeAt(Instant.now())
.listen();
- Since:
- 2.2
- Author:
- Christoph Strobl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Collection override (optional).static interface
Provide a filter for limiting results (optional).static interface
Provide some options.static interface
ReactiveChangeStreamOperation.ReactiveChangeStream
provides methods for constructing change stream operations in a fluent way.static interface
Resume a change stream.static interface
Compose change stream execution by calling one of the terminating methods. -
Method Summary
Modifier and TypeMethodDescriptionchangeStream
(Class<T> domainType) Start creating a change stream operation for the given domainType watching all collections within the database.
-
Method Details
-
changeStream
Start creating a change stream operation for the given domainType watching all collections within the database.
Consider limiting events be defining acollection
and/orfilter
.- Parameters:
domainType
- must not be null. UseDocument
to obtain raw elements.- Returns:
- new instance of
ReactiveChangeStreamOperation.ReactiveChangeStream
. Never null. - Throws:
IllegalArgumentException
- if domainType is null.
-