|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.TransactionController
public final class TransactionController
TransactionController is used to begin, commit and rollback local transactions
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |