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, internalEquals, modifyObject, readExternal, setNextObjectSinkNode, setPreviousObjectSinkNode, setRightInputOtnId, toString, writeExternal
addObjectSink, doRemove, getDeclaredMask, getKnowledgeBase, getObjectSinkPropagator, getObjectTypeNode, getParentObjectSource, initDeclaredMask, isInUse, networkUpdated, removeObjectSink, resetInferredMask, updateMask
addAssociation, addAssociation, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, hashCode, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setStreamMode, thisNodeEquals
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNextObjectSinkNode, getPreviousObjectSinkNode, setNextObjectSinkNode, setPreviousObjectSinkNode
getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, getType, isAssociatedWith, thisNodeEquals
readExternal, writeExternal
public 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.WindowNode
public 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.ObjectSink
assertObject
in class org.drools.core.reteoo.WindowNode
public 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.RightTupleSink
retractRightTuple
in class org.drools.core.reteoo.WindowNode
public 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.RightTupleSink
modifyRightTuple
in class org.drools.core.reteoo.WindowNode
public 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.ObjectSink
byPassModifyToBetaNode
in class org.drools.core.reteoo.WindowNode
public 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.WindowNode
public org.drools.core.common.Memory createMemory(org.drools.core.RuleBaseConfiguration config, org.drools.core.common.InternalWorkingMemory wm)
createMemory
in interface org.drools.core.common.MemoryFactory
createMemory
in class org.drools.core.reteoo.WindowNode
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.