| 
 | ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.transaction.local.LocalTransactionContext
public class LocalTransactionContext
A local transaction's thread context
| Constructor Summary | |
|---|---|
| LocalTransactionContext(int transactionTimeout,
                        TransactionIDFactory transactionIdFactory)Create a new LocalTransactionContext | |
| Method Summary | |
|---|---|
|  void | addListener(TransactionListener listener)Add a TransactionListener to this context | 
|  void | commit(boolean ignoreTimeout)Commit all work done in the context and release all registered soft locks | 
|  boolean | equals(Object obj) | 
|  List<SoftLock> | getSoftLocksForCache(String cacheName)Get all soft locks registered in this context for a specific cache | 
|  TransactionID | getTransactionId()Get the transaction ID of the context | 
|  int | hashCode() | 
|  boolean | hasLockedAnything()Check if anything was locked in this transaction's context | 
|  void | registerSoftLock(String cacheName,
                 LocalTransactionStore store,
                 SoftLock softLock)Register a soft lock in the context | 
|  void | rollback()Rollback all work done in the context and release all registered soft locks | 
|  void | setRollbackOnly()Mark the context for rollback | 
|  long | timeBeforeTimeout()Get the time until this context will expire | 
|  boolean | timedOut()Check if the context timed out | 
|  void | updateSoftLock(String cacheName,
               SoftLock softLock)Update a soft lock already registered in the context | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LocalTransactionContext(int transactionTimeout,
                               TransactionIDFactory transactionIdFactory)
transactionTimeout - the timeout before the context expirestransactionIdFactory - the transaction ID factory to retrieve a new transaction id from| Method Detail | 
|---|
public boolean timedOut()
public long timeBeforeTimeout()
public void setRollbackOnly()
public void registerSoftLock(String cacheName,
                             LocalTransactionStore store,
                             SoftLock softLock)
cacheName - the name of the cache this soft lock is instore - the LocalTransactionStore this soft lock is insoftLock - the soft lock
public void updateSoftLock(String cacheName,
                           SoftLock softLock)
cacheName - the name of the cache this soft lock is insoftLock - the soft lockpublic List<SoftLock> getSoftLocksForCache(String cacheName)
cacheName - the name of the cache
public boolean hasLockedAnything()
public void commit(boolean ignoreTimeout)
ignoreTimeout - true if commit should proceed no matter the timeoutpublic void rollback()
public TransactionID getTransactionId()
public void addListener(TransactionListener listener)
listener - the listenerpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object| 
 | ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||