Package org.drools.core.reteoo
Class RuleTerminalNodeLeftTuple
- java.lang.Object
-
- org.drools.core.reteoo.BaseTuple
-
- org.drools.core.reteoo.BaseLeftTuple
-
- org.drools.core.reteoo.RuleTerminalNodeLeftTuple
-
- All Implemented Interfaces:
java.io.Serializable,AgendaItem,LeftTuple,Tuple,Activation,Entry<Tuple>,org.kie.api.runtime.rule.Match
public class RuleTerminalNodeLeftTuple extends BaseLeftTuple implements AgendaItem
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RuleAgendaItemruleAgendaItem-
Fields inherited from class org.drools.core.reteoo.BaseLeftTuple
memory
-
Fields inherited from class org.drools.core.reteoo.BaseTuple
handle, handleNext, handlePrevious, sink, stagedNext, stagedPrevious
-
-
Constructor Summary
Constructors Constructor Description RuleTerminalNodeLeftTuple()RuleTerminalNodeLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)RuleTerminalNodeLeftTuple(InternalFactHandle factHandle, Sink sink, boolean leftTupleMemoryEnabled)RuleTerminalNodeLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)RuleTerminalNodeLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)RuleTerminalNodeLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()voidcancelActivation(ActivationsManager activationsManager)voiddequeue()booleanequals(java.lang.Object o)InternalFactHandlegetActivationFactHandle()ActivationGroupNodegetActivationGroupNode()ActivationNodegetActivationNode()longgetActivationNumber()Each PropgationContext is assigned an id from a counter for the WorkingMemory action it represents.InternalAgendaGroupgetAgendaGroup()java.lang.RunnablegetCallback()ConsequencegetConsequence()java.util.List<java.lang.String>getDeclarationIds()java.lang.ObjectgetDeclarationValue(java.lang.String variableName)java.util.List<org.kie.api.runtime.rule.FactHandle>getFactHandles()java.util.List<java.lang.Object>getObjects()java.util.List<java.lang.Object>getObjectsDeep()intgetQueueIndex()RuleImplgetRule()Retrieve the rule.RuleAgendaItemgetRuleAgendaItem()intgetSalience()GroupElementgetSubRule()Retrieve the subrule that was activated.TerminalNodegetTerminalNode()LeftTuplegetTuple()Retrieve the tuple.booleanhasBlockers()inthashCode()voidinit(long activationNumber, int salience, PropagationContext pctx, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)booleanisActive()booleanisCanceled()booleanisMatched()booleanisQueued()booleanisRuleAgendaItem()voidremove()Cancel theActivationby removing it from theAgenda.voidsetActivationFactHandle(InternalFactHandle factHandle)voidsetActivationGroupNode(ActivationGroupNode activationNode)voidsetActivationNode(ActivationNode activationNode)voidsetActive(boolean active)voidsetCallback(java.lang.Runnable callback)voidsetMatched(boolean matched)voidsetQueued(boolean queued)voidsetQueueIndex(int queueIndex)voidsetSalience(int salience)java.lang.StringtoExternalForm()java.lang.StringtoString()voidupdate(int salience, PropagationContext pctx)-
Methods inherited from class org.drools.core.reteoo.BaseLeftTuple
clear, clearBlocker, clearStaged, get, getBlockedNext, getBlockedPrevious, getBlocker, getFirstChild, getHandleNext, getHandlePrevious, getIndex, getInputOtnId, getLastChild, getLeftParent, getMemory, getNextParentWithHandle, getObject, getParent, getPeer, getRightParent, getRightParentNext, getRightParentPrevious, getStagedNext, getStagedPrevious, getStagedTypeForQueries, getSubTuple, getTupleSink, getTupleSource, initPeer, isStagedOnRight, reAdd, reAddLeft, reAddRight, setBlockedNext, setBlockedPrevious, setBlocker, setFirstChild, setLastChild, setLeftParent, setLeftTupleSink, setMemory, setPeer, setRightParent, setRightParentNext, setRightParentPrevious, setStagedTypeForQueries, size, toExternalString, toFactHandles, toObjects, unlinkFromLeftParent, unlinkFromRightParent
-
Methods inherited from class org.drools.core.reteoo.BaseTuple
decreaseActivationCountForEvents, get, getContextObject, getFactHandle, getNext, getObject, getOriginalFactHandle, getPrevious, getPropagationContext, getRootTuple, getStagedType, getTuple, increaseActivationCountForEvents, isExpired, setContextObject, setExpired, setFactHandle, setHandleNext, setHandlePrevious, setNext, setPrevious, setPropagationContext, setStagedNext, setStagedPrevious, setStagedType, skipEmptyHandles
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.rule.consequence.Activation
getPropagationContext
-
Methods inherited from interface org.drools.core.common.AgendaItem
getFactHandles, getObjects, getObjectsDeep
-
Methods inherited from interface org.drools.core.reteoo.LeftTuple
getAccumulatedObjects, setExpired
-
Methods inherited from interface org.drools.core.reteoo.Tuple
decreaseActivationCountForEvents, findMostRecentPropagationContext, get, getContextObject, getFactHandle, getObject, getOriginalFactHandle, getPrevious, getPropagationContext, getRootTuple, getStagedType, getTuple, increaseActivationCountForEvents, isDeleted, isExpired, setContextObject, setFactHandle, setHandleNext, setHandlePrevious, setPrevious, setPropagationContext, setStagedNext, setStagedPrevious, setStagedType, skipEmptyHandles, toObjects
-
-
-
-
Field Detail
-
ruleAgendaItem
protected RuleAgendaItem ruleAgendaItem
-
-
Constructor Detail
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple()
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple(InternalFactHandle factHandle, Sink sink, boolean leftTupleMemoryEnabled)
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)
-
RuleTerminalNodeLeftTuple
public RuleTerminalNodeLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)
-
-
Method Detail
-
init
public void init(long activationNumber, int salience, PropagationContext pctx, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)
-
update
public void update(int salience, PropagationContext pctx)
-
getRule
public RuleImpl getRule()
Retrieve the rule.- Specified by:
getRulein interfaceActivation- Specified by:
getRulein interfaceorg.kie.api.runtime.rule.Match- Returns:
- The rule.
-
getConsequence
public Consequence getConsequence()
- Specified by:
getConsequencein interfaceActivation
-
getTuple
public LeftTuple getTuple()
Retrieve the tuple.- Specified by:
getTuplein interfaceActivation- Returns:
- The tuple.
-
getSalience
public int getSalience()
- Specified by:
getSaliencein interfaceActivation
-
setSalience
public void setSalience(int salience)
- Specified by:
setSaliencein interfaceAgendaItem
-
getActivationFactHandle
public InternalFactHandle getActivationFactHandle()
- Specified by:
getActivationFactHandlein interfaceActivation
-
setActivationFactHandle
public void setActivationFactHandle(InternalFactHandle factHandle)
- Specified by:
setActivationFactHandlein interfaceAgendaItem
-
getRuleAgendaItem
public RuleAgendaItem getRuleAgendaItem()
- Specified by:
getRuleAgendaItemin interfaceAgendaItem
-
getActivationNumber
public long getActivationNumber()
Description copied from interface:ActivationEach PropgationContext is assigned an id from a counter for the WorkingMemory action it represents. All Activations return this id as the ActivationNumber, thus all Activations created from the same PropgationContext will return the same long for this method.- Specified by:
getActivationNumberin interfaceActivation- Returns:
- The activation number
-
isQueued
public boolean isQueued()
- Specified by:
isQueuedin interfaceActivation
-
setQueued
public void setQueued(boolean queued)
- Specified by:
setQueuedin interfaceActivation
-
setQueueIndex
public void setQueueIndex(int queueIndex)
- Specified by:
setQueueIndexin interfaceActivation
-
dequeue
public void dequeue()
- Specified by:
dequeuein interfaceActivation
-
getQueueIndex
public int getQueueIndex()
- Specified by:
getQueueIndexin interfaceActivation
-
remove
public void remove()
Description copied from interface:ActivationCancel theActivationby removing it from theAgenda.- Specified by:
removein interfaceActivation
-
getActivationGroupNode
public ActivationGroupNode getActivationGroupNode()
- Specified by:
getActivationGroupNodein interfaceActivation
-
setActivationGroupNode
public void setActivationGroupNode(ActivationGroupNode activationNode)
- Specified by:
setActivationGroupNodein interfaceActivation
-
getAgendaGroup
public InternalAgendaGroup getAgendaGroup()
- Specified by:
getAgendaGroupin interfaceActivation
-
getActivationNode
public ActivationNode getActivationNode()
- Specified by:
getActivationNodein interfaceActivation
-
setActivationNode
public void setActivationNode(ActivationNode activationNode)
- Specified by:
setActivationNodein interfaceActivation
-
getSubRule
public GroupElement getSubRule()
Description copied from interface:ActivationRetrieve the subrule that was activated.- Specified by:
getSubRulein interfaceActivation- Returns:
-
getTerminalNode
public TerminalNode getTerminalNode()
- Specified by:
getTerminalNodein interfaceAgendaItem
-
getFactHandles
public java.util.List<org.kie.api.runtime.rule.FactHandle> getFactHandles()
- Specified by:
getFactHandlesin interfaceAgendaItem- Specified by:
getFactHandlesin interfaceorg.kie.api.runtime.rule.Match
-
toExternalForm
public java.lang.String toExternalForm()
- Specified by:
toExternalFormin interfaceAgendaItem
-
getObjects
public java.util.List<java.lang.Object> getObjects()
- Specified by:
getObjectsin interfaceorg.kie.api.runtime.rule.Match
-
getObjectsDeep
public java.util.List<java.lang.Object> getObjectsDeep()
- Specified by:
getObjectsDeepin interfaceActivation
-
getDeclarationValue
public java.lang.Object getDeclarationValue(java.lang.String variableName)
- Specified by:
getDeclarationValuein interfaceorg.kie.api.runtime.rule.Match
-
getDeclarationIds
public java.util.List<java.lang.String> getDeclarationIds()
- Specified by:
getDeclarationIdsin interfaceorg.kie.api.runtime.rule.Match
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceAgendaItem
-
cancel
public void cancel()
- Specified by:
cancelin interfaceAgendaItem
-
isMatched
public boolean isMatched()
- Specified by:
isMatchedin interfaceActivation
-
setMatched
public void setMatched(boolean matched)
- Specified by:
setMatchedin interfaceActivation
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceActivation
-
setActive
public void setActive(boolean active)
- Specified by:
setActivein interfaceActivation
-
isRuleAgendaItem
public boolean isRuleAgendaItem()
- Specified by:
isRuleAgendaItemin interfaceActivation
-
hasBlockers
public boolean hasBlockers()
-
getCallback
public java.lang.Runnable getCallback()
- Specified by:
getCallbackin interfaceAgendaItem
-
setCallback
public void setCallback(java.lang.Runnable callback)
- Specified by:
setCallbackin interfaceAgendaItem
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBaseLeftTuple
-
cancelActivation
public void cancelActivation(ActivationsManager activationsManager)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classBaseLeftTuple
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBaseLeftTuple
-
-