|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RuleBase
Active collection of Rule
s.
From a RuleBase
many WorkingMemory
rule
sessions may be instantiated. Additionally, it may be inspected to determine
which Package
s it contains.
WorkingMemory
Field Summary | |
---|---|
static int |
RETEOO
|
Method Summary | |
---|---|
void |
addPackage(Package pkg)
|
int |
getAdditionsSinceLock()
Returns the number of additive operations applied since the last lock() was obtained |
Package |
getPackage(java.lang.String name)
|
Package[] |
getPackages()
|
int |
getRemovalsSinceLock()
Returns the number of removal operations applied since the last lock() was obtained |
StatefulSession[] |
getStatefulSessions()
Returns an array of all the referenced StatefulSessions |
void |
lock()
This locks the current RuleBase and all there referenced StatefulSessions. |
StatefulSession |
newStatefulSession()
Create a new WorkingMemory session for this
RuleBase . |
StatefulSession |
newStatefulSession(boolean keepReference)
Create a new WorkingMemory session for this
RuleBase . |
StatefulSession |
newStatefulSession(java.io.InputStream stream)
RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream. |
StatefulSession |
newStatefulSession(java.io.InputStream stream,
boolean keepReference)
RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream. |
StatelessSession |
newStatelessSession()
|
void |
removeFunction(java.lang.String packageName,
java.lang.String functionName)
Removes a specific function in a specific package. |
void |
removePackage(java.lang.String packageName)
Remove the package and all it's rules, functions etc |
void |
removeProcess(java.lang.String id)
Removes a process by the process' id |
void |
removeRule(java.lang.String packageName,
java.lang.String ruleName)
Remove a specific Rule in a Package |
void |
unlock()
Unlocks the RuleBase and all of the referenced StatefulSessions. |
Methods inherited from interface org.drools.RuleBaseEventManager |
---|
addEventListener, getRuleBaseEventListeners, removeEventListener |
Field Detail |
---|
static final int RETEOO
Method Detail |
---|
StatelessSession newStatelessSession()
StatefulSession newStatefulSession()
WorkingMemory
session for this
RuleBase
. By default the RuleBase retains a
weak reference to returned WorkingMemory.
The created WorkingMemory
uses the default conflict
resolution strategy.
WorkingMemory
.WorkingMemory
,
org.drools.conflict.DefaultConflictResolver
StatefulSession newStatefulSession(boolean keepReference)
WorkingMemory
session for this
RuleBase
. Optionally the RuleBase retains a
weak reference to returned WorkingMemory.
The created WorkingMemory
uses the default conflict
resolution strategy.
WorkingMemory
.WorkingMemory
,
org.drools.conflict.DefaultConflictResolver
StatefulSession newStatefulSession(java.io.InputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
The created WorkingMemory
uses the default conflict
resolution strategy.
WorkingMemory
.
java.io.IOException
java.lang.ClassNotFoundException
WorkingMemory
,
org.drools.conflict.DefaultConflictResolver
StatefulSession newStatefulSession(java.io.InputStream stream, boolean keepReference) throws java.io.IOException, java.lang.ClassNotFoundException
The created WorkingMemory
uses the default conflict
resolution strategy.
WorkingMemory
.
java.io.IOException
java.lang.ClassNotFoundException
WorkingMemory
,
org.drools.conflict.DefaultConflictResolver
Package[] getPackages()
Package getPackage(java.lang.String name)
void addPackage(Package pkg) throws java.lang.Exception
java.lang.Exception
void lock()
void unlock()
int getAdditionsSinceLock()
int getRemovalsSinceLock()
void removePackage(java.lang.String packageName)
packageName
- void removeRule(java.lang.String packageName, java.lang.String ruleName)
packageName
- ruleName
- void removeFunction(java.lang.String packageName, java.lang.String functionName)
packageName
- functionName
- void removeProcess(java.lang.String id)
id
- StatefulSession[] getStatefulSessions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |