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.
TimelyMailboxes 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 TypeMethodDescriptionvoidbooleanisEmpty()booleanvoidnotifyHasMessage(Mailbox mailbox, MessageSelector kind) voidnotifyLostAllMessages(Mailbox mailbox, MessageSelector kind) voidsetComparatorAndReorderMailboxes(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 theComparatorto be used to order theMailboxes at a givenTimestampin the mailbox queue. Additionally, reorders already queuedMailboxes to reflect the new comparator. The comparator may be null, in this case, no set ordering will be enforced among theMailboxes. -
deliverMessages
public void deliverMessages()- Specified by:
deliverMessagesin classCommunicationGroup
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classCommunicationGroup
-
notifyHasMessage
- Specified by:
notifyHasMessagein classCommunicationGroup
-
notifyLostAllMessages
- Specified by:
notifyLostAllMessagesin classCommunicationGroup
-
getMailboxes
- Specified by:
getMailboxesin classCommunicationGroup
-
isRecursive
public boolean isRecursive()- Specified by:
isRecursivein classCommunicationGroup
-