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

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

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

A thread local based stack for storing Transaction Configuration object supplied to 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.ConfigStackThreadLocal()
           
 
Method Summary
 java.util.List getList()
          Return the stack of transaction configurations 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
 ITransactionConfig peek()
          Peek at the last transaction config on the top of the stack, if it exists, but do not remove it from the stack.
 ITransactionConfig pop()
          Pop the last transaction config off the top of the stack; thereby removing it, and return it to the caller.
 void push(ITransactionConfig config)
          Push the transaction configuration onto the top of 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.ConfigStackThreadLocal

public AbstractTransactionServiceManager.ConfigStackThreadLocal()
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(ITransactionConfig config)
Push the transaction configuration onto the top of the stack

Parameters:
config - the configuration

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 ITransactionConfig pop()
Pop the last transaction config off the top of the stack; thereby removing it, and return it to the caller.

Returns:
the last transaction config off the top

peek

public ITransactionConfig peek()
Peek at the last transaction config 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 config

getList

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

Returns:
the list


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.