org.drools.core.common
Class AgendaGroupQueueImpl
java.lang.Object
org.drools.core.common.AgendaGroupQueueImpl
- All Implemented Interfaces:
- InternalAgendaGroup, InternalRuleFlowGroup, org.kie.api.runtime.rule.AgendaGroup, org.kie.api.runtime.rule.RuleFlowGroup
public class AgendaGroupQueueImpl
- extends Object
- implements InternalAgendaGroup, InternalRuleFlowGroup
AgendaGroup implementation that uses a PriorityQueue to prioritise the evaluation of added
ActivationQueues. The AgendaGroup also maintains a Map of ActivationQueues
for requested salience values.
- See Also:
PriorityQueue,
ActivationQueue
AgendaGroupQueueImpl
public AgendaGroupQueueImpl()
- Construct an
AgendaGroup with the given name.
- Parameters:
name - The name.
AgendaGroupQueueImpl
public AgendaGroupQueueImpl(String name,
InternalRuleBase ruleBase)
getBinaryHeapQueue
public BinaryHeapQueue getBinaryHeapQueue()
getName
public String getName()
- Specified by:
getName in interface org.kie.api.runtime.rule.AgendaGroup- Specified by:
getName in interface org.kie.api.runtime.rule.RuleFlowGroup
setWorkingMemory
public void setWorkingMemory(InternalWorkingMemory workingMemory)
- Specified by:
setWorkingMemory in interface InternalAgendaGroup
getWorkingMemory
public InternalWorkingMemory getWorkingMemory()
- Specified by:
getWorkingMemory in interface InternalAgendaGroup
hasRuleFlowListener
public void hasRuleFlowListener(boolean hasRuleFlowLister)
- Specified by:
hasRuleFlowListener in interface InternalAgendaGroup
isRuleFlowListener
public boolean isRuleFlowListener()
- Specified by:
isRuleFlowListener in interface InternalAgendaGroup
clear
public void clear()
- Specified by:
clear in interface InternalAgendaGroup- Specified by:
clear in interface org.kie.api.runtime.rule.AgendaGroup- Specified by:
clear in interface org.kie.api.runtime.rule.RuleFlowGroup
getAndClear
public Activation[] getAndClear()
- Specified by:
getAndClear in interface InternalAgendaGroup
size
public int size()
- Returns:
- The int total number of activations
add
public void add(Activation activation)
- Specified by:
add in interface InternalAgendaGroup
remove
public Activation remove()
- Specified by:
remove in interface InternalAgendaGroup
peek
public Activation peek()
- Specified by:
peek in interface InternalAgendaGroup
isActive
public boolean isActive()
- Returns:
- boolean value indicating if the AgendaGroup is active and thus being evaluated.
deactivateIfEmpty
public void deactivateIfEmpty()
isAutoDeactivate
public boolean isAutoDeactivate()
- Specified by:
isAutoDeactivate in interface InternalAgendaGroup
setAutoDeactivate
public void setAutoDeactivate(boolean autoDeactivate)
- Description copied from interface:
InternalAgendaGroup
- Sets the auto-deactivate status of this RuleFlowGroup.
If this is set to true, an active RuleFlowGroup automatically
deactivates if it has no more activations. If it had no
activations when it was activated, it will be deactivated immediately.
- Specified by:
setAutoDeactivate in interface InternalAgendaGroup
addNodeInstance
public void addNodeInstance(Long processInstanceId,
String nodeInstanceId)
- Specified by:
addNodeInstance in interface InternalAgendaGroup
removeNodeInstance
public void removeNodeInstance(Long processInstanceId,
String nodeInstanceId)
- Specified by:
removeNodeInstance in interface InternalAgendaGroup
setActive
public void setActive(boolean activate)
- Specified by:
setActive in interface InternalAgendaGroup
getAutoFocusActivator
public PropagationContext getAutoFocusActivator()
setAutoFocusActivator
public void setAutoFocusActivator(PropagationContext autoFocusActivator)
isEmpty
public boolean isEmpty()
- Returns:
- boolean value indicating if this AgendaGroup is empty or not
getActivations
public Activation[] getActivations()
- Specified by:
getActivations in interface InternalAgendaGroup
- Returns:
- An immutable Collection of all the activations in the AgendaGroup
getNodeInstances
public Map<Long,String> getNodeInstances()
- Specified by:
getNodeInstances in interface InternalAgendaGroup
toString
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object object)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
setFocus
public void setFocus()
- Specified by:
setFocus in interface org.kie.api.runtime.rule.AgendaGroup
remove
public void remove(Activation activation)
- Specified by:
remove in interface InternalAgendaGroup
getActivatedForRecency
public long getActivatedForRecency()
- Specified by:
getActivatedForRecency in interface InternalAgendaGroup
setActivatedForRecency
public void setActivatedForRecency(long recency)
- Specified by:
setActivatedForRecency in interface InternalAgendaGroup
getClearedForRecency
public long getClearedForRecency()
- Specified by:
getClearedForRecency in interface InternalAgendaGroup
setClearedForRecency
public void setClearedForRecency(long recency)
- Specified by:
setClearedForRecency in interface InternalAgendaGroup
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.