Class TailableCursorRequest.TailableCursorRequestBuilder<T>
java.lang.Object
org.springframework.data.mongodb.core.messaging.TailableCursorRequest.TailableCursorRequestBuilder<T>
- Enclosing class:
- TailableCursorRequest<T>
Builder for creating
TailableCursorRequest
.- Since:
- 2.1
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
collection
(String collectionName) Set the name of theMongoCollection
to listen to.Set the filter to apply.publishTo
(MessageListener<org.bson.Document, ? super T> messageListener) Set theMessageListener
eventmessages
will be published to.
-
Method Details
-
collection
Set the name of theMongoCollection
to listen to.- Parameters:
collectionName
- must not be null nor empty.- Returns:
- this.
-
publishTo
public TailableCursorRequest.TailableCursorRequestBuilder<T> publishTo(MessageListener<org.bson.Document, ? super T> messageListener) Set theMessageListener
eventmessages
will be published to.- Parameters:
messageListener
- must not be null.- Returns:
- this.
-
filter
Set the filter to apply.- Parameters:
filter
- theQuery
to apply for filtering events. Must not be null.- Returns:
- this.
-
build
- Returns:
- the build
ChangeStreamRequest
.
-