public class TransactionConfigurationBuilder extends AbstractConfigurationChildBuilder implements Builder<TransactionConfiguration>
RemoteCache
.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TIMEOUT |
Modifier and Type | Method and Description |
---|---|
TransactionConfiguration |
create()
Create the configuration bean
|
static TransactionManagerLookup |
defaultTransactionManagerLookup() |
Builder<?> |
read(TransactionConfiguration template)
Reads the configuration from an already created configuration bean into this builder.
|
TransactionConfigurationBuilder |
timeout(long timeout,
TimeUnit timeUnit)
Sets the transaction's timeout.
|
TransactionConfigurationBuilder |
transactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
The
TransactionManagerLookup to lookup for the TransactionManager to interact with. |
TransactionConfigurationBuilder |
transactionMode(TransactionMode transactionMode)
The
TransactionMode in which a RemoteCache will be enlisted. |
void |
validate()
Validate the data in this builder before building the configuration bean
|
addCluster, addContextInitializer, addContextInitializer, addContextInitializers, addJavaSerialWhiteList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, classLoader, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, forceReturnValues, keySizeEstimate, marshaller, marshaller, marshaller, maxRetries, protocolVersion, remoteCache, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transaction, uri, uri, valueSizeEstimate, version, withProperties
public static final long DEFAULT_TIMEOUT
public static TransactionManagerLookup defaultTransactionManagerLookup()
public TransactionConfigurationBuilder transactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
TransactionManagerLookup
to lookup for the TransactionManager
to interact with.public TransactionConfigurationBuilder transactionMode(TransactionMode transactionMode)
TransactionMode
in which a RemoteCache
will be enlisted.public TransactionConfigurationBuilder timeout(long timeout, TimeUnit timeUnit)
This timeout is used by the server to rollback unrecoverable transaction when they are idle for this amount of time.
An unrecoverable transaction are transaction enlisted as Synchronization
(TransactionMode.NON_XA
)
or XAResource
without recovery enabled (TransactionMode.NON_DURABLE_XA
).
For XAResource
, this value is overwritten by XAResource.setTransactionTimeout(int)
.
It defaults to 1 minute.
public void validate()
Builder
validate
in interface Builder<TransactionConfiguration>
public TransactionConfiguration create()
Builder
create
in interface Builder<TransactionConfiguration>
public Builder<?> read(TransactionConfiguration template)
Builder
read
in interface Builder<TransactionConfiguration>
template
- the configuration from which to "clone" this config if needed.Copyright © 2021 JBoss by Red Hat. All rights reserved.