public class ReteWindowNode
extends org.drools.core.reteoo.WindowNode
implements org.drools.core.reteoo.ObjectSinkNode, org.drools.core.reteoo.RightTupleSink, org.drools.core.common.MemoryFactory
WindowNodes are nodes in the Rete network used
to manage windows. They support multiple types of windows, like
sliding windows, tumbling windows, etc.
This class must act as a lock-gate for all working memory actions on it
and propagated down the network in this branch, as there can be concurrent
threads propagating events and expiring events working on this node at the
same time. It requires it to be thread safe.| Modifier and Type | Class and Description |
|---|---|
static class |
ReteWindowNode.ReteWindowMemory |
| Constructor and Description |
|---|
ReteWindowNode() |
ReteWindowNode(int id,
List<org.drools.core.spi.AlphaNodeFieldConstraint> constraints,
List<org.drools.core.rule.Behavior> behaviors,
org.drools.core.reteoo.ObjectSource objectSource,
org.drools.core.reteoo.builder.BuildContext context)
Construct a
WindowNode with a unique id using the provided
list of AlphaNodeFieldConstraint and the given ObjectSource. |
| Modifier and Type | Method and Description |
|---|---|
void |
assertObject(org.drools.core.common.InternalFactHandle factHandle,
org.drools.core.spi.PropagationContext pctx,
org.drools.core.common.InternalWorkingMemory workingMemory) |
void |
attach(org.drools.core.reteoo.builder.BuildContext context) |
void |
byPassModifyToBetaNode(org.drools.core.common.InternalFactHandle factHandle,
org.drools.core.reteoo.ModifyPreviousTuples modifyPreviousTuples,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory workingMemory) |
org.drools.core.common.Memory |
createMemory(org.drools.core.RuleBaseConfiguration config,
org.drools.core.common.InternalWorkingMemory wm) |
void |
modifyRightTuple(org.drools.core.reteoo.RightTuple rightTuple,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory workingMemory) |
void |
retractRightTuple(org.drools.core.reteoo.RightTuple rightTuple,
org.drools.core.spi.PropagationContext pctx,
org.drools.core.common.InternalWorkingMemory wm) |
void |
updateSink(org.drools.core.reteoo.ObjectSink sink,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory wm) |
assertRightTuple, calculateDeclaredMask, equals, getBehaviors, getConstraints, getEntryPoint, getNextObjectSinkNode, getPreviousObjectSinkNode, getRightInputOtnId, getType, hashCode, modifyObject, readExternal, setNextObjectSinkNode, setPreviousObjectSinkNode, setRightInputOtnId, toString, writeExternaladdObjectSink, doRemove, getDeclaredMask, getObjectTypeNode, getParentObjectSource, getSinkPropagator, initDeclaredMask, isInUse, networkUpdated, removeObjectSink, resetInferredMask, updateMaskaddAssociation, attach, getAssociations, getId, getPartitionId, isStreamMode, remove, removeAssociation, setId, setPartitionId, setStreamModeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNextObjectSinkNode, getPreviousObjectSinkNode, setNextObjectSinkNode, setPreviousObjectSinkNodegetAssociations, getId, getPartitionId, getTypereadExternal, writeExternalpublic ReteWindowNode()
public ReteWindowNode(int id,
List<org.drools.core.spi.AlphaNodeFieldConstraint> constraints,
List<org.drools.core.rule.Behavior> behaviors,
org.drools.core.reteoo.ObjectSource objectSource,
org.drools.core.reteoo.builder.BuildContext context)
WindowNode with a unique id using the provided
list of AlphaNodeFieldConstraint and the given ObjectSource.id - Node's IDconstraints - Node's constraintsbehaviors - list of behaviors for this window nodeobjectSource - Node's object sourcepublic void attach(org.drools.core.reteoo.builder.BuildContext context)
attach in class org.drools.core.reteoo.WindowNodepublic void assertObject(org.drools.core.common.InternalFactHandle factHandle,
org.drools.core.spi.PropagationContext pctx,
org.drools.core.common.InternalWorkingMemory workingMemory)
assertObject in interface org.drools.core.reteoo.ObjectSinkassertObject in class org.drools.core.reteoo.WindowNodepublic void retractRightTuple(org.drools.core.reteoo.RightTuple rightTuple,
org.drools.core.spi.PropagationContext pctx,
org.drools.core.common.InternalWorkingMemory wm)
retractRightTuple in interface org.drools.core.reteoo.RightTupleSinkretractRightTuple in class org.drools.core.reteoo.WindowNodepublic void modifyRightTuple(org.drools.core.reteoo.RightTuple rightTuple,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory workingMemory)
modifyRightTuple in interface org.drools.core.reteoo.RightTupleSinkmodifyRightTuple in class org.drools.core.reteoo.WindowNodepublic void byPassModifyToBetaNode(org.drools.core.common.InternalFactHandle factHandle,
org.drools.core.reteoo.ModifyPreviousTuples modifyPreviousTuples,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory workingMemory)
byPassModifyToBetaNode in interface org.drools.core.reteoo.ObjectSinkbyPassModifyToBetaNode in class org.drools.core.reteoo.WindowNodepublic void updateSink(org.drools.core.reteoo.ObjectSink sink,
org.drools.core.spi.PropagationContext context,
org.drools.core.common.InternalWorkingMemory wm)
updateSink in class org.drools.core.reteoo.WindowNodepublic org.drools.core.common.Memory createMemory(org.drools.core.RuleBaseConfiguration config,
org.drools.core.common.InternalWorkingMemory wm)
createMemory in interface org.drools.core.common.MemoryFactorycreateMemory in class org.drools.core.reteoo.WindowNodeCopyright © 2001–2015 JBoss by Red Hat. All rights reserved.