|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.reteoo.Agenda
class 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.
Field Summary | |
---|---|
static int |
ASSERT
|
static int |
MODIFY
|
static int |
NONE
|
static int |
RETRACT
|
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 |
removeFromAgenda(TupleKey key,
Rule rule)
Remove a tuple from the agenda. |
(package private) void |
removeMarkedItemsFromAgenda()
|
(package private) void |
scheduleItem(AgendaItem item)
Schedule an agenda item for delayed firing. |
(package private) void |
setAsyncExceptionHandler(AsyncExceptionHandler handler)
Sets the AsyncExceptionHandler to handle exceptions thrown by the Agenda Scheduler used for duration rules. |
(package private) void |
setMode(int mode)
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int NONE
public static int ASSERT
public static int MODIFY
public static int RETRACT
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 removeMarkedItemsFromAgenda()
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.void setAsyncExceptionHandler(AsyncExceptionHandler handler)
handler
- void setMode(int mode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |