orc.runtime
Class LogicalClock

java.lang.Object
  extended by orc.runtime.LogicalClock

public class LogicalClock
extends java.lang.Object

An event queue for site calls to a logical timer (created by MakeTimer). The Orc engine advances all logical clocks whenever there are no other queued tokens to process. Since logical clocks are advanced only by the Orc engine, and calls to such timers are cooperatively executed by the same engine, the logical clock objects do not need to run in a separate thread, (unlike Rtimer), and they do not require synchronization.

Author:
dkitchin

Constructor Summary
LogicalClock()
           
 
Method Summary
 void addEvent(int time, Token token)
           
 boolean advance()
           
 int getTime()
           
 boolean stuck()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalClock

public LogicalClock()
Method Detail

getTime

public int getTime()

addEvent

public void addEvent(int time,
                     Token token)

advance

public boolean advance()

stuck

public boolean stuck()