@FunctionalInterface public interface ReactiveSessionCallback<T>
ClientSession using
reactive infrastructure.ClientSession| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<T> |
doInSession(ReactiveMongoOperations operations)
Execute operations against a MongoDB instance via session bound
ReactiveMongoOperations. |
org.reactivestreams.Publisher<T> doInSession(ReactiveMongoOperations operations)
ReactiveMongoOperations. The session is
inferred directly into the operation so that no further interaction is necessary.
Please note that only Spring Data-specific abstractions like ReactiveMongoOperations.find(Query, Class) and
others are enhanced with the ClientSession. When obtaining plain MongoDB gateway
objects like MongoCollection or
MongoDatabase via eg.
ReactiveMongoOperations.getCollection(String) we leave responsibility for
ClientSession again up to the caller.operations - will never be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.