Class TimelyCommunicationGroup
java.lang.Object
tools.refinery.interpreter.rete.network.communication.CommunicationGroup
tools.refinery.interpreter.rete.network.communication.timely.TimelyCommunicationGroup
- All Implemented Interfaces:
Comparable<CommunicationGroup>
A timely communication group implementation.
s are ordered in the
increasing order of timestamps.
TimelyMailbox
es and
invalid reference
LazyFoldingNode
- Since:
- 2.3
-
Field Summary
Fields inherited from class tools.refinery.interpreter.rete.network.communication.CommunicationGroup
identifier, isEnqueued, representative, tracker, UNSUPPORTED_MESSAGE_KIND
-
Constructor Summary
ConstructorsConstructorDescriptionTimelyCommunicationGroup
(TimelyCommunicationTracker tracker, Node representative, int identifier, boolean isSingleton) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
isEmpty()
boolean
void
notifyHasMessage
(Mailbox mailbox, MessageSelector kind) void
notifyLostAllMessages
(Mailbox mailbox, MessageSelector kind) void
setComparatorAndReorderMailboxes
(Comparator<Node> nodeComparator) Methods inherited from class tools.refinery.interpreter.rete.network.communication.CommunicationGroup
compareTo, equals, getRepresentative, hashCode, toString
-
Constructor Details
-
TimelyCommunicationGroup
public TimelyCommunicationGroup(TimelyCommunicationTracker tracker, Node representative, int identifier, boolean isSingleton)
-
-
Method Details
-
setComparatorAndReorderMailboxes
Sets theComparator
to be used to order theMailbox
es at a givenTimestamp
in the mailbox queue. Additionally, reorders already queuedMailbox
es to reflect the new comparator. The comparator may be null, in this case, no set ordering will be enforced among theMailbox
es. -
deliverMessages
public void deliverMessages()- Specified by:
deliverMessages
in classCommunicationGroup
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classCommunicationGroup
-
notifyHasMessage
- Specified by:
notifyHasMessage
in classCommunicationGroup
-
notifyLostAllMessages
- Specified by:
notifyLostAllMessages
in classCommunicationGroup
-
getMailboxes
- Specified by:
getMailboxes
in classCommunicationGroup
-
isRecursive
public boolean isRecursive()- Specified by:
isRecursive
in classCommunicationGroup
-