Class TransactionConfigurationBuilder
- java.lang.Object
-
- org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
-
- org.infinispan.client.hotrod.configuration.TransactionConfigurationBuilder
-
- All Implemented Interfaces:
ConfigurationChildBuilder
,Builder<TransactionConfiguration>
public class TransactionConfigurationBuilder extends AbstractConfigurationChildBuilder implements Builder<TransactionConfiguration>
Configures a transactionalRemoteCache
.- Since:
- 9.3
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_TIMEOUT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionConfiguration
create()
Create the configuration beanstatic org.infinispan.commons.tx.lookup.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(org.infinispan.commons.tx.lookup.TransactionManagerLookup transactionManagerLookup)
TheTransactionManagerLookup
to lookup for theTransactionManager
to interact with.TransactionConfigurationBuilder
transactionMode(TransactionMode transactionMode)
TheTransactionMode
in which aRemoteCache
will be enlisted.void
validate()
Validate the data in this builder before building the configuration bean-
Methods inherited from class org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
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, valueSizeEstimate, version, withProperties
-
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
defaultTransactionManagerLookup
public static org.infinispan.commons.tx.lookup.TransactionManagerLookup defaultTransactionManagerLookup()
-
transactionManagerLookup
public TransactionConfigurationBuilder transactionManagerLookup(org.infinispan.commons.tx.lookup.TransactionManagerLookup transactionManagerLookup)
TheTransactionManagerLookup
to lookup for theTransactionManager
to interact with.
-
transactionMode
public TransactionConfigurationBuilder transactionMode(TransactionMode transactionMode)
TheTransactionMode
in which aRemoteCache
will be enlisted.
-
timeout
public TransactionConfigurationBuilder timeout(long timeout, TimeUnit timeUnit)
Sets the transaction's timeout.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
) orXAResource
without recovery enabled (TransactionMode.NON_DURABLE_XA
).For
XAResource
, this value is overwritten byXAResource.setTransactionTimeout(int)
.It defaults to 1 minute.
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<TransactionConfiguration>
-
create
public TransactionConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<TransactionConfiguration>
- Returns:
-
read
public Builder<?> read(TransactionConfiguration template)
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<TransactionConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
-