Module spring.data.mongodb
Interface ReactiveChangeStreamOperation.ChangeStreamWithCollection<T>
- All Known Subinterfaces:
ReactiveChangeStreamOperation.ReactiveChangeStream<T>
- Enclosing interface:
- ReactiveChangeStreamOperation
public static interface ReactiveChangeStreamOperation.ChangeStreamWithCollection<T>
Collection override (optional).
-
Method Summary
Modifier and TypeMethodDescriptionwatchCollection(Class<?> entityClass) Set the the collection to watch.watchCollection(String collection) Explicitly set the name of the collection to watch.
Skip this step to watch all collections within the database.
-
Method Details
-
watchCollection
ReactiveChangeStreamOperation.ChangeStreamWithFilterAndProjection<T> watchCollection(String collection) Explicitly set the name of the collection to watch.
Skip this step to watch all collections within the database.- Parameters:
collection- must not be null nor empty.- Returns:
- new instance of
ReactiveChangeStreamOperation.ChangeStreamWithFilterAndProjection. - Throws:
IllegalArgumentException- ifcollectionis null.
-
watchCollection
ReactiveChangeStreamOperation.ChangeStreamWithFilterAndProjection<T> watchCollection(Class<?> entityClass) Set the the collection to watch. Collection name is derived from theentityClass.
Skip this step to watch all collections within the database.- Parameters:
entityClass- must not be null.- Returns:
- new instance of
ReactiveChangeStreamOperation.ChangeStreamWithFilterAndProjection. - Throws:
IllegalArgumentException- ifentityClassis null.
-