| java.lang.Object org.jasig.portal.utils.BlockingStack
BlockingStack | public class BlockingStack (Code) | | A simple FILO stack that has MIN/MAX capacity and
that blocks if either push/pop would result
in violation of these limits.
Default values for min/max are 0/infinite
author: Peter Kharchenko |
BlockingStack | BlockingStack()(Code) | | |
BlockingStack | BlockingStack(int min, int max)(Code) | | Construct a new blocking stack with predefined max/min limits
|
BlockingStack | BlockingStack(int max)(Code) | | |
empty | public synchronized boolean empty()(Code) | | |
getMaxSize | public int getMaxSize()(Code) | | |
getMinSize | public int getMinSize()(Code) | | |
nonBlockingPush | public synchronized boolean nonBlockingPush(Object o)(Code) | | Regular, non-blocking push.
|
push | public synchronized void push(Object o) throws InterruptedException(Code) | | Add new object to the top of the stack
Parameters: o - object to be placed on the stack |
remove | public synchronized boolean remove(Object o)(Code) | | Find and remove a specific object from the stack
|
setLimits | public synchronized void setLimits(int max, int min)(Code) | | Set the stack limits.
To specify a stack without an upper bound (that is max=inifinity) use max value of -1
|
setMaxSize | public synchronized void setMaxSize(int max)(Code) | | |
setMinSize | public synchronized void setMinSize(int min)(Code) | | |
size | public synchronized int size()(Code) | | |
|
|