|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--alice.tuplemedium.TupleCentreVM
Defines the core behaviour of a tuple centre virtual machine. The behaviour reflects the operational semantic expressed in related tuple centre articles. It is abstract because it not specifies how the output events are dispatched. Note that in order to specify a concrete virtual machine, concrete object implementing TupleSet, EventSet, TRSet, Reactor, Reaction must be specified.
Reactor,
TupleSet,
EventSet,
TRSet| Field Summary | |
protected long |
bootTime
tuple centre boot time in ms |
protected java.util.ArrayList |
inputEvents
input event queue |
protected EventSet |
outputEventSet
multiset of not satisfiable pending queries Wn - W/(Wn+Wp) |
protected Tuple |
reactionSpec
reactions specification (tuple centre reaction behaviour) |
protected Reactor |
reactor
reactions manager |
protected TupleSet |
tSet
multiset of tuples T |
protected EventSet |
wnSet
multiset of not satisfiable pending queries Wn - W/(Wn+Wp) |
protected EventSet |
wpSet
multiset of satisfiable pending queries Wp - predicatives (inp,rdp) |
protected EventSet |
wsSet
multiset of satisfiable pending queries Ws - not predicatives (in,rd) |
protected TRSet |
zSet
multiset of triggered reactions Z |
| Constructor Summary | |
TupleCentreVM()
|
|
| Method Summary | |
void |
acceptEvent(Event ev)
Accepts a communication event It is the input service of the tuple centre machine, the only way to make the virtual machine aware of an external event to be processed. |
void |
addObservableEventListener(ObservableEventListener l)
Registers a new listener to observable events |
void |
fetchTriggeredReactions(Event ev)
Collects triggered reaction in zSet |
long |
getBootTime()
gets virtual machine boot time |
long |
getCurrentTime()
gets current virtual machine time |
Reactor |
getReactor()
gets raective component of the vm |
TRSet |
getTRSet()
gets triggered event set |
TupleSet |
getTSet()
gets tuple set |
EventSet |
getWnSet()
gets unsatisfied event set |
void |
notifyObservableEvent(ObservableEvent e)
Notifies registered listeners of a new observable event |
protected abstract void |
notifyOutputEvents()
Specifies how to dispatch output events (collected in outputEventSet) to related agents |
void |
removeEventsOf(AgentId id)
Removes all events of specified agent This services is executed in paraller to the virtual machine thread of control. |
void |
removeObservableEventListener(ObservableEventListener l)
Removes (if present) a listener to observable events |
void |
reset()
resets the virtual machine to boot state |
void |
run()
Expresses the behaviour of the thread of control of the virtual machine |
void |
spy(java.lang.String m)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected long bootTime
protected TupleSet tSet
protected EventSet wpSet
protected EventSet wsSet
protected EventSet wnSet
protected TRSet zSet
protected java.util.ArrayList inputEvents
protected EventSet outputEventSet
protected Tuple reactionSpec
protected Reactor reactor
| Constructor Detail |
public TupleCentreVM()
| Method Detail |
protected abstract void notifyOutputEvents()
public final void acceptEvent(Event ev)
ev - the input (communication) eventpublic final void removeEventsOf(AgentId id)
id - the identifier of the agent whose events must be removedpublic final void run()
run in interface java.lang.Runnablepublic final void fetchTriggeredReactions(Event ev)
ev - the event triggering reactionspublic final void notifyObservableEvent(ObservableEvent e)
e - the observable eventpublic final void addObservableEventListener(ObservableEventListener l)
l - the listener to be notifiedpublic final void removeObservableEventListener(ObservableEventListener l)
l - the listener to be removedpublic final long getBootTime()
public final long getCurrentTime()
public final TupleSet getTSet()
public final EventSet getWnSet()
public final TRSet getTRSet()
public final Reactor getReactor()
public void spy(java.lang.String m)
public final void reset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||