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 IndexerType
protected IndexerType
protected final ReteContainer
protected boolean
protected boolean
protected CommunicationGroup
protected IndexerType
protected IndexerType
protected final ReceiverType
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractUpdateSplittingMailbox
(ReceiverType receiver, ReteContainer container, MessageIndexerFactory<IndexerType> factory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
protected IndexerType
protected IndexerType
Returns theCommunicationGroup
of the receiver of this mailbox.Returns theReceiver
of this mailbox.boolean
isEmpty()
Returns true if this mailbox is empty.void
Sets theCommunicationGroup
that the receiver of this mailbox is associated with.protected void
protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:Mailbox
Returns theReceiver
of this mailbox.- Specified by:
getReceiver
in interfaceMailbox
- Returns:
- the receiver
-
clear
public void clear() -
isEmpty
public boolean isEmpty()Description copied from interface:Mailbox
Returns true if this mailbox is empty. -
getCurrentGroup
Description copied from interface:Mailbox
Returns theCommunicationGroup
of the receiver of this mailbox.- Specified by:
getCurrentGroup
in interfaceIGroupable
- Specified by:
getCurrentGroup
in interfaceMailbox
- Returns:
- the communication group
-
setCurrentGroup
Description copied from interface:Mailbox
Sets theCommunicationGroup
that the receiver of this mailbox is associated with.- Specified by:
setCurrentGroup
in interfaceIGroupable
- Specified by:
setCurrentGroup
in interfaceMailbox
- Parameters:
group
- the communication group
-