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:
Serializable
,AgendaItem
,LeftTuple
,Activation
,Tuple
,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 RuleAgendaItem
ruleAgendaItem
-
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
-
Methods inherited from class org.drools.core.reteoo.BaseLeftTuple
clear, clearBlocker, clearStaged, equals, 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, hashCode, 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.spi.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.spi.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:
getRule
in interfaceActivation
- Specified by:
getRule
in interfaceorg.kie.api.runtime.rule.Match
- Returns:
- The rule.
-
getConsequence
public Consequence getConsequence()
- Specified by:
getConsequence
in interfaceActivation
-
getTuple
public LeftTuple getTuple()
Retrieve the tuple.- Specified by:
getTuple
in interfaceActivation
- Returns:
- The tuple.
-
getSalience
public int getSalience()
- Specified by:
getSalience
in interfaceActivation
-
setSalience
public void setSalience(int salience)
- Specified by:
setSalience
in interfaceAgendaItem
-
getActivationFactHandle
public InternalFactHandle getActivationFactHandle()
- Specified by:
getActivationFactHandle
in interfaceActivation
-
setActivationFactHandle
public void setActivationFactHandle(InternalFactHandle factHandle)
- Specified by:
setActivationFactHandle
in interfaceAgendaItem
-
getRuleAgendaItem
public RuleAgendaItem getRuleAgendaItem()
- Specified by:
getRuleAgendaItem
in interfaceAgendaItem
-
getActivationNumber
public long getActivationNumber()
Description copied from interface:Activation
Each 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:
getActivationNumber
in interfaceActivation
- Returns:
- The activation number
-
isQueued
public boolean isQueued()
- Specified by:
isQueued
in interfaceActivation
-
setQueued
public void setQueued(boolean queued)
- Specified by:
setQueued
in interfaceActivation
-
setQueueIndex
public void setQueueIndex(int queueIndex)
- Specified by:
setQueueIndex
in interfaceActivation
-
dequeue
public void dequeue()
- Specified by:
dequeue
in interfaceActivation
-
getQueueIndex
public int getQueueIndex()
- Specified by:
getQueueIndex
in interfaceActivation
-
remove
public void remove()
Description copied from interface:Activation
Cancel theActivation
by removing it from theAgenda
.- Specified by:
remove
in interfaceActivation
-
getActivationGroupNode
public ActivationGroupNode getActivationGroupNode()
- Specified by:
getActivationGroupNode
in interfaceActivation
-
setActivationGroupNode
public void setActivationGroupNode(ActivationGroupNode activationNode)
- Specified by:
setActivationGroupNode
in interfaceActivation
-
getAgendaGroup
public InternalAgendaGroup getAgendaGroup()
- Specified by:
getAgendaGroup
in interfaceActivation
-
getActivationNode
public ActivationNode getActivationNode()
- Specified by:
getActivationNode
in interfaceActivation
-
setActivationNode
public void setActivationNode(ActivationNode activationNode)
- Specified by:
setActivationNode
in interfaceActivation
-
getSubRule
public GroupElement getSubRule()
Description copied from interface:Activation
Retrieve the subrule that was activated.- Specified by:
getSubRule
in interfaceActivation
- Returns:
-
getTerminalNode
public TerminalNode getTerminalNode()
- Specified by:
getTerminalNode
in interfaceAgendaItem
-
getFactHandles
public List<org.kie.api.runtime.rule.FactHandle> getFactHandles()
- Specified by:
getFactHandles
in interfaceAgendaItem
- Specified by:
getFactHandles
in interfaceorg.kie.api.runtime.rule.Match
-
toExternalForm
public String toExternalForm()
- Specified by:
toExternalForm
in interfaceAgendaItem
-
getObjects
public List<Object> getObjects()
- Specified by:
getObjects
in interfaceorg.kie.api.runtime.rule.Match
-
getObjectsDeep
public List<Object> getObjectsDeep()
- Specified by:
getObjectsDeep
in interfaceActivation
-
getDeclarationValue
public Object getDeclarationValue(String variableName)
- Specified by:
getDeclarationValue
in interfaceorg.kie.api.runtime.rule.Match
-
getDeclarationIds
public List<String> getDeclarationIds()
- Specified by:
getDeclarationIds
in interfaceorg.kie.api.runtime.rule.Match
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceled
in interfaceAgendaItem
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceAgendaItem
-
isMatched
public boolean isMatched()
- Specified by:
isMatched
in interfaceActivation
-
setMatched
public void setMatched(boolean matched)
- Specified by:
setMatched
in interfaceActivation
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceActivation
-
setActive
public void setActive(boolean active)
- Specified by:
setActive
in interfaceActivation
-
isRuleAgendaItem
public boolean isRuleAgendaItem()
- Specified by:
isRuleAgendaItem
in interfaceActivation
-
hasBlockers
public boolean hasBlockers()
-
getCallback
public Runnable getCallback()
- Specified by:
getCallback
in interfaceAgendaItem
-
setCallback
public void setCallback(Runnable callback)
- Specified by:
setCallback
in interfaceAgendaItem
-
toString
public String toString()
- Overrides:
toString
in classBaseLeftTuple
-
cancelActivation
public void cancelActivation(ActivationsManager activationsManager)
-
-