org.drools.common
Class SequentialAgendaGroupImpl
java.lang.Object
org.drools.common.SequentialAgendaGroupImpl
- All Implemented Interfaces:
- Externalizable, Serializable, org.drools.runtime.rule.AgendaGroup
public class SequentialAgendaGroupImpl
- extends Object
- implements AgendaGroup
AgendaGroup
implementation that uses a PriorityQueue
to prioritise the evaluation of added
ActivationQueue
s. The AgendaGroup
also maintains a Map
of ActivationQueues
for requested salience values.
- See Also:
PriorityQueue
,
ActivationQueue
,
Serialized Form
SequentialAgendaGroupImpl
public SequentialAgendaGroupImpl()
SequentialAgendaGroupImpl
public SequentialAgendaGroupImpl(String name,
ConflictResolver conflictResolver)
- Construct an
AgendaGroup
with the given name.
- Parameters:
name
- The name.
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
getName
public String getName()
- Specified by:
getName
in interface org.drools.runtime.rule.AgendaGroup
clear
public void clear()
- Specified by:
clear
in interface org.drools.runtime.rule.AgendaGroup
size
public int size()
- Returns:
- The int total number of activations
add
public void add(Activation activation)
getNext
public Activation getNext()
isActive
public boolean isActive()
- Returns:
- boolean value indicating if the AgendaGroup is active and thus being evaluated.
setActive
public void setActive(boolean activate)
isEmpty
public boolean isEmpty()
- Iterates a PriorityQueue removing empty entries until it finds a populated entry and return true,
otherwise it returns false;
- Parameters:
priorityQueue
-
- Returns:
getActivations
public Activation[] getActivations()
- Returns:
- An immutable Collection of all the activations in the AgendaGroup
getQueueable
public Queueable[] getQueueable()
toString
public String toString()
- Overrides:
toString
in class Object
equal
public boolean equal(Object object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
setFocus
public void setFocus()
- Specified by:
setFocus
in interface org.drools.runtime.rule.AgendaGroup
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.