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).

According to the semantics of logical time, logical timers can only advance when there are no pending site calls except those to logical timers. However it's not so clear how logical timers should interact with pull and semicolon. For the moment they are allowed to advance even if there are tokens blocked on a group cell or semicolon.

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()
           
 
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()