com.xenonsoft.bridgetown.aop.transaction.support
Class AbstractTransactionServiceManager.TxStackThreadLocal

java.lang.Object
  extended byjava.lang.ThreadLocal
      extended bycom.xenonsoft.bridgetown.aop.transaction.support.AbstractTransactionServiceManager.TxStackThreadLocal
Enclosing class:
AbstractTransactionServiceManager

public static class AbstractTransactionServiceManager.TxStackThreadLocal
extends java.lang.ThreadLocal

A thread local based stack for storing Transaction Objects created by the transaction manager

Version:
$Id: AbstractTransactionServiceManager.java,v 1.4 2005/03/20 17:44:12 peter_pilgrim Exp $
Author:
Peter Pilgrim, 13-Nov-2004

Constructor Summary
AbstractTransactionServiceManager.TxStackThreadLocal()
           
 
Method Summary
 java.util.List getList()
          Return the stack of transaction contextes as a standard list collection
 int getSize()
          Returns the size of the stack
 java.lang.Object initialValue()
          Returns the current thread's initial value for this thread-local variable.
 boolean isEmpty()
          Retrieve a boolean value if the stack list is empty or not
 TransactionObject peek()
          Peek at the last transaction context on the top of the stack, if it exists, but do not remove it from the stack.
 TransactionObject pop()
          Pop the last transaction context off the top of the stack; thereby removing it, and return it to the caller.
 void push(TransactionObject tx)
          Push the transaction object onto the stack
 int size()
          Alias to retrieve the size of the stack
 
Methods inherited from class java.lang.ThreadLocal
get, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransactionServiceManager.TxStackThreadLocal

public AbstractTransactionServiceManager.TxStackThreadLocal()
Method Detail

initialValue

public java.lang.Object initialValue()
Returns the current thread's initial value for this thread-local variable.

Returns:
the initial value
See Also:
ThreadLocal.initialValue()

push

public void push(TransactionObject tx)
Push the transaction object onto the stack

Parameters:
tx - the transaction context

isEmpty

public boolean isEmpty()
Retrieve a boolean value if the stack list is empty or not

Returns:
Returns true if the stack list is empty

size

public int size()
Alias to retrieve the size of the stack

Returns:
the stack size

getSize

public int getSize()
Returns the size of the stack

Returns:
the stack size

pop

public TransactionObject pop()
Pop the last transaction context off the top of the stack; thereby removing it, and return it to the caller.

Returns:
the last transaction context off the top

peek

public TransactionObject peek()
Peek at the last transaction context on the top of the stack, if it exists, but do not remove it from the stack. Return the reference to the caller.

Returns:
the transaction context

getList

public java.util.List getList()
Return the stack of transaction contextes as a standard list collection

Returns:
the list


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.