|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.utils.threading.BoundedQueue
Constructor Summary | |
BoundedQueue(int capacity)
Creates a BoucedQueue with no elements |
Method Summary | |
boolean |
isEmpty()
Checks if the queue is empty |
boolean |
isFull()
Checks to see if the queue is full |
void |
put(java.lang.Object o)
Puts an item into the Queue |
int |
size()
Gets the total number of items in the queue |
java.lang.Object |
take()
Takes the next item in the Queue, if there are no items in the queue the thread is blocked until there is. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BoundedQueue(int capacity)
capacity
- the max number of items this queue may containMethod Detail |
public boolean isEmpty()
isEmpty
in interface Queue
public boolean isFull()
isFull
in interface Queue
public int size()
size
in interface Queue
public void put(java.lang.Object o) throws java.lang.InterruptedException
put
in interface Queue
o
- the item being placed in the queue
java.lang.InterruptedException
- thrown when a thread is waiting to place an item
into a full queue and another thread interrupts itpublic java.lang.Object take() throws java.lang.InterruptedException
take
in interface Queue
java.lang.InterruptedException
- thrown when a thread is waiting get an item
from an empty queue and another thread interrupts it
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |