org.jboss.cache
Class TransactionTable
java.lang.Object
org.jboss.cache.TransactionTable
- public class TransactionTable
- extends java.lang.Object
Maintains the mapping between local (Transaction) and global transactions
(GlobalTransaction). Also keys modifications and undo-operations) under a given TX
Field Summary |
protected ConcurrentReaderHashMap |
tx_map
HashMap, mapping between local (javax.transaction.Transaction)
and GlobalTransactions. |
protected java.util.HashMap |
txs
HashMap, mappings between GlobalTransactions and modifications |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tx_map
protected ConcurrentReaderHashMap tx_map
- HashMap, mapping between local (javax.transaction.Transaction)
and GlobalTransactions. New: a local TX can have a number of GTXs
txs
protected java.util.HashMap txs
- HashMap, mappings between GlobalTransactions and modifications
TransactionTable
public TransactionTable()
getNumLocalTransactions
public int getNumLocalTransactions()
getNumGlobalTransactions
public int getNumGlobalTransactions()
get
public GlobalTransaction (src) get(Transaction (src) tx)
getLocalTransaction
public Transaction (src) getLocalTransaction(GlobalTransaction (src) gtx)
- Returns the local transaction associated with a GlobalTransaction. Not very efficient as the values have to
be iterated over, don't use frequently
- Parameters:
gtx
- The GlobalTransaction
- Returns:
- Transaction. The local transaction associated with
a given GlobalTransaction). This will be null if no local transaction is associated with a given GTX
put
public void put(Transaction (src) tx,
GlobalTransaction (src) gtx)
get
public TransactionEntry (src) get(GlobalTransaction (src) gtx)
put
public void put(GlobalTransaction (src) tx,
TransactionEntry (src) entry)
remove
public TransactionEntry (src) remove(GlobalTransaction (src) tx)
remove
public GlobalTransaction (src) remove(Transaction (src) tx)
addModification
public void addModification(GlobalTransaction (src) gtx,
MethodCall m)
addUndoOperation
public void addUndoOperation(GlobalTransaction (src) gtx,
MethodCall m)
addNode
public void addNode(GlobalTransaction (src) gtx,
Fqn (src) node)
addLock
public void addLock(GlobalTransaction (src) gtx,
IdentityLock (src) l)
addLocks
public void addLocks(GlobalTransaction (src) gtx,
java.util.Collection locks)
toString
public java.lang.String toString()
toString
public java.lang.String toString(boolean print_details)