edu.emory.mathcs.backport.java.util.concurrent.helpers
Class FIFOWaitQueue
java.lang.Object
edu.emory.mathcs.backport.java.util.concurrent.helpers.WaitQueue
edu.emory.mathcs.backport.java.util.concurrent.helpers.FIFOWaitQueue
- All Implemented Interfaces:
- java.io.Serializable
- public class FIFOWaitQueue
- extends WaitQueue
- implements java.io.Serializable
Simple linked list queue used in FIFOSemaphore.
Methods are not synchronized; they depend on synch of callers.
Must be public, since it is used by Semaphore (outside this package).
NOTE: this class is NOT present in java.util.concurrent.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
head_
protected transient WaitQueue.WaitNode head_
tail_
protected transient WaitQueue.WaitNode tail_
FIFOWaitQueue
public FIFOWaitQueue()
insert
public void insert(WaitQueue.WaitNode w)
- Specified by:
insert
in class WaitQueue
extract
public WaitQueue.WaitNode extract()
- Specified by:
extract
in class WaitQueue
putBack
public void putBack(WaitQueue.WaitNode w)
- Specified by:
putBack
in class WaitQueue
hasNodes
public boolean hasNodes()
- Specified by:
hasNodes
in class WaitQueue
getLength
public int getLength()
- Specified by:
getLength
in class WaitQueue
getWaitingThreads
public java.util.Collection getWaitingThreads()
- Specified by:
getWaitingThreads
in class WaitQueue
isWaiting
public boolean isWaiting(java.lang.Thread thread)
- Specified by:
isWaiting
in class WaitQueue