orc.runtime.regions
Class LogicalClock
java.lang.Object
orc.runtime.regions.Region
orc.runtime.regions.SubRegion
orc.runtime.regions.LogicalClock
public final class LogicalClock
- extends SubRegion
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 so-called "immediate" sites.
However it's not so clear how logical timers should interact with "<<".
For the moment clocks are allowed to advance even if there are tokens
blocked on a group cell.
- Author:
- dkitchin, quark
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogicalClock
public LogicalClock(Region parent,
LogicalClock parentClock)
addEvent
public final void addEvent(int delay,
Token token)
- Schedule a token to resume at a future time.
maybeDeactivate
protected void maybeDeactivate()
- Advance the logical time. Called when all child tokens and clocks are quiescent.
- Overrides:
maybeDeactivate
in class Region
getParentClock
public LogicalClock getParentClock()
throws SiteException
- Throws:
SiteException
getCurrentTime
public int getCurrentTime()