Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache
Class TransactionTable

    java.lang.Object
      org.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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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