public class WindowNode extends ObjectSource implements ObjectSinkNode, RightTupleSink, MemoryFactory<WindowNode.WindowMemory>
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 |
WindowNode.WindowMemory |
| Modifier and Type | Field and Description |
|---|---|
protected BehaviorManager |
behavior |
alphaNodeHashingThreshold, alphaNodeRangeIndexThreshold, declaredMask, inferredMask, sink, sourceassociations, hashcode, id, memoryId, partitionId, partitionsEnabled| Constructor and Description |
|---|
WindowNode() |
WindowNode(int id,
List<AlphaNodeFieldConstraint> constraints,
List<Behavior> behaviors,
ObjectSource objectSource,
BuildContext context)
Construct a
WindowNode with a unique id using the provided
list of AlphaNodeFieldConstraint and the given ObjectSource. |
addObjectSink, doRemove, getDeclaredMask, getKnowledgeBase, getObjectSinkPropagator, getObjectTypeNode, getParentObjectSource, initDeclaredMask, isInUse, networkUpdated, removeObjectSink, resetInferredMask, setObjectSinkPropagator, setParentObjectSource, setPartitionId, setPartitionIdWithSinks, setSourcePartitionId, updateMaskaddAssociation, addAssociation, attach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionsEnabled, setStreamModeclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetPartitionIdWithSinksgetAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWithgetMemoryIdprotected BehaviorManager behavior
public WindowNode()
public WindowNode(int id,
List<AlphaNodeFieldConstraint> constraints,
List<Behavior> behaviors,
ObjectSource objectSource,
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 readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class ObjectSourceIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class ObjectSourceIOExceptionpublic short getType()
getType in interface NetworkNodepublic List<AlphaNodeFieldConstraint> getConstraints()
FieldConstraintsFieldConstraintspublic Behavior[] getBehaviors()
public void doAttach(BuildContext context)
public void assertObject(InternalFactHandle factHandle, PropagationContext pctx, InternalWorkingMemory workingMemory)
assertObject in interface ObjectSinkpublic void retractRightTuple(RightTuple rightTuple, PropagationContext pctx, InternalWorkingMemory wm)
retractRightTuple in interface RightTupleSinkpublic void modifyRightTuple(RightTuple rightTuple, PropagationContext context, InternalWorkingMemory workingMemory)
modifyRightTuple in interface RightTupleSinkpublic void modifyObject(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory wm)
modifyObject in interface ObjectSinkpublic void byPassModifyToBetaNode(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
byPassModifyToBetaNode in interface ObjectSinkpublic void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory wm)
updateSink in class ObjectSourcepublic WindowNode.WindowMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm)
createMemory in interface MemoryFactory<WindowNode.WindowMemory>public ObjectSinkNode getNextObjectSinkNode()
getNextObjectSinkNode in interface ObjectSinkNodepublic void setNextObjectSinkNode(ObjectSinkNode next)
setNextObjectSinkNode in interface ObjectSinkNodenext - The next ObjectSinkNodepublic ObjectSinkNode getPreviousObjectSinkNode()
getPreviousObjectSinkNode in interface ObjectSinkNodepublic void setPreviousObjectSinkNode(ObjectSinkNode previous)
setPreviousObjectSinkNode in interface ObjectSinkNodeprevious - The previous ObjectSinkNodepublic EntryPointId getEntryPoint()
public BitMask calculateDeclaredMask(Class modifiedClass, List<String> settableProperties)
calculateDeclaredMask in class ObjectSourcepublic ObjectTypeNode.Id getRightInputOtnId()
getRightInputOtnId in interface RightTupleSinkpublic void setRightInputOtnId(ObjectTypeNode.Id rightInputOtnId)
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.