org.drools.common
Class SequentialAgendaGroupImpl

java.lang.Object
  extended by 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 ActivationQueues. The AgendaGroup also maintains a Map of ActivationQueues for requested salience values.

See Also:
PriorityQueue, ActivationQueue, Serialized Form

Field Summary
 
Fields inherited from interface org.drools.spi.AgendaGroup
MAIN
 
Constructor Summary
SequentialAgendaGroupImpl()
           
SequentialAgendaGroupImpl(String name, ConflictResolver conflictResolver)
          Construct an AgendaGroup with the given name.
 
Method Summary
 void add(Activation activation)
           
 void clear()
           
 boolean equal(Object object)
           
 Activation[] getActivations()
           
 PropagationContext getAutoFocusActivator()
           
 String getName()
           
 Activation getNext()
           
 Queueable[] getQueueable()
           
 int hashCode()
           
 boolean isActive()
           
 boolean isEmpty()
          Iterates a PriorityQueue removing empty entries until it finds a populated entry and return true, otherwise it returns false;
 void readExternal(ObjectInput in)
           
 void setActive(boolean activate)
           
 void setAutoFocusActivator(PropagationContext ctx)
           
 void setFocus()
           
 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

SequentialAgendaGroupImpl

public SequentialAgendaGroupImpl()

SequentialAgendaGroupImpl

public SequentialAgendaGroupImpl(String name,
                                 ConflictResolver conflictResolver)
Construct an AgendaGroup with the given name.

Parameters:
name - The name.
Method Detail

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

setAutoFocusActivator

public void setAutoFocusActivator(PropagationContext ctx)

getAutoFocusActivator

public PropagationContext getAutoFocusActivator()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.