|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.RuleFlowGroupImpl
public class RuleFlowGroupImpl
Implementation of a RuleFlowGroup
that collects activations
of rules of this ruleflow-group.
If this group is activated, all its activations are added to the agenda.
As long as this group is active, its activations are added to the agenda.
Deactivating the group removes all its activations from the agenda and
collects them until it is activated again.
By default, RuleFlowGroups
are automatically deactivated when there are no more
activations in the RuleFlowGroup
. However, this can be configured.
Nested Class Summary | |
---|---|
static class |
RuleFlowGroupImpl.DeactivateCallback
|
Constructor Summary | |
---|---|
RuleFlowGroupImpl()
|
|
RuleFlowGroupImpl(String name)
Construct a RuleFlowGroupImpl with the given name. |
|
RuleFlowGroupImpl(String name,
boolean active,
boolean autoDeactivate)
|
Method Summary | |
---|---|
void |
addActivation(Activation activation)
|
void |
addNodeInstance(Long processInstanceId,
String nodeInstanceId)
|
void |
addRuleFlowGroupListener(RuleFlowGroupListener listener)
|
void |
clear()
|
void |
deactivateIfEmpty()
Checks if this ruleflow group is active and should automatically deactivate. |
boolean |
equal(Object object)
|
Activation[] |
getActivations()
|
String |
getName()
|
Map<Long,String> |
getNodeInstances()
|
InternalWorkingMemory |
getWorkingMemory()
|
int |
hashCode()
|
boolean |
isActive()
|
boolean |
isAutoDeactivate()
|
boolean |
isEmpty()
|
Iterator |
iterator()
|
void |
notifyRuleFlowGroupListeners()
|
void |
readExternal(ObjectInput in)
|
void |
removeActivation(Activation activation)
|
void |
removeNodeInstance(Long processInstanceId,
String nodeInstanceId)
|
void |
removeRuleFlowGroupListener(RuleFlowGroupListener listener)
|
void |
setActive(boolean active)
Activates or deactivates this RuleFlowGroup . |
void |
setAutoDeactivate(boolean autoDeactivate)
Sets the auto-deactivate status of this RuleFlowGroup. |
void |
setWorkingMemory(InternalWorkingMemory workingMemory)
|
int |
size()
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RuleFlowGroupImpl()
public RuleFlowGroupImpl(String name)
RuleFlowGroupImpl
with the given name.
name
- The RuleFlowGroup name.public RuleFlowGroupImpl(String name, boolean active, boolean autoDeactivate)
Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public String getName()
getName
in interface org.drools.runtime.rule.RuleFlowGroup
public void setWorkingMemory(InternalWorkingMemory workingMemory)
setWorkingMemory
in interface InternalRuleFlowGroup
public InternalWorkingMemory getWorkingMemory()
getWorkingMemory
in interface InternalRuleFlowGroup
public void setActive(boolean active)
InternalRuleFlowGroup
RuleFlowGroup
.
When activating, all activations of this RuleFlowGroup
are added
to the agenda.
As long as the RuleFlowGroup
remains active,
its activations are automatically added to the agenda.
When deactivating, all activations of this RuleFlowGroup
are removed
to the agenda.
As long as the RuleFlowGroup
remains deactive,
its activations are not added to the agenda.
setActive
in interface InternalRuleFlowGroup
public boolean isActive()
isActive
in interface InternalRuleFlowGroup
public boolean isAutoDeactivate()
public void setAutoDeactivate(boolean autoDeactivate)
RuleFlowGroup
public void clear()
clear
in interface InternalRuleFlowGroup
clear
in interface org.drools.runtime.rule.RuleFlowGroup
public int size()
public void addActivation(Activation activation)
addActivation
in interface InternalRuleFlowGroup
public void removeActivation(Activation activation)
removeActivation
in interface InternalRuleFlowGroup
public void deactivateIfEmpty()
deactivateIfEmpty
in interface InternalRuleFlowGroup
public void addRuleFlowGroupListener(RuleFlowGroupListener listener)
addRuleFlowGroupListener
in interface InternalRuleFlowGroup
public void removeRuleFlowGroupListener(RuleFlowGroupListener listener)
removeRuleFlowGroupListener
in interface InternalRuleFlowGroup
public void notifyRuleFlowGroupListeners()
public boolean isEmpty()
public Activation[] getActivations()
public Iterator iterator()
iterator
in interface Iterable<ActivationNode>
public String toString()
toString
in class Object
public boolean equal(Object object)
public int hashCode()
hashCode
in class Object
public void addNodeInstance(Long processInstanceId, String nodeInstanceId)
addNodeInstance
in interface InternalRuleFlowGroup
public void removeNodeInstance(Long processInstanceId, String nodeInstanceId)
removeNodeInstance
in interface InternalRuleFlowGroup
public Map<Long,String> getNodeInstances()
getNodeInstances
in interface InternalRuleFlowGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |