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 TransactionEntry

    java.lang.Object
      org.jboss.cache.TransactionEntry

Direct Known Subclasses:
  OptimisticTransactionEntry

    public class TransactionEntry

extends java.lang.Object

This is the value (key being the `GlobalTransaction`) in the transaction table of TreeCache.
A TransactionEntry maintains

- Handle to local Transactions: there can be more than 1 local TX associated with a GlobalTransaction
- List of modifications (Modification)
- List of nodes that were created as part of lock acquisition. These nodes can be safely deleted when a transaction is rolled back
- List of locks (`IdentityLock`) that have been acquired by this transaction so far

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

Field Summary
`protected java.util.List` | `cl_mod_list`
`protected java.util.List` | `dummyNodesCreatedByCacheLoader` A list of dummy uninitialised nodes created by the cache loader interceptor to load data for a given node in this tx.
`protected java.util.List` | `locks` List of locks acquired by the transaction (`IdentityLock`)
`protected javax.transaction.Transaction` | `ltx` Local transaction
`protected java.util.List` | `modification_list` List of modifications (`MethodCall`).
`protected Option` | `option`
`protected java.util.List` | `undo_list` List.

Constructor Summary
`TransactionEntry()` Constructs a new TransactionEntry.

Method Summary
`void` | `addCacheLoaderModification(org.jgroups.blocks.MethodCall m)`
`void` | `addLock(IdentityLock l)` Adds a lock to the end of the lock list.
`void` | `addLocks(java.util.Collection newLocks)` Add multiple locks to the lock list.
`void` | `addModification(org.jgroups.blocks.MethodCall m)` Adds a modification to the modification list.
`void` | `addUndoOperation(org.jgroups.blocks.MethodCall m)` Adds an undo operation to the undo list.
`java.util.List` | `getCacheLoaderModifications()`
`java.util.List` | `getDummyNodesCreatedByCacheLoader()`
`java.util.List` | `getLocks()` Returns the locks in use.
`java.util.List` | `getModifications()` Returns all modifications.
`Option` | `getOption()` Retrieves a transaction scope option override
`javax.transaction.Transaction` | `getTransaction()` Returns a local transaction associated with this TransactionEntry
`java.util.List` | `getUndoOperations()` Returns the undo operations in use.
`void` | `loadUninitialisedNode(Fqn fqn)`
`void` | `releaseAllLocks(java.lang.Object owner)` Deprecated. don't think this is used anymore
`void` | `releaseAllLocksFIFO(java.lang.Object owner)` Releases all locks held by the owner, in order of creation.
`void` | `releaseAllLocksLIFO(java.lang.Object owner)` Releases all locks held by the owner, in reverse order of creation.
`void` | `setOption(Option o)` Sets a transaction-scope option override
`void` | `setTransaction(javax.transaction.Transaction tx)` Sets the local transaction for this entry.
`java.lang.String` | `toString()` Returns debug information about this transaction.
`void` | `undoOperations(TreeCache cache)` Posts all undo operations to the TreeCache.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ltx

    protected javax.transaction.Transaction ltx

  Local transaction

### option

    protected Option option

### modification_list

    protected java.util.List modification_list

  List of modifications (`MethodCall`). They will be replicated on TX commit

### cl_mod_list

    protected java.util.List cl_mod_list

### undo_list

    protected java.util.List undo_list

  List. List of compensating `MethodCall` objects which revert the ones in `modification_list`. For each entry in the modification list, we have a corresponding entry in this list. A rollback will simply iterate over this list in reverse to undo the modifications. Note that these undo-ops will never be replicated.

### locks

    protected java.util.List locks

  List of locks acquired by the transaction (`IdentityLock`)

### dummyNodesCreatedByCacheLoader

    protected java.util.List dummyNodesCreatedByCacheLoader

  A list of dummy uninitialised nodes created by the cache loader interceptor to load data for a given node in this tx.

Constructor Detail

### TransactionEntry

    public TransactionEntry()

  Constructs a new TransactionEntry.

Method Detail

### addModification

    public void addModification(org.jgroups.blocks.MethodCall m)

  Adds a modification to the modification list.

### addCacheLoaderModification

    public void addCacheLoaderModification(org.jgroups.blocks.MethodCall m)

### getModifications

    public java.util.List getModifications()

  Returns all modifications.

### getCacheLoaderModifications

    public java.util.List getCacheLoaderModifications()

### addUndoOperation

    public void addUndoOperation(org.jgroups.blocks.MethodCall m)

  Adds an undo operation to the undo list.

  See Also:
    `undoOperations(org.jboss.cache.TreeCache)`

### getUndoOperations

    public java.util.List getUndoOperations()

  Returns the undo operations in use. Note: This list may be concurrently modified.

### setTransaction

    public void setTransaction(javax.transaction.Transaction tx)

  Sets the local transaction for this entry.

### getTransaction

    public javax.transaction.Transaction getTransaction()

  Returns a local transaction associated with this TransactionEntry

### addLock

    public void addLock(IdentityLock l)

  Adds a lock to the end of the lock list.

### addLocks

    public void addLocks(java.util.Collection newLocks)

  Add multiple locks to the lock list.

  Parameters:
    `newLocks` - Collection

### getLocks

    public java.util.List getLocks()

  Returns the locks in use. Note: This list may be concurrently modified.

### releaseAllLocks

    public void releaseAllLocks(java.lang.Object owner)

  Deprecated. don't think this is used anymore

  Calls `releaseAllLocksFIFO(java.lang.Object)`.

### releaseAllLocksLIFO

    public void releaseAllLocksLIFO(java.lang.Object owner)

  Releases all locks held by the owner, in reverse order of creation. Clears the list of locks held.

### releaseAllLocksFIFO

    public void releaseAllLocksFIFO(java.lang.Object owner)

  Releases all locks held by the owner, in order of creation. Does not clear the list of locks held.

### undoOperations

    public void undoOperations(TreeCache cache)

  Posts all undo operations to the TreeCache.

### toString

    public java.lang.String toString()

  Returns debug information about this transaction.

  Overrides:
    `toString` in class `java.lang.Object`

### loadUninitialisedNode

    public void loadUninitialisedNode(Fqn fqn)

### getDummyNodesCreatedByCacheLoader

    public java.util.List getDummyNodesCreatedByCacheLoader()

### setOption

    public void setOption(Option o)

  Sets a transaction-scope option override

  Parameters:
    `o` -

### getOption

    public Option getOption()

  Retrieves a transaction scope option override

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 © 1998-2005 JBoss Inc . All Rights Reserved.