edu.emory.mathcs.backport.java.util.concurrent.helpers

Class FIFOWaitQueue

public class FIFOWaitQueue extends WaitQueue implements 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.
Field Summary
protected WaitNodehead_
protected WaitNodetail_
Constructor Summary
FIFOWaitQueue()
Method Summary
WaitNodeextract()
intgetLength()
CollectiongetWaitingThreads()
booleanhasNodes()
voidinsert(WaitNode w)
booleanisWaiting(Thread thread)
voidputBack(WaitNode w)

Field Detail

head_

protected transient WaitNode head_

tail_

protected transient WaitNode tail_

Constructor Detail

FIFOWaitQueue

public FIFOWaitQueue()

Method Detail

extract

public WaitNode extract()

getLength

public int getLength()

getWaitingThreads

public Collection getWaitingThreads()

hasNodes

public boolean hasNodes()

insert

public void insert(WaitNode w)

isWaiting

public boolean isWaiting(Thread thread)

putBack

public void putBack(WaitNode w)