|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.LoadBalancer.Queue
public static class LoadBalancer.Queue
A Queue is used to effeciently queue up items for daemon threads to work on.
Field Summary | |
---|---|
protected List |
m_list
A list of items that have been queued. |
Constructor Summary | |
---|---|
LoadBalancer.Queue()
Construct a queue. |
Method Summary | |
---|---|
void |
add(Object o)
Add an object to the end of the queue. |
boolean |
isEmpty()
Determine if the queue is empty. |
Object |
remove()
Wait for and remove an item from the from of the queue. |
Object |
removeNoWait()
Remove an item from the queue if the queue is not empty. |
int |
size()
Determine the number of items in the queue. |
Field Detail |
---|
protected List m_list
Constructor Detail |
---|
public LoadBalancer.Queue()
Method Detail |
---|
public int size()
public boolean isEmpty()
public void add(Object o)
o
- the item to add to the end of the queuepublic Object remove() throws InterruptedException
InterruptedException
- if the thread is interrupted while
waiting for something to be added to the queuepublic Object removeNoWait()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |