Class AbstractUpdateSplittingMailbox<IndexerType extends MessageIndexer,ReceiverType extends Receiver>
java.lang.Object
tools.refinery.interpreter.rete.network.mailbox.timeless.AbstractUpdateSplittingMailbox<IndexerType,ReceiverType>
- All Implemented Interfaces:
Clearable,IGroupable,Mailbox
- Direct Known Subclasses:
PosetAwareMailbox,UpdateSplittingMailbox
public abstract class AbstractUpdateSplittingMailbox<IndexerType extends MessageIndexer,ReceiverType extends Receiver>
extends Object
implements Mailbox
An abstract mailbox implementation that is capable of splitting update messages based on some form of monotonicity
(anti-monotone and monotone). The monotonicity is either defined by the less or equal operator of a poset or, it can
be the standard subset ordering among sets of tuples.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IndexerTypeprotected IndexerTypeprotected final ReteContainerprotected booleanprotected booleanprotected CommunicationGroupprotected IndexerTypeprotected IndexerTypeprotected final ReceiverType -
Constructor Summary
ConstructorsConstructorDescriptionAbstractUpdateSplittingMailbox(ReceiverType receiver, ReteContainer container, MessageIndexerFactory<IndexerType> factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected IndexerTypeprotected IndexerTypeReturns theCommunicationGroupof the receiver of this mailbox.Returns theReceiverof this mailbox.booleanisEmpty()Returns true if this mailbox is empty.voidSets theCommunicationGroupthat the receiver of this mailbox is associated with.protected voidprotected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.rete.network.mailbox.Mailbox
deliverAll, postMessage
-
Field Details
-
monotoneQueue
-
antiMonotoneQueue
-
monotoneBuffer
-
antiMonotoneBuffer
-
deliveringMonotone
protected boolean deliveringMonotone -
deliveringAntiMonotone
protected boolean deliveringAntiMonotone -
receiver
-
container
-
group
-
-
Constructor Details
-
AbstractUpdateSplittingMailbox
public AbstractUpdateSplittingMailbox(ReceiverType receiver, ReteContainer container, MessageIndexerFactory<IndexerType> factory)
-
-
Method Details
-
swapAndClearMonotone
protected void swapAndClearMonotone() -
swapAndClearAntiMonotone
protected void swapAndClearAntiMonotone() -
getActiveMonotoneQueue
-
getActiveAntiMonotoneQueue
-
getReceiver
Description copied from interface:MailboxReturns theReceiverof this mailbox.- Specified by:
getReceiverin interfaceMailbox- Returns:
- the receiver
-
clear
public void clear() -
isEmpty
public boolean isEmpty()Description copied from interface:MailboxReturns true if this mailbox is empty. -
getCurrentGroup
Description copied from interface:MailboxReturns theCommunicationGroupof the receiver of this mailbox.- Specified by:
getCurrentGroupin interfaceIGroupable- Specified by:
getCurrentGroupin interfaceMailbox- Returns:
- the communication group
-
setCurrentGroup
Description copied from interface:MailboxSets theCommunicationGroupthat the receiver of this mailbox is associated with.- Specified by:
setCurrentGroupin interfaceIGroupable- Specified by:
setCurrentGroupin interfaceMailbox- Parameters:
group- the communication group
-