Interface MongoReactorRepositoryOperations
- All Superinterfaces:
io.micronaut.core.convert.ConversionServiceProvider,MongoReactiveRepositoryOperations,ReactiveRepositoryOperations
- All Known Implementing Classes:
DefaultReactiveMongoRepositoryOperations
A variation of
MongoReactiveRepositoryOperations with Reactor specific method to execute an operation with the contextual ClientSession.-
Method Summary
Modifier and TypeMethodDescription<T> reactor.core.publisher.Mono<T>withClientSession(Function<com.mongodb.reactivestreams.client.ClientSession, reactor.core.publisher.Mono<T>> function) Starts a new session or reuses one from the context.<T> reactor.core.publisher.Flux<T>withClientSessionMany(Function<com.mongodb.reactivestreams.client.ClientSession, reactor.core.publisher.Flux<T>> function) Starts a new session or reuses one from the context.Methods inherited from interface io.micronaut.core.convert.ConversionServiceProvider
getConversionServiceMethods inherited from interface io.micronaut.data.operations.reactive.ReactiveRepositoryOperations
count, delete, deleteAll, execute, executeDelete, executeUpdate, exists, findAll, findAll, findOne, findOne, findOptional, findOptional, findPage, persist, persistAll, update, updateAll
-
Method Details
-
withClientSession
<T> reactor.core.publisher.Mono<T> withClientSession(Function<com.mongodb.reactivestreams.client.ClientSession, reactor.core.publisher.Mono<T>> function) Starts a new session or reuses one from the context.- Type Parameters:
T- The emitted type- Parameters:
function- The function- Returns:
- The processed publisher
-
withClientSessionMany
<T> reactor.core.publisher.Flux<T> withClientSessionMany(Function<com.mongodb.reactivestreams.client.ClientSession, reactor.core.publisher.Flux<T>> function) Starts a new session or reuses one from the context.- Type Parameters:
T- The emitted type- Parameters:
function- The function- Returns:
- The processed publisher
-