|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.reteoo.Agenda
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 | |
Agenda(WorkingMemoryImpl workingMemory,
ConflictResolver conflictResolver)
Construct. |
Method Summary | |
(package private) void |
addToAgenda(ReteTuple tuple,
Rule rule)
Schedule a rule action invokation on this Agenda . |
(package private) void |
cancelItem(AgendaItem item)
Cancel a scheduled agenda item for delayed firing. |
(package private) void |
clearAgenda()
Clears all Activations from the Agenda |
void |
fireNextItem(AgendaFilter filter)
Fire the next scheduled Agenda item. |
boolean |
isEmpty()
Determine if this Agenda has any scheduled items. |
(package private) void |
modifyAgenda(FactHandle trigger,
TupleSet newTuples,
Rule rule)
Modify the agenda. |
(package private) void |
removeFromAgenda(TupleKey key,
Rule rule)
Remove a tuple from the agenda. |
(package private) void |
scheduleItem(AgendaItem item)
Schedule an agenda item for delayed firing. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Agenda(WorkingMemoryImpl workingMemory, ConflictResolver conflictResolver)
workingMemory
- The WorkingMemory
of this agenda.conflictResolver
- The conflict resolver.Method Detail |
void addToAgenda(ReteTuple tuple, Rule rule)
Agenda
. Rules
specified with noNoop=true that are active should not be added to the
agenda
tuple
- The matching Tuple
.rule
- The rule to fire.void removeFromAgenda(TupleKey key, Rule rule)
key
- The key to the tuple to be removed.rule
- The rule to remove.void modifyAgenda(FactHandle trigger, TupleSet newTuples, Rule rule)
trigger
- The triggering root object handle.newTuples
- New tuples from the modification.rule
- The rule.void clearAgenda()
void scheduleItem(AgendaItem item)
item
- The item to schedule.void cancelItem(AgendaItem item)
item
- The item to cancel.public boolean isEmpty()
Agenda
has any scheduled items.
true if the agenda is empty, otherwise
false
.
public int size()
public void fireNextItem(AgendaFilter filter) throws ConsequenceException
Agenda
item.
ConsequenceException
- If an error occurs while firing an agenda item.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |