| Modifier and Type | Class and Description |
|---|---|
| private static class | TransactionController.TransactionControllerStatistics
Holder for TransactionController statistics |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | |
| private final VicariousThreadLocal | |
| private volatile int | |
| private final LocalRecoveryManager | |
| private static final Logger | |
| private static final String | |
| private final TransactionController. | |
| private final TransactionIDFactory |
| Access | Constructor and Description |
|---|---|
| pack-priv | TransactionController(TransactionIDFactory
the TransactionIDFactory transactionIDFactory, int the default transaction timeout in seconds defaultTransactionTimeoutInSeconds)Create a TransactionController instance |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | begin(int
the timeout foe this transaction in seconds transactionTimeoutSeconds)Begin a new transaction with the specified timeout and bind its context to the current thread |
| public void | |
| public void | commit(boolean
true if the transaction should be committed no matter if it timed out or not ignoreTimeout)Commit the transaction bound to the current thread, ignoring if the transaction timed out |
| public LocalTransactionContext | Returns: the transaction context bond to the current thread or null if no transaction started on the current threadGet the transaction context bond to the current thread |
| public int | Returns: the default transaction timeoutGet the default transaction timeout in seconds |
| public LocalRecoveryManager | Returns: the local transactions recovery managerGet the local transactions recovery manager of this cache manager |
| public long | Returns: the committed transactions countGet the committed transactions count |
| public long | Returns: the rolled back transactions countGet the rolled back transactions count |
| public long | Returns: the timed out transactions countGet the timed out transactions count. |
| public void | |
| public void | setDefaultTransactionTimeout(int
the default transaction timeout defaultTransactionTimeoutSeconds)Set the default transaction timeout in seconds, it must be > 0 |
| public void |
| contextMap | back to summary |
|---|---|
| private final ConcurrentMap<TransactionID, LocalTransactionContext> contextMap | |
| currentTransactionIdThreadLocal | back to summary |
|---|---|
| private final VicariousThreadLocal<TransactionID> currentTransactionIdThreadLocal | |
| defaultTransactionTimeout | back to summary |
|---|---|
| private volatile int defaultTransactionTimeout | |
| localRecoveryManager | back to summary |
|---|---|
| private final LocalRecoveryManager localRecoveryManager | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MDC_KEY | back to summary |
|---|---|
| private static final String MDC_KEY | |
| statistics | back to summary |
|---|---|
| private final TransactionController. | |
| transactionIDFactory | back to summary |
|---|---|
| private final TransactionIDFactory transactionIDFactory | |
| TransactionController | back to summary |
|---|---|
| pack-priv TransactionController(TransactionIDFactory transactionIDFactory, int defaultTransactionTimeoutInSeconds) Create a TransactionController instance
| |
| begin | back to summary |
|---|---|
| public void begin() Begin a new transaction and bind its context to the current thread | |
| begin | back to summary |
|---|---|
| public void begin(int transactionTimeoutSeconds) Begin a new transaction with the specified timeout and bind its context to the current thread
| |
| commit | back to summary |
|---|---|
| public void commit() Commit the transaction bound to the current thread | |
| commit | back to summary |
|---|---|
| public void commit(boolean ignoreTimeout) Commit the transaction bound to the current thread, ignoring if the transaction timed out
| |
| getCurrentTransactionContext | back to summary |
|---|---|
| public LocalTransactionContext getCurrentTransactionContext() Get the transaction context bond to the current thread
| |
| getDefaultTransactionTimeout | back to summary |
|---|---|
| public int getDefaultTransactionTimeout() Get the default transaction timeout in seconds
| |
| getRecoveryManager | back to summary |
|---|---|
| public LocalRecoveryManager getRecoveryManager() Get the local transactions recovery manager of this cache manager
| |
| getTransactionCommittedCount | back to summary |
|---|---|
| public long getTransactionCommittedCount() Get the committed transactions count
| |
| getTransactionRolledBackCount | back to summary |
|---|---|
| public long getTransactionRolledBackCount() Get the rolled back transactions count
| |
| getTransactionTimedOutCount | back to summary |
|---|---|
| public long getTransactionTimedOutCount() Get the timed out transactions count. Note that only transactions which failed to commit due to a timeout are taken into account
| |
| rollback | back to summary |
|---|---|
| public void rollback() Rollback the transaction bound to the current thread | |
| setDefaultTransactionTimeout | back to summary |
|---|---|
| public void setDefaultTransactionTimeout(int defaultTransactionTimeoutSeconds) Set the default transaction timeout in seconds, it must be > 0
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() Mark the transaction bound to the current thread for rollback only | |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicLong | |
| private final AtomicLong | |
| private final AtomicLong |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| committed | back to summary |
|---|---|
| private final AtomicLong committed | |
| rolledBack | back to summary |
|---|---|
| private final AtomicLong rolledBack | |
| timedOut | back to summary |
|---|---|
| private final AtomicLong timedOut | |
| TransactionControllerStatistics | back to summary |
|---|---|
| private TransactionControllerStatistics() | |
| getTransactionCommittedCount | back to summary |
|---|---|
| pack-priv long getTransactionCommittedCount() | |
| getTransactionRolledBackCount | back to summary |
|---|---|
| pack-priv long getTransactionRolledBackCount() | |
| getTransactionTimedOutCount | back to summary |
|---|---|
| pack-priv long getTransactionTimedOutCount() | |
| transactionCommitted | back to summary |
|---|---|
| pack-priv void transactionCommitted() | |
| transactionRolledBack | back to summary |
|---|---|
| pack-priv void transactionRolledBack() | |
| transactionTimedOut | back to summary |
|---|---|
| pack-priv void transactionTimedOut() | |