|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.drools.common.DefaultAgenda
public class DefaultAgenda
Rule-firing Agenda.
Since many rules may be matched by a single assertObject(...) all scheduled
actions are placed into the Agenda.
While processing a scheduled action, it may modify or retract objects in other scheduled actions, which must then be removed from the agenda. Non-invalidated actions are left on the agenda, and are executed in turn.
| Constructor Summary | |
|---|---|
DefaultAgenda(WorkingMemory workingMemory)
Construct. |
|
| Method Summary | |
|---|---|
void |
addAgendaGroup(AgendaGroup agendaGroup)
|
int |
agendaSize()
Iterates all the modules in the focus stack returning the total number of Activations |
void |
clearActivationGroup(ActivationGroup activationGroup)
Clears all Activations from an Xor Group. |
void |
clearActivationGroup(java.lang.String name)
Clears all Activations from an Activation-Group. |
void |
clearAgenda()
Clears all Activations from the Agenda |
void |
clearAgendaGroup(AgendaGroup agendaGroup)
Clears all Activations from an Agenda Group. |
void |
clearAgendaGroup(java.lang.String name)
Clears all Activations from an Agenda Group. |
void |
fireActivation(Activation activation)
Fire this item. |
boolean |
fireNextItem(AgendaFilter filter)
Fire the next scheduled Agenda item. |
int |
focusStackSize()
Iterates all the AgendGroup |
ActivationGroup |
getActivationGroup(java.lang.String name)
|
Activation[] |
getActivations()
|
AgendaGroup |
getAgendaGroup(java.lang.String name)
|
AgendaGroup[] |
getAgendaGroups()
|
AgendaGroup |
getCurrentAgendaGroup()
|
AgendaGroup |
getFocus()
|
AgendaGroup |
getNextFocus()
|
Activation[] |
getScheduledActivations()
|
LinkedList |
getScheduledItems()
|
AgendaGroup[] |
getStack()
|
WorkingMemory |
getWorkingMemory()
|
void |
removeScheduleItem(ScheduledAgendaItem item)
|
void |
scheduleItem(ScheduledAgendaItem item)
Schedule an agenda item for delayed firing. |
void |
setCurrentAgendaGroup(AgendaGroup agendaGroup)
|
boolean |
setFocus(AgendaGroup agendaGroup)
|
void |
setFocus(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAgenda(WorkingMemory workingMemory)
workingMemory - The WorkingMemory of this agenda.conflictResolver - The conflict resolver.| Method Detail |
|---|
public WorkingMemory getWorkingMemory()
getWorkingMemory in interface Agendapublic void scheduleItem(ScheduledAgendaItem item)
scheduleItem in interface InternalAgendaitem - The item to schedule.public void removeScheduleItem(ScheduledAgendaItem item)
removeScheduleItem in interface InternalAgendapublic LinkedList getScheduledItems()
getScheduledItems in interface Agendapublic void addAgendaGroup(AgendaGroup agendaGroup)
addAgendaGroup in interface InternalAgendapublic boolean setFocus(AgendaGroup agendaGroup)
public void setFocus(java.lang.String name)
public AgendaGroup getFocus()
public AgendaGroup getNextFocus()
public void setCurrentAgendaGroup(AgendaGroup agendaGroup)
public AgendaGroup getCurrentAgendaGroup()
public AgendaGroup getAgendaGroup(java.lang.String name)
getAgendaGroup in interface Agendapublic AgendaGroup[] getAgendaGroups()
getAgendaGroups in interface Agendapublic AgendaGroup[] getStack()
public ActivationGroup getActivationGroup(java.lang.String name)
getActivationGroup in interface Agendapublic int focusStackSize()
AgendaAgendGroups in the focus stack returning the total number of Activations
- Specified by:
focusStackSize in interface Agenda
- Returns:
- total number of
Activations on the focus stack
public int agendaSize()
AgendaActivations
agendaSize in interface Agendapublic Activation[] getActivations()
getActivations in interface Agendapublic Activation[] getScheduledActivations()
getScheduledActivations in interface Agendapublic void clearAgenda()
Agenda
clearAgenda in interface Agendapublic void clearAgendaGroup(java.lang.String name)
Agenda
clearAgendaGroup in interface Agendapublic void clearAgendaGroup(AgendaGroup agendaGroup)
Agenda
clearAgendaGroup in interface Agendapublic void clearActivationGroup(java.lang.String name)
Agenda
clearActivationGroup in interface Agendapublic void clearActivationGroup(ActivationGroup activationGroup)
Agenda
clearActivationGroup in interface Agendapublic boolean fireNextItem(AgendaFilter filter) throws ConsequenceException
Agenda item.
fireNextItem in interface InternalAgendaConsequenceException - If an error occurs while firing an agenda item.public void fireActivation(Activation activation) throws ConsequenceException
fireActivation in interface InternalAgendaworkingMemory - The working memory context.
ConsequenceException - If an error occurs while attempting to fire the consequence.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||