|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jradius.server.ObjectQueue
public class ObjectQueue
A thread-safe request queue
Constructor Summary | |
---|---|
ObjectQueue()
|
|
ObjectQueue(java.util.List list)
|
Method Summary | |
---|---|
java.lang.Object |
dequeue()
|
java.lang.Object |
dequeue(long timeout)
Dequeue an object in a thread-safe manner |
boolean |
enqueue(java.lang.Object o)
Enqueue an object in a thread-safe manner |
java.lang.Object |
poll()
This method will instantly return with the next object or null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectQueue()
public ObjectQueue(java.util.List list)
Method Detail |
---|
public boolean enqueue(java.lang.Object o)
o
- The object to enqueue
public java.lang.Object dequeue() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object poll()
public java.lang.Object dequeue(long timeout) throws java.lang.InterruptedException
timeout
- The timeout willing to wait for an object
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |