public final class TransactionController extends Object
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin a new transaction and bind its context to the current thread
|
void |
begin(int transactionTimeoutSeconds)
Begin a new transaction with the specified timeout and bind its context to the current thread
|
void |
commit()
Commit the transaction bound to the current thread
|
void |
commit(boolean ignoreTimeout)
Commit the transaction bound to the current thread, ignoring if the transaction
timed out
|
LocalTransactionContext |
getCurrentTransactionContext()
Get the transaction context bond to the current thread
|
int |
getDefaultTransactionTimeout()
Get the default transaction timeout in seconds
|
LocalRecoveryManager |
getRecoveryManager()
Get the local transactions recovery manager of this cache manager
|
long |
getTransactionCommittedCount()
Get the committed transactions count
|
long |
getTransactionRolledBackCount()
Get the rolled back transactions count
|
long |
getTransactionTimedOutCount()
Get the timed out transactions count.
|
void |
rollback()
Rollback the transaction bound to the current thread
|
void |
setDefaultTransactionTimeout(int defaultTransactionTimeoutSeconds)
Set the default transaction timeout in seconds, it must be > 0
|
void |
setRollbackOnly()
Mark the transaction bound to the current thread for rollback only
|
public int getDefaultTransactionTimeout()
public void setDefaultTransactionTimeout(int defaultTransactionTimeoutSeconds)
defaultTransactionTimeoutSeconds
- the default transaction timeoutpublic void begin()
public void begin(int transactionTimeoutSeconds)
transactionTimeoutSeconds
- the timeout foe this transaction in secondspublic void commit()
public void commit(boolean ignoreTimeout)
ignoreTimeout
- true if the transaction should be committed no matter if it timed out or notpublic void rollback()
public void setRollbackOnly()
public LocalTransactionContext getCurrentTransactionContext()
public long getTransactionCommittedCount()
public long getTransactionRolledBackCount()
public long getTransactionTimedOutCount()
public LocalRecoveryManager getRecoveryManager()
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.