javax.realtime.DSS
Class FIFOWaiterSet

java.lang.Object
  extended byjavax.realtime.DSS.WaiterSet
      extended byjavax.realtime.DSS.FIFOWaiterSet

public class FIFOWaiterSet
extends WaiterSet

Collection type for queues of RealTimeThread's waiting for a Resource. FIFO order is used.

Author:
gary

Field Summary
 
Fields inherited from class javax.realtime.DSS.WaiterSet
waiters
 
Constructor Summary
FIFOWaiterSet()
          Void constructor.
 
Method Summary
 RealtimeThread dequeue()
          Dequeue the next RealTimeThread from this WaiterSet.
 void enqueue(RealtimeThread thread)
          Enqueue the given RealTimeThread.
 RealtimeThread first()
          Get the first item in this FIFOWaiterSet, which is assumed to be non-empty.
 boolean remove(RealtimeThread thread)
          Remove a given thread from this FIFOWaiterSet.
 java.lang.String toString()
          Construct a printable representation of this FIFOWaiterSet
 
Methods inherited from class javax.realtime.DSS.WaiterSet
isEmpty, iterator, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FIFOWaiterSet

public FIFOWaiterSet()
Void constructor.

Method Detail

remove

public boolean remove(RealtimeThread thread)
Remove a given thread from this FIFOWaiterSet.

Overrides:
remove in class WaiterSet
Parameters:
thread - the RealTimeThread to be removed.
Returns:
true if it was removed.

dequeue

public RealtimeThread dequeue()
Dequeue the next RealTimeThread from this WaiterSet.

Specified by:
dequeue in class WaiterSet
Returns:
the RealTimeThread dequeued.

enqueue

public void enqueue(RealtimeThread thread)
Enqueue the given RealTimeThread. Order is by FIFO.

Specified by:
enqueue in class WaiterSet
Parameters:
thread - the RealTimeThread to be enqueued.

first

public RealtimeThread first()
Get the first item in this FIFOWaiterSet, which is assumed to be non-empty. Do not dequeue that item.

Specified by:
first in class WaiterSet
Returns:
the first item

toString

public java.lang.String toString()
Construct a printable representation of this FIFOWaiterSet

Returns:
the printable representation