Package org.drools.core.reteoo
Class RuleTerminalNodeLeftTuple
- java.lang.Object
-
- org.drools.core.reteoo.AbstractTuple
-
- org.drools.core.reteoo.AbstractLeftTuple
-
- org.drools.core.reteoo.RuleTerminalNodeLeftTuple
-
- All Implemented Interfaces:
java.io.Serializable
,org.drools.base.reteoo.BaseTuple
,LeftTuple
,Tuple
,InternalMatch
,Entry<Tuple>
,Queue.QueueEntry
,org.kie.api.runtime.rule.Match
public class RuleTerminalNodeLeftTuple extends AbstractLeftTuple implements InternalMatch
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RuleAgendaItem
ruleAgendaItem
-
Fields inherited from class org.drools.core.reteoo.AbstractLeftTuple
memory
-
Fields inherited from class org.drools.core.reteoo.AbstractTuple
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 void
cancelActivation(ActivationsManager activationsManager)
void
dequeue()
boolean
equals(java.lang.Object o)
InternalFactHandle
getActivationFactHandle()
ActivationGroupNode
getActivationGroupNode()
ActivationNode
getActivationNode()
long
getActivationNumber()
Each PropagationContext is assigned an id from a counter for the WorkingMemory action it represents.InternalAgendaGroup
getAgendaGroup()
java.lang.Runnable
getCallback()
org.drools.base.rule.consequence.Consequence
getConsequence()
java.util.List<java.lang.String>
getDeclarationIds()
java.lang.Object
getDeclarationValue(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()
int
getQueueIndex()
org.drools.base.definitions.rule.impl.RuleImpl
getRule()
Retrieve the rule.RuleAgendaItem
getRuleAgendaItem()
int
getSalience()
TerminalNode
getTerminalNode()
LeftTuple
getTuple()
Retrieve the tuple.boolean
hasBlockers()
int
hashCode()
void
init(long activationNumber, int salience, PropagationContext pctx, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)
boolean
isActive()
boolean
isMatched()
boolean
isQueued()
void
remove()
Cancel theActivation
by removing it from theAgenda
.void
setActivationFactHandle(InternalFactHandle factHandle)
void
setActivationGroupNode(ActivationGroupNode activationNode)
void
setActivationNode(ActivationNode activationNode)
void
setActive(boolean active)
void
setCallback(java.lang.Runnable callback)
void
setMatched(boolean matched)
void
setQueued(boolean queued)
void
setQueueIndex(int queueIndex)
void
setSalience(int salience)
java.lang.String
toExternalForm()
java.lang.String
toString()
void
update(int salience, PropagationContext pctx)
-
Methods inherited from class org.drools.core.reteoo.AbstractLeftTuple
clear, clearBlocker, clearStaged, get, getAccumulatedObjects, getBlockedNext, getBlockedPrevious, getBlocker, getFactHandle, 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.AbstractTuple
decreaseActivationCountForEvents, get, getContextObject, 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.InternalMatch
checkProcessInstance, getFactHandles, getObjects, getObjectsDeep, getPropagationContext
-
Methods inherited from interface org.drools.core.reteoo.LeftTuple
setExpired
-
Methods inherited from interface org.drools.core.reteoo.Tuple
decreaseActivationCountForEvents, findMostRecentPropagationContext, getContextObject, getOriginalFactHandle, getPrevious, getPropagationContext, getRootTuple, getStagedType, 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 org.drools.base.definitions.rule.impl.RuleImpl getRule()
Retrieve the rule.- Specified by:
getRule
in interfaceInternalMatch
- Specified by:
getRule
in interfaceorg.kie.api.runtime.rule.Match
- Returns:
- The rule.
-
getConsequence
public org.drools.base.rule.consequence.Consequence getConsequence()
- Specified by:
getConsequence
in interfaceInternalMatch
-
getTuple
public LeftTuple getTuple()
Retrieve the tuple.- Specified by:
getTuple
in interfaceInternalMatch
- Returns:
- The tuple.
-
getSalience
public int getSalience()
- Specified by:
getSalience
in interfaceorg.kie.api.runtime.rule.Match
-
setSalience
public void setSalience(int salience)
-
getActivationFactHandle
public InternalFactHandle getActivationFactHandle()
- Specified by:
getActivationFactHandle
in interfaceInternalMatch
-
setActivationFactHandle
public void setActivationFactHandle(InternalFactHandle factHandle)
- Specified by:
setActivationFactHandle
in interfaceInternalMatch
-
getRuleAgendaItem
public RuleAgendaItem getRuleAgendaItem()
- Specified by:
getRuleAgendaItem
in interfaceInternalMatch
-
getActivationNumber
public long getActivationNumber()
Description copied from interface:InternalMatch
Each PropagationContext 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 PropagationContext will return the same long for this method.- Specified by:
getActivationNumber
in interfaceInternalMatch
- Returns:
- The activation number
-
isQueued
public boolean isQueued()
- Specified by:
isQueued
in interfaceQueue.QueueEntry
-
setQueued
public void setQueued(boolean queued)
- Specified by:
setQueued
in interfaceQueue.QueueEntry
-
setQueueIndex
public void setQueueIndex(int queueIndex)
- Specified by:
setQueueIndex
in interfaceQueue.QueueEntry
-
getQueueIndex
public int getQueueIndex()
- Specified by:
getQueueIndex
in interfaceQueue.QueueEntry
-
dequeue
public void dequeue()
- Specified by:
dequeue
in interfaceQueue.QueueEntry
-
remove
public void remove()
Description copied from interface:InternalMatch
Cancel theActivation
by removing it from theAgenda
.- Specified by:
remove
in interfaceInternalMatch
-
getActivationGroupNode
public ActivationGroupNode getActivationGroupNode()
- Specified by:
getActivationGroupNode
in interfaceInternalMatch
-
setActivationGroupNode
public void setActivationGroupNode(ActivationGroupNode activationNode)
- Specified by:
setActivationGroupNode
in interfaceInternalMatch
-
getAgendaGroup
public InternalAgendaGroup getAgendaGroup()
- Specified by:
getAgendaGroup
in interfaceInternalMatch
-
getActivationNode
public ActivationNode getActivationNode()
- Specified by:
getActivationNode
in interfaceInternalMatch
-
setActivationNode
public void setActivationNode(ActivationNode activationNode)
- Specified by:
setActivationNode
in interfaceInternalMatch
-
getTerminalNode
public TerminalNode getTerminalNode()
- Specified by:
getTerminalNode
in interfaceInternalMatch
-
getFactHandles
public java.util.List<org.kie.api.runtime.rule.FactHandle> getFactHandles()
- Specified by:
getFactHandles
in interfaceorg.kie.api.runtime.rule.Match
-
toExternalForm
public java.lang.String toExternalForm()
- Specified by:
toExternalForm
in interfaceInternalMatch
-
getObjects
public java.util.List<java.lang.Object> getObjects()
- Specified by:
getObjects
in interfaceorg.kie.api.runtime.rule.Match
-
getObjectsDeep
public java.util.List<java.lang.Object> getObjectsDeep()
- Specified by:
getObjectsDeep
in interfaceInternalMatch
-
getDeclarationValue
public java.lang.Object getDeclarationValue(java.lang.String variableName)
- Specified by:
getDeclarationValue
in interfaceorg.kie.api.runtime.rule.Match
-
getDeclarationIds
public java.util.List<java.lang.String> getDeclarationIds()
- Specified by:
getDeclarationIds
in interfaceorg.kie.api.runtime.rule.Match
-
isMatched
public boolean isMatched()
- Specified by:
isMatched
in interfaceInternalMatch
-
setMatched
public void setMatched(boolean matched)
- Specified by:
setMatched
in interfaceInternalMatch
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceInternalMatch
-
setActive
public void setActive(boolean active)
- Specified by:
setActive
in interfaceInternalMatch
-
hasBlockers
public boolean hasBlockers()
-
getCallback
public java.lang.Runnable getCallback()
- Specified by:
getCallback
in interfaceInternalMatch
-
setCallback
public void setCallback(java.lang.Runnable callback)
- Specified by:
setCallback
in interfaceInternalMatch
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractLeftTuple
-
cancelActivation
public void cancelActivation(ActivationsManager activationsManager)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractLeftTuple
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractLeftTuple
-
-