站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 Cache API Documentation 英文版文档

TransactionTable (JBossCache API) - JBoss 4.0.1 sp1 Cache API Documentation 英文版文档


org.jboss.cache
Class TransactionTable

java.lang.Object
  extended byorg.jboss.cache.TransactionTable

public class TransactionTable
extends Object

Maintains the mapping between local (Transaction) and global transactions (GlobalTransaction). Also keys modifications and undo-operations) under a given TX

Version:
$Revision: 1.11.6.2 $
Author:
Bela Ban Apr 14, 2003

Field Summary
protected  HashMap tx_map
          HashMap, mapping between local (javax.transaction.Transaction) and GlobalTransactions.
protected  HashMap txs
          HashMap, mappings between GlobalTransactions and modifications
 
Constructor Summary
TransactionTable()
           
 
Method Summary
 void addLock(GlobalTransaction gtx, IdentityLock l)
           
 void addModification(GlobalTransaction gtx, org.jgroups.blocks.MethodCall m)
           
 void addNode(GlobalTransaction gtx, Fqn node)
           
 void addUndoOperation(GlobalTransaction gtx, org.jgroups.blocks.MethodCall m)
           
 TransactionEntry get(GlobalTransaction gtx)
           
 GlobalTransaction get(Transaction tx)
           
 List getLocalTransactions(GlobalTransaction gtx)
          Returns the Transactions associated with a GlobalTransaction.
 int getNumGlobalTransactions()
           
 int getNumLocalTransactions()
           
 void put(GlobalTransaction tx, TransactionEntry entry)
           
 void put(Transaction tx, GlobalTransaction gtx)
           
 TransactionEntry remove(GlobalTransaction tx)
           
 GlobalTransaction remove(Transaction tx)
           
 String toString()
           
 String toString(boolean print_details)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tx_map

protected HashMap tx_map
HashMap, mapping between local (javax.transaction.Transaction) and GlobalTransactions. New: a local TX can have a number of GTXs


txs

protected HashMap txs
HashMap, mappings between GlobalTransactions and modifications

Constructor Detail

TransactionTable

public TransactionTable()
Method Detail

getNumLocalTransactions

public int getNumLocalTransactions()

getNumGlobalTransactions

public int getNumGlobalTransactions()

get

public GlobalTransaction get(Transaction tx)

getLocalTransactions

public List getLocalTransactions(GlobalTransaction gtx)
Returns the Transactions associated with a GlobalTransaction. Not very efficient as the values have to be iterated over, don't use frequently

Parameters:
gtx - The GlobalTransaction
Returns:
List. A list of local transactions (there may be more than 1 local TX associated with a given GlobalTransaction). This will be null if no local transactions are associated with a given GTX

put

public void put(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(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)

toString

public String toString()

toString

public String toString(boolean print_details)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.