public class MonotonicityAwareMailbox extends java.lang.Object implements Mailbox
IPosetComparator
to identify if a pair of
REVOKE - INSERT updates represent a monotone change pair. The mailbox is used by MonotonicityAwareReceiver
s.Modifier and Type | Class and Description |
---|---|
protected class |
MonotonicityAwareMailbox.MessageIndexer |
Modifier and Type | Field and Description |
---|---|
protected MonotonicityAwareMailbox.MessageIndexer |
antiMonotoneBuffer |
protected MonotonicityAwareMailbox.MessageIndexer |
antiMonotoneQueue |
protected ReteContainer |
container |
protected boolean |
deliveringAntiMonotone |
protected boolean |
deliveringMonotone |
protected TupleMask |
groupMask |
protected MonotonicityAwareMailbox.MessageIndexer |
monotoneBuffer |
protected MonotonicityAwareMailbox.MessageIndexer |
monotoneQueue |
protected MonotonicityAwareReceiver |
receiver |
protected CommunicationTracker |
tracker |
Constructor and Description |
---|
MonotonicityAwareMailbox(MonotonicityAwareReceiver receiver,
ReteContainer container) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all partial matchings stored in memory
|
void |
deliverAll(MessageKind kind)
Delivers all messages of the given kind from this mailbox.
|
protected MonotonicityAwareMailbox.MessageIndexer |
getActiveAntiMonotoneQueue() |
protected MonotonicityAwareMailbox.MessageIndexer |
getActiveMonotoneQueue() |
Receiver |
getReceiver()
Returns the
Receiver of this mailbox. |
void |
postMessage(Direction direction,
Tuple update)
Posts a new message to this mailbox.
|
java.lang.String |
toString() |
protected java.util.Set<Tuple> |
tryFindCounterPart(Tuple first,
boolean findPositiveCounterPart,
boolean findAllCounterParts) |
protected MonotonicityAwareMailbox.MessageIndexer monotoneQueue
protected MonotonicityAwareMailbox.MessageIndexer antiMonotoneQueue
protected MonotonicityAwareMailbox.MessageIndexer monotoneBuffer
protected MonotonicityAwareMailbox.MessageIndexer antiMonotoneBuffer
protected boolean deliveringMonotone
protected boolean deliveringAntiMonotone
protected final MonotonicityAwareReceiver receiver
protected final ReteContainer container
protected final CommunicationTracker tracker
protected final TupleMask groupMask
public MonotonicityAwareMailbox(MonotonicityAwareReceiver receiver, ReteContainer container)
protected MonotonicityAwareMailbox.MessageIndexer getActiveMonotoneQueue()
protected MonotonicityAwareMailbox.MessageIndexer getActiveAntiMonotoneQueue()
public void postMessage(Direction direction, Tuple update)
Mailbox
postMessage
in interface Mailbox
direction
- the direction of the updateupdate
- the update elementprotected java.util.Set<Tuple> tryFindCounterPart(Tuple first, boolean findPositiveCounterPart, boolean findAllCounterParts)
public void deliverAll(MessageKind kind)
Mailbox
deliverAll
in interface Mailbox
kind
- the message kindpublic java.lang.String toString()
toString
in class java.lang.Object
public Receiver getReceiver()
Mailbox
Receiver
of this mailbox.getReceiver
in interface Mailbox