public interface ConnectionAccessor
Function to operate within the scope of a
Connection. Callback functions operate on a provided connection and must not close the connection as the
connections may be pooled or be subject to other kinds of resource management.
Callback functions are responsible for creating a Publisher that defines the scope of how
long the allocated Connection is valid. Connections are released after the publisher terminates.| Modifier and Type | Method and Description |
|---|---|
<T> reactor.core.publisher.Mono<T> |
inConnection(Function<Connection,reactor.core.publisher.Mono<T>> action)
Execute a callback
Function within a Connection scope. |
<T> reactor.core.publisher.Flux<T> |
inConnectionMany(Function<Connection,reactor.core.publisher.Flux<T>> action)
Execute a callback
Function within a Connection scope. |
<T> reactor.core.publisher.Mono<T> inConnection(Function<Connection,reactor.core.publisher.Mono<T>> action) throws DataAccessException
Function within a Connection scope. The function is responsible for creating a
Mono. The connection is released after the Mono terminates (or the subscription is cancelled).
Connection resources must not be passed outside of the Function closure, otherwise resources may get
defunct.action - must not be null.Mono.DataAccessException<T> reactor.core.publisher.Flux<T> inConnectionMany(Function<Connection,reactor.core.publisher.Flux<T>> action) throws DataAccessException
Function within a Connection scope. The function is responsible for creating a
Flux. The connection is released after the Flux terminates (or the subscription is cancelled).
Connection resources must not be passed outside of the Function closure, otherwise resources may get
defunct.action - must not be null.Flux.DataAccessExceptionCopyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.