|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RuleBase
Active collection of Rules.
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)
|
void |
addPackages(Package[] pkgs)
|
int |
getAdditionsSinceLock()
Returns the number of additive operations applied since the last lock() was obtained |
Set<String> |
getEntryPointIds()
|
org.drools.definition.type.FactType |
getFactType(String string)
Returns a declared FactType. |
Package |
getPackage(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)
|
StatefulSession |
newStatefulSession(InputStream stream)
|
StatefulSession |
newStatefulSession(InputStream stream,
boolean keepReference)
|
StatefulSession |
newStatefulSession(InputStream stream,
boolean keepReference,
SessionConfiguration conf)
|
StatefulSession |
newStatefulSession(SessionConfiguration config,
org.drools.runtime.Environment environment)
Create a new WorkingMemory session for this
RuleBase. |
StatelessSession |
newStatelessSession()
|
void |
removeFunction(String packageName,
String functionName)
Removes a specific function in a specific package. |
void |
removePackage(String packageName)
Remove the package and all it's rules, functions etc |
void |
removeProcess(String id)
Removes a process by the process' id |
void |
removeQuery(String packageName,
String queryName)
Remove a specific Query in a Package |
void |
removeRule(String packageName,
String ruleName)
Remove a specific Rule in a Package |
void |
unlock()
Unlocks the RuleBase and all of the referenced StatefulSessions. |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| 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.
IMPORTANT: when using the stateful session REMEMBER TO CALL dispose() when you are done with the session.WorkingMemory,
org.drools.conflict.DefaultConflictResolverStatefulSession newStatefulSession(boolean keepReference)
StatefulSession newStatefulSession(InputStream stream)
StatefulSession newStatefulSession(InputStream stream,
boolean keepReference)
StatefulSession newStatefulSession(InputStream stream,
boolean keepReference,
SessionConfiguration conf)
StatefulSession newStatefulSession(SessionConfiguration config,
org.drools.runtime.Environment environment)
WorkingMemory session for this
RuleBase.
config - the session configuration object to use for the
created session.
WorkingMemory.WorkingMemory,
org.drools.conflict.DefaultConflictResolverPackage[] getPackages()
Package getPackage(String name)
void addPackages(Package[] pkgs)
void addPackage(Package pkg)
void lock()
void unlock()
int getAdditionsSinceLock()
int getRemovalsSinceLock()
void removePackage(String packageName)
packageName -
void removeRule(String packageName,
String ruleName)
packageName - ruleName -
void removeQuery(String packageName,
String queryName)
packageName - ruleName -
void removeFunction(String packageName,
String functionName)
packageName - functionName - void removeProcess(String id)
id - StatefulSession[] getStatefulSessions()
org.drools.definition.type.FactType getFactType(String string)
string - - the name of the declared type (a type defined in the rules).
This would typically be packagename + . + type name.
Eg, if there is a delcared type of name "Driver", and the package name is "com.company".
Then the string you pass in would be "com.company.Driver".Set<String> getEntryPointIds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||