public interface TransactionResources
Supports one resource per key without overwriting, that is, a resource needs to be removed before a new one can be set for the same key.
Primarily used by ConnectionFactoryUtils
but can be also used by application code to register resources that
should be bound to a transaction.
Modifier and Type | Method and Description |
---|---|
static TransactionResources |
create()
Creates a new empty
TransactionResources . |
<T> T |
getResource(Class<T> key)
Retrieve a resource from this context identified by
key . |
<T> void |
registerResource(Class<T> key,
T value)
Register a resource in this context.
|
static TransactionResources create()
TransactionResources
.TransactionResources
.<T> T getResource(Class<T> key)
key
.key
- the resource key.Mono
or Mono.empty()
if the resource was not found.<T> void registerResource(Class<T> key, T value)
key
- the resource key.value
- can be a subclass of the key
type.IllegalStateException
- if a resource is already bound under key
.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.