| java.lang.Object org.jasig.portal.utils.BlockingQueue
BlockingQueue | public class BlockingQueue (Code) | | A simple FIFO queue that has MIN/MAX capacity and
that blocks if either enqueue/dequeue would result
in violation of these limits.
Default values for min/max are 0/infinite
author: Peter Kharchenko |
BlockingQueue | BlockingQueue()(Code) | | |
BlockingQueue | BlockingQueue(int min, int max)(Code) | | Construct a new blocking queue with predefined max/min limits
|
BlockingQueue | BlockingQueue(int max)(Code) | | |
enqueue | public synchronized void enqueue(Object o) throws InterruptedException(Code) | | Add new object to the end of the queue
Parameters: o - object to be placed on the queue |
getMaxSize | public int getMaxSize()(Code) | | |
getMinSize | public int getMinSize()(Code) | | |
setLimits | public synchronized void setLimits(int max, int min)(Code) | | Set the queue limits.
To specify a queue 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) | | |
|
|