com.sun.faban.harness.engine
Class RunQLock

java.lang.Object
  extended by com.sun.faban.harness.engine.RunQLock

public class RunQLock
extends Object

The RunQLock implements monitors to provide mutually exclusive access to critical sections. One lock provides run queue access locking for submitting and fetching runs. The other lock is a wait lock to wait for new run arrivals.


Constructor Summary
RunQLock()
          Constructor.
 
Method Summary
 void grabLock()
          Method to grab the lock for mutually exclusive access while entering a critical section.
 void releaseLock()
          Method to release the lock while exit from the critical section.
 void signal()
          Signals that a run is submitted.
 void waitForSignal(long sleep)
          Sleeps for the given time, or until a new run is submitted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunQLock

public RunQLock()
Constructor.

Method Detail

grabLock

public void grabLock()
Method to grab the lock for mutually exclusive access while entering a critical section.


releaseLock

public void releaseLock()
Method to release the lock while exit from the critical section.


signal

public void signal()
Signals that a run is submitted.


waitForSignal

public void waitForSignal(long sleep)
Sleeps for the given time, or until a new run is submitted.

Parameters:
sleep - The max time to sleep, if nothing is submitted.