com.wutka.util
Class ObjectQueue
java.lang.Object
|
+--com.wutka.util.ObjectQueue
- public class ObjectQueue
- extends java.lang.Object
|
Field Summary |
protected com.wutka.util.QueueMember |
head
The head of the queue |
protected com.wutka.util.QueueMember |
tail
The tail of the queue |
|
Constructor Summary |
ObjectQueue()
Creates a new resource pool |
|
Method Summary |
void |
addObject(java.lang.Object ob)
Adds an object to the end of the queue |
protected void |
doNotify()
Performs a notifyAll (which requires a synchronized method) |
protected void |
doWait(long timeout)
Performs a wait for a specified number of milliseconds. |
protected void |
doWakeup()
|
java.lang.Object |
getObject()
|
java.lang.Object |
getObject(long timeout)
|
protected java.lang.Object |
getObjectFromQueue()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
head
protected com.wutka.util.QueueMember head
- The head of the queue
tail
protected com.wutka.util.QueueMember tail
- The tail of the queue
ObjectQueue
public ObjectQueue()
- Creates a new resource pool
addObject
public void addObject(java.lang.Object ob)
- Adds an object to the end of the queue
- Parameters:
ob - The object being added
doWait
protected void doWait(long timeout)
- Performs a wait for a specified number of milliseconds.
- Parameters:
timeout - The number of milliseconds to wait
(wait forever if timeout < 0)
getObjectFromQueue
protected java.lang.Object getObjectFromQueue()
getObject
public java.lang.Object getObject()
getObject
public java.lang.Object getObject(long timeout)
doNotify
protected void doNotify()
- Performs a notifyAll (which requires a synchronized method)
doWakeup
protected void doWakeup()