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
- Version:
- $Revision: 1.2 $
- Author:
- Bela Ban Apr 14, 2003
Field Summary |
protected EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap |
tx_map
HashMap, mapping between local (javax.transaction.Transaction)
and GlobalTransactions. |
protected EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap |
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 EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap tx_map
- HashMap, mapping between local (javax.transaction.Transaction)
and GlobalTransactions. New: a local TX can have a number of GTXs
txs
protected EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap txs
- HashMap, mappings between GlobalTransactions and modifications
TransactionTable
public TransactionTable()
getNumLocalTransactions
public int getNumLocalTransactions()
getNumGlobalTransactions
public int getNumGlobalTransactions()
get
public GlobalTransaction get(javax.transaction.Transaction tx)
getLocalTransaction
public javax.transaction.Transaction getLocalTransaction(GlobalTransaction 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(javax.transaction.Transaction tx,
GlobalTransaction gtx)
get
public TransactionEntry get(GlobalTransaction gtx)
put
public void put(GlobalTransaction tx,
TransactionEntry entry)
remove
public TransactionEntry remove(GlobalTransaction tx)
remove
public GlobalTransaction remove(javax.transaction.Transaction tx)
addModification
public void addModification(GlobalTransaction gtx,
org.jgroups.blocks.MethodCall m)
addUndoOperation
public void addUndoOperation(GlobalTransaction gtx,
org.jgroups.blocks.MethodCall m)
addNode
public void addNode(GlobalTransaction gtx,
Fqn node)
addLock
public void addLock(GlobalTransaction gtx,
IdentityLock l)
addLocks
public void addLocks(GlobalTransaction gtx,
java.util.Collection locks)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toString
public java.lang.String toString(boolean print_details)
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.