public class TransactionSettings extends Object
| Constructor and Description |
|---|
TransactionSettings()
Create a configuration object where all settings use the default
values configured on the server.
|
TransactionSettings(TransactionSettings other)
Copy another settings object.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getDistributedTransactionTimeout()
Retrieves the transaction timeout
(see
withDistributedTransactionTimeout(Integer)). |
Integer |
getTransactionLatencyCount()
Retrieve the latency count (
withTransactionLatencyCount(Integer). |
<T> T |
visitDurability(DurabilityVisitor<T> visitor)
Retrieves the durability level (see
withDurability(Integer)). |
TransactionSettings |
withDistributedTransactionTimeout(Integer distributedTransactionTimeout)
Sets the distributed transaction timeout.
|
TransactionSettings |
withDurability(DurabilityLevel durability)
Sets the durability level (see
withDurability(Integer)) to a symbolic value. |
TransactionSettings |
withDurability(Integer durability)
Sets the durability level to a given number of instances.
|
TransactionSettings |
withTransactionLatencyCount(Integer transactionLatencyCount)
Sets the distributed transaction latency count.
|
public TransactionSettings()
public TransactionSettings(TransactionSettings other)
other - Object to be cloned.public <T> T visitDurability(DurabilityVisitor<T> visitor)
withDurability(Integer)).
This goes through a visitor interface since durability can be either
an integer or a symbolic DurabilityLevel.T - Type of values returned by the visitor.visitor - Object that will consume the durability value.public Integer getDistributedTransactionTimeout()
withDistributedTransactionTimeout(Integer)).null, meaning "use the default
value configured on the server".public Integer getTransactionLatencyCount()
withTransactionLatencyCount(Integer).null, meaning "use the default
value configured on the server".public TransactionSettings withDurability(Integer durability)
durability - Number of instances or null, meaning "use the default
value configured on the server".public TransactionSettings withDurability(DurabilityLevel durability)
withDurability(Integer)) to a symbolic value.durability - Durability level name or null, meaning "use the default
value configured on the server".public TransactionSettings withDistributedTransactionTimeout(Integer distributedTransactionTimeout)
distributedTransactionTimeout - Timeout in seconds or null.
null means 'use server config').public TransactionSettings withTransactionLatencyCount(Integer transactionLatencyCount)
withDistributedTransactionTimeout(Integer)) then commit will return
with the system still working on making that transaction durable.
If the latency count is 4 then even if the last four commits are not
yet durable it is possible to do one more commit. But if there are
five pending transactions then any attempt to commit will result in
an error.
Another example: If you set the latency count to zero then
each commit must be durable before the next commit can be done.transactionLatencyCount - number of commits or null (use server default).Copyright © 2017 Franz Inc.. All rights reserved.