public final class WrappedStatefulKnowledgeSessionForRHS extends Object implements org.kie.api.runtime.KieSession, InternalWorkingMemoryActions, EventSupport, org.kie.api.runtime.KieRuntime, Externalizable
Constructor and Description |
---|
WrappedStatefulKnowledgeSessionForRHS(WorkingMemory workingMemory) |
Modifier and Type | Method and Description |
---|---|
void |
abortProcessInstance(long id) |
void |
activate() |
void |
activationFired()
This method is called by the agenda right after an activation was fired
to allow the working memory to resume any activities blocked during
activation firing.
|
void |
addEventListener(org.kie.api.event.rule.AgendaEventListener listener)
Add an event listener.
|
void |
addEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener) |
void |
addEventListener(org.kie.api.event.process.ProcessEventListener listener) |
void |
addEventListener(org.kie.internal.event.rule.RuleEventListener listener) |
void |
addEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
Add an event listener.
|
void |
addPropagation(PropagationEntry propagationEntry) |
void |
cancelActivation(Activation activation,
boolean declarativeAgenda) |
void |
clearActivationGroup(String group)
Clears the Activation Group, cancellings all its Activations
|
void |
clearAgenda()
Clear the Agenda.
|
void |
clearAgendaGroup(String group)
Clear the Agenda Group, cancelling all its Activations.
|
void |
clearNodeMemory(MemoryFactory node) |
void |
clearRuleFlowGroup(String group)
Clears the RuleFlow group, cancelling all its Activations
|
void |
closeLiveQuery(InternalFactHandle factHandle) |
org.kie.api.runtime.process.ProcessInstance |
createProcessInstance(String processId,
org.kie.internal.process.CorrelationKey correlationKey,
Map<String,Object> parameters) |
org.kie.api.runtime.process.ProcessInstance |
createProcessInstance(String processId,
Map<String,Object> parameters) |
<T> T |
createRuntimeService(Class<T> cls) |
void |
deactivate() |
void |
delete(org.kie.api.runtime.rule.FactHandle handle) |
void |
delete(org.kie.api.runtime.rule.FactHandle handle,
org.kie.api.runtime.rule.FactHandle.State fhState) |
void |
delete(org.kie.api.runtime.rule.FactHandle handle,
RuleImpl rule,
TerminalNode terminalNode) |
void |
delete(org.kie.api.runtime.rule.FactHandle factHandle,
RuleImpl rule,
TerminalNode terminalNode,
org.kie.api.runtime.rule.FactHandle.State fhState) |
void |
destroy() |
void |
dispose()
Internal method called by the engine when the session is being disposed, so that the entry point
can proceed with the necessary clean ups.
|
<T,K> T |
don(Activation activation,
K core,
Class<T> trait,
boolean b,
org.kie.api.internal.runtime.beliefs.Mode[] modes) |
<T,K> T |
don(Activation activation,
K core,
Collection<Class<? extends Thing>> traits,
boolean b,
org.kie.api.internal.runtime.beliefs.Mode[] modes) |
void |
endBatchExecution() |
void |
endOperation()
This method must be called after finishing any work in the engine,
like inserting a new fact or firing a new rule.
|
boolean |
equals(Object obj) |
<T> T |
execute(org.kie.api.command.Command<T> command) |
void |
executeQueuedActions() |
int |
fireAllRules()
Fire all items on the agenda until empty.
|
int |
fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
Fire all items on the agenda until empty, using the given AgendaFiler
|
int |
fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter,
int fireLimit)
Fire all items on the agenda using the given AgendaFiler
until empty or at most 'fireLimit' rules have fired
|
int |
fireAllRules(int fireLimit)
Fire all items on the agenda until empty or at most 'fireLimit' rules have fired
|
void |
fireUntilHalt() |
void |
fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter) |
void |
flushPropagations() |
Iterator<? extends PropagationEntry> |
getActionsIterator() |
Map |
getActivationParameters(Activation activation) |
Map.Entry[] |
getActivationParameters(long activationId) |
InternalAgenda |
getAgenda()
Returns the Agenda for this WorkingMemory.
|
Collection<org.kie.api.event.rule.AgendaEventListener> |
getAgendaEventListeners()
Returns all event listeners.
|
AgendaEventSupport |
getAgendaEventSupport() |
org.kie.api.runtime.Calendars |
getCalendars() |
Map<String,org.kie.api.runtime.Channel> |
getChannels()
Returns a map of channel Id->Channel of all channels in
this working memory
|
EntryPointId |
getEntryPoint() |
org.kie.api.runtime.rule.EntryPoint |
getEntryPoint(String name) |
String |
getEntryPointId() |
Map<String,WorkingMemoryEntryPoint> |
getEntryPointMap() |
EntryPointNode |
getEntryPointNode() |
Collection<? extends org.kie.api.runtime.rule.EntryPoint> |
getEntryPoints() |
org.kie.api.runtime.Environment |
getEnvironment() |
long |
getFactCount() |
org.kie.api.runtime.rule.FactHandle |
getFactHandle(Object object)
Retrieve the
FactHandle associated with an Object. |
org.kie.api.runtime.rule.FactHandle |
getFactHandleByIdentity(Object object)
Looks for the fact handle associated to the given object
by looking up the object IDENTITY (==), even if rule base
is configured to AssertBehavior.EQUALITY.
|
FactHandleFactory |
getFactHandleFactory() |
<T extends org.kie.api.runtime.rule.FactHandle> |
getFactHandles() |
<T extends org.kie.api.runtime.rule.FactHandle> |
getFactHandles(org.kie.api.runtime.ObjectFilter filter) |
Object |
getGlobal(String identifier)
Retrieve a specific instance of global data by identifier
|
GlobalResolver |
getGlobalResolver()
Returns the current GlobalResolver
|
org.kie.api.runtime.Globals |
getGlobals() |
FactHandleFactory |
getHandleFactory() |
int |
getId() |
long |
getIdentifier() |
long |
getIdleTime()
Returns the number of time units (usually ms) that the engine is idle
according to the session clock or -1 if it is not idle.
|
InternalFactHandle |
getInitialFactHandle() |
InternalWorkingMemory |
getInternalWorkingMemory() |
org.kie.api.KieBase |
getKieBase() |
Collection<org.kie.api.event.kiebase.KieBaseEventListener> |
getKieBaseEventListeners() |
<T> T |
getKieRuntime(Class<T> cls) |
InternalKnowledgeBase |
getKnowledgeBase()
Retrieve the
RuleBase for this working memory. |
InternalKnowledgeRuntime |
getKnowledgeRuntime() |
long |
getLastIdleTimestamp() |
Lock |
getLock() |
org.kie.api.logger.KieRuntimeLogger |
getLogger() |
long |
getNextPropagationIdCounter() |
NodeMemories |
getNodeMemories() |
<T extends Memory> |
getNodeMemory(MemoryFactory<T> node) |
Object |
getObject(org.kie.api.runtime.rule.FactHandle handle)
Retrieve the object associated with a
FactHandle . |
Collection<? extends Object> |
getObjects() |
Collection<? extends Object> |
getObjects(org.kie.api.runtime.ObjectFilter filter) |
ObjectStore |
getObjectStore() |
ObjectTypeConfigurationRegistry |
getObjectTypeConfigurationRegistry() |
Collection<org.kie.api.event.process.ProcessEventListener> |
getProcessEventListeners() |
org.kie.api.runtime.process.ProcessInstance |
getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey) |
org.kie.api.runtime.process.ProcessInstance |
getProcessInstance(long id)
Returns the process instance with the given id.
|
org.kie.api.runtime.process.ProcessInstance |
getProcessInstance(long id,
boolean readOnly) |
Collection<org.kie.api.runtime.process.ProcessInstance> |
getProcessInstances()
Returns the list of process instances of this working memory.
|
InternalProcessRuntime |
getProcessRuntime() |
long |
getPropagationIdCounter() |
org.kie.api.runtime.rule.QueryResults |
getQueryResults(String queryName,
Object... arguments)
Retrieve the QueryResults of the specified query and arguments
|
RuleEventListenerSupport |
getRuleEventSupport() |
Collection<org.kie.api.event.rule.RuleRuntimeEventListener> |
getRuleRuntimeEventListeners()
Returns all event listeners.
|
RuleRuntimeEventSupport |
getRuleRuntimeEventSupport() |
org.kie.api.time.SessionClock |
getSessionClock()
Returns the session clock instance associated with this session
|
SessionConfiguration |
getSessionConfiguration() |
TimerService |
getTimerService()
Returns the TimerService instance (session clock) for this
session.
|
long |
getTimeToNextJob()
Returns the number of time units (usually ms) to
the next scheduled job
|
long |
getTotalFactCount()
Returns the total number of facts in the working memory, i.e., counting
all facts from all entry points.
|
TruthMaintenanceSystem |
getTruthMaintenanceSystem() |
WorkingMemoryEntryPoint |
getWorkingMemoryEntryPoint(String id)
Returns the interface instance for a given entry point, so
that the application can manage entry-point-scoped facts.
|
Map<String,WorkingMemoryEntryPoint> |
getWorkingMemoryEntryPoints() |
org.kie.api.runtime.process.WorkItemManager |
getWorkItemManager() |
void |
guardRuleUnit(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass,
Activation activation) |
void |
guardRuleUnit(org.kie.api.runtime.rule.RuleUnit ruleUnit,
Activation activation) |
void |
halt()
Stops rule firing after the current rule finishes executing
|
int |
hashCode() |
void |
initInitialFact(InternalKnowledgeBase kBase,
MarshallerReaderContext context) |
org.kie.api.runtime.rule.FactHandle |
insert(Object object) |
org.kie.api.runtime.rule.FactHandle |
insert(Object object,
boolean dynamic)
Insert a fact registering JavaBean
PropertyChangeListeners
on the Object to automatically trigger update calls
if dynamic is true . |
org.kie.api.runtime.rule.FactHandle |
insert(Object object,
boolean dynamic,
RuleImpl rule,
TerminalNode terminalNode) |
org.kie.api.runtime.rule.FactHandle |
insertAsync(Object object) |
InternalProcessRuntime |
internalGetProcessRuntime() |
boolean |
isAlive() |
boolean |
isSequential() |
Iterator<InternalFactHandle> |
iterateFactHandles()
Returns an Iterator for the FactHandles in the Working Memory.
|
Iterator<InternalFactHandle> |
iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
Returns an Iterator for the Objects in the Working Memory.
|
List |
iterateNonDefaultEntryPointObjectsToList() |
Iterator<?> |
iterateObjects()
Returns an Iterator for the Objects in the Working Memory.
|
Iterator<?> |
iterateObjects(org.kie.api.runtime.ObjectFilter filter)
Returns an Iterator for the Objects in the Working Memory.
|
List |
iterateObjectsToList() |
void |
notifyWaitOnRest() |
org.kie.api.runtime.rule.LiveQuery |
openLiveQuery(String query,
Object[] arguments,
org.kie.api.runtime.rule.ViewChangedEventListener listener) |
void |
prepareToFireActivation()
This method is called by the agenda before firing a new activation
to ensure the working memory is in a safe state to fire the activation.
|
void |
queueWorkingMemoryAction(WorkingMemoryAction action) |
void |
readExternal(ObjectInput in) |
void |
registerChannel(String name,
org.kie.api.runtime.Channel channel) |
void |
removeEventListener(org.kie.api.event.rule.AgendaEventListener listener)
Remove an event listener.
|
void |
removeEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener) |
void |
removeEventListener(org.kie.api.event.process.ProcessEventListener listener) |
void |
removeEventListener(org.kie.internal.event.rule.RuleEventListener listener) |
void |
removeEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
Remove an event listener.
|
void |
removeGlobal(String identifier) |
void |
reset() |
void |
reset(int handleId,
long handleCounter,
long propagationCounter) |
void |
retract(org.kie.api.runtime.rule.FactHandle handle) |
void |
setAgendaEventSupport(AgendaEventSupport agendaEventSupport) |
void |
setAsyncExceptionHandler(AsyncExceptionHandler handler)
Sets the AsyncExceptionHandler to handle exceptions thrown by the Agenda
Scheduler used for duration rules.
|
void |
setEndOperationListener(EndOperationListener listener) |
void |
setFocus(String focus)
Set the focus to the specified AgendaGroup
|
void |
setGlobal(String identifier,
Object value)
Set a specific instance as a global in this working memory.
|
void |
setGlobalResolver(GlobalResolver globalResolver)
Sets the GlobalResolver instance to be used when resolving globals, replaces the current GlobalResolver.
|
void |
setIdentifier(long id) |
void |
setLogger(org.kie.api.logger.KieRuntimeLogger logger) |
void |
setRuleRuntimeEventSupport(RuleRuntimeEventSupport workingMemoryEventSupport) |
<T,K,X extends TraitableBean> |
shed(Activation activation,
TraitableBean<K,X> core,
Class<T> trait) |
void |
signalEvent(String type,
Object event) |
void |
signalEvent(String type,
Object event,
long processInstanceId) |
void |
startBatchExecution() |
void |
startOperation()
This method must be called before starting any new work in the engine,
like inserting a new fact or firing a new rule.
|
org.kie.api.runtime.process.ProcessInstance |
startProcess(String processId)
Starts a new process instance for the process with the given id.
|
org.kie.api.runtime.process.ProcessInstance |
startProcess(String processId,
org.kie.internal.process.CorrelationKey correlationKey,
Map<String,Object> parameters) |
org.kie.api.runtime.process.ProcessInstance |
startProcess(String processId,
Map<String,Object> parameters)
Starts a new process instance for the process with the given id.
|
org.kie.api.runtime.process.ProcessInstance |
startProcessInstance(long processInstanceId) |
void |
submit(org.kie.api.runtime.KieSession.AtomicAction action) |
void |
switchToRuleUnit(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass) |
void |
switchToRuleUnit(org.kie.api.runtime.rule.RuleUnit ruleUnit) |
String |
toString() |
boolean |
tryDeactivate() |
void |
unregisterChannel(String name) |
void |
update(org.kie.api.runtime.rule.FactHandle factHandle) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
Object object) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
Object object,
BitMask mask,
Class<?> modifiedClass,
Activation activation) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
Object object,
String... modifiedProperties) |
void |
updateEntryPointsCache() |
void |
updateTraits(InternalFactHandle h,
BitMask mask,
Class<?> modifiedClass,
Activation activation) |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropagationList, getRuleUnitExecutor, onResume, onSuspend
public WrappedStatefulKnowledgeSessionForRHS(WorkingMemory workingMemory)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public org.kie.api.runtime.rule.QueryResults getQueryResults(String queryName, Object... arguments)
WorkingMemory
getQueryResults
in interface WorkingMemory
getQueryResults
in interface org.kie.api.runtime.rule.RuleRuntime
queryName
- The name of the query.arguments
- The arguments used for the querypublic org.kie.api.logger.KieRuntimeLogger getLogger()
getLogger
in interface org.kie.api.event.KieRuntimeEventManager
public void setLogger(org.kie.api.logger.KieRuntimeLogger logger)
public <T> T getKieRuntime(Class<T> cls)
getKieRuntime
in interface org.kie.api.runtime.KieSession
public <T> T createRuntimeService(Class<T> cls)
public Map<String,WorkingMemoryEntryPoint> getEntryPointMap()
public void addEventListener(org.kie.api.event.process.ProcessEventListener listener)
addEventListener
in interface org.kie.api.event.process.ProcessEventManager
public Collection<org.kie.api.event.process.ProcessEventListener> getProcessEventListeners()
getProcessEventListeners
in interface org.kie.api.event.process.ProcessEventManager
public void removeEventListener(org.kie.api.event.process.ProcessEventListener listener)
removeEventListener
in interface org.kie.api.event.process.ProcessEventManager
public org.kie.api.KieBase getKieBase()
getKieBase
in interface org.kie.api.runtime.KieRuntime
public boolean isAlive()
public void destroy()
destroy
in interface org.kie.api.runtime.KieSession
public void update(org.kie.api.runtime.rule.FactHandle factHandle)
public void abortProcessInstance(long id)
abortProcessInstance
in interface org.kie.api.runtime.process.ProcessRuntime
public void signalEvent(String type, Object event)
signalEvent
in interface org.kie.api.runtime.process.ProcessRuntime
public void signalEvent(String type, Object event, long processInstanceId)
signalEvent
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.Globals getGlobals()
getGlobals
in interface org.kie.api.runtime.KieRuntime
public <T> T execute(org.kie.api.command.Command<T> command)
execute
in interface org.kie.api.runtime.CommandExecutor
public void initInitialFact(InternalKnowledgeBase kBase, MarshallerReaderContext context)
public org.kie.api.runtime.rule.LiveQuery openLiveQuery(String query, Object[] arguments, org.kie.api.runtime.rule.ViewChangedEventListener listener)
openLiveQuery
in interface org.kie.api.runtime.rule.RuleRuntime
public void reset(int handleId, long handleCounter, long propagationCounter)
public void addEventListener(org.kie.internal.event.rule.RuleEventListener listener)
public void removeEventListener(org.kie.internal.event.rule.RuleEventListener listener)
public int getId()
getId
in interface org.kie.api.runtime.KieSession
public void fireUntilHalt()
fireUntilHalt
in interface org.kie.api.runtime.rule.StatefulRuleSession
public void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
fireUntilHalt
in interface org.kie.api.runtime.rule.StatefulRuleSession
public void executeQueuedActions()
public RuleRuntimeEventSupport getRuleRuntimeEventSupport()
getRuleRuntimeEventSupport
in interface EventSupport
public RuleEventListenerSupport getRuleEventSupport()
getRuleEventSupport
in interface EventSupport
public AgendaEventSupport getAgendaEventSupport()
getAgendaEventSupport
in interface EventSupport
public long getPropagationIdCounter()
public org.kie.api.runtime.process.ProcessInstance createProcessInstance(String processId, Map<String,Object> parameters)
createProcessInstance
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.ProcessInstance startProcessInstance(long processInstanceId)
startProcessInstance
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.ProcessInstance createProcessInstance(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)
public Map<String,WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints()
public long getLastIdleTimestamp()
public Map.Entry[] getActivationParameters(long activationId)
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)
public void registerChannel(String name, org.kie.api.runtime.Channel channel)
registerChannel
in interface org.kie.api.runtime.KieRuntime
public void unregisterChannel(String name)
unregisterChannel
in interface org.kie.api.runtime.KieRuntime
public void setEndOperationListener(EndOperationListener listener)
public List iterateObjectsToList()
public List iterateNonDefaultEntryPointObjectsToList()
public Map getActivationParameters(Activation activation)
public void addEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener)
addEventListener
in interface org.kie.api.event.kiebase.KieBaseEventManager
public org.kie.api.runtime.rule.FactHandle insert(Object object)
insert
in interface org.kie.api.runtime.rule.EntryPoint
public void submit(org.kie.api.runtime.KieSession.AtomicAction action)
submit
in interface org.kie.api.runtime.KieSession
public void removeEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener)
removeEventListener
in interface org.kie.api.event.kiebase.KieBaseEventManager
public void addEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
WorkingMemoryEventManager
addEventListener
in interface WorkingMemoryEventManager
addEventListener
in interface org.kie.api.event.rule.RuleRuntimeEventManager
listener
- The listener to add.public Collection<org.kie.api.event.kiebase.KieBaseEventListener> getKieBaseEventListeners()
getKieBaseEventListeners
in interface org.kie.api.event.kiebase.KieBaseEventManager
public org.kie.api.runtime.rule.FactHandle insert(Object object, boolean dynamic)
WorkingMemoryEntryPoint
PropertyChangeListeners
on the Object to automatically trigger update
calls
if dynamic
is true
.insert
in interface WorkingMemoryEntryPoint
object
- The fact object.dynamic
- true if Drools should add JavaBean
PropertyChangeListeners
to the object.public void update(org.kie.api.runtime.rule.FactHandle handle, Object object, BitMask mask, Class<?> modifiedClass, Activation activation)
update
in interface InternalWorkingMemoryActions
update
in interface WorkingMemoryEntryPoint
public void removeEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
WorkingMemoryEventManager
removeEventListener
in interface WorkingMemoryEventManager
removeEventListener
in interface org.kie.api.event.rule.RuleRuntimeEventManager
listener
- The listener to remove.public void delete(org.kie.api.runtime.rule.FactHandle factHandle, RuleImpl rule, TerminalNode terminalNode, org.kie.api.runtime.rule.FactHandle.State fhState)
delete
in interface WorkingMemoryEntryPoint
public void delete(org.kie.api.runtime.rule.FactHandle handle, RuleImpl rule, TerminalNode terminalNode)
delete
in interface WorkingMemoryEntryPoint
public org.kie.api.runtime.rule.FactHandle insert(Object object, boolean dynamic, RuleImpl rule, TerminalNode terminalNode)
insert
in interface InternalWorkingMemoryActions
public org.kie.api.runtime.rule.FactHandle insertAsync(Object object)
insertAsync
in interface InternalWorkingMemoryActions
public Collection<org.kie.api.event.rule.RuleRuntimeEventListener> getRuleRuntimeEventListeners()
WorkingMemoryEventManager
getRuleRuntimeEventListeners
in interface EventSupport
getRuleRuntimeEventListeners
in interface WorkingMemoryEventManager
getRuleRuntimeEventListeners
in interface org.kie.api.event.rule.RuleRuntimeEventManager
public void addEventListener(org.kie.api.event.rule.AgendaEventListener listener)
WorkingMemoryEventManager
addEventListener
in interface WorkingMemoryEventManager
addEventListener
in interface org.kie.api.event.rule.RuleRuntimeEventManager
listener
- The listener to add.public String getEntryPointId()
getEntryPointId
in interface org.kie.api.runtime.rule.EntryPoint
public void retract(org.kie.api.runtime.rule.FactHandle handle)
retract
in interface org.kie.api.runtime.rule.EntryPoint
public TruthMaintenanceSystem getTruthMaintenanceSystem()
getTruthMaintenanceSystem
in interface WorkingMemoryEntryPoint
public InternalAgenda getAgenda()
WorkingMemory
getAgenda
in interface InternalWorkingMemory
getAgenda
in interface WorkingMemory
getAgenda
in interface org.kie.api.runtime.rule.RuleRuntime
public long getIdentifier()
getIdentifier
in interface InternalWorkingMemory
getIdentifier
in interface org.kie.api.runtime.KieSession
public void setIdentifier(long id)
setIdentifier
in interface InternalWorkingMemory
public InternalWorkingMemory getInternalWorkingMemory()
getInternalWorkingMemory
in interface WorkingMemoryEntryPoint
public void setRuleRuntimeEventSupport(RuleRuntimeEventSupport workingMemoryEventSupport)
setRuleRuntimeEventSupport
in interface InternalWorkingMemory
public void removeEventListener(org.kie.api.event.rule.AgendaEventListener listener)
WorkingMemoryEventManager
removeEventListener
in interface WorkingMemoryEventManager
removeEventListener
in interface org.kie.api.event.rule.RuleRuntimeEventManager
listener
- The listener to remove.public void updateTraits(InternalFactHandle h, BitMask mask, Class<?> modifiedClass, Activation activation)
updateTraits
in interface InternalWorkingMemoryActions
public void update(org.kie.api.runtime.rule.FactHandle handle, Object object)
update
in interface org.kie.api.runtime.rule.EntryPoint
public void update(org.kie.api.runtime.rule.FactHandle handle, Object object, String... modifiedProperties)
update
in interface org.kie.api.runtime.rule.EntryPoint
public void setAgendaEventSupport(AgendaEventSupport agendaEventSupport)
setAgendaEventSupport
in interface InternalWorkingMemory
public void setGlobal(String identifier, Object value)
WorkingMemory
setGlobal
in interface WorkingMemory
setGlobal
in interface org.kie.api.runtime.KieRuntime
identifier
- the identifier under which to populate the datavalue
- the global value, cannot be nullpublic void reset()
reset
in interface WorkingMemoryEntryPoint
public <T,K,X extends TraitableBean> Thing<K> shed(Activation activation, TraitableBean<K,X> core, Class<T> trait)
shed
in interface InternalWorkingMemoryActions
public <T extends Memory> T getNodeMemory(MemoryFactory<T> node)
getNodeMemory
in interface InternalWorkingMemory
public FactHandleFactory getHandleFactory()
getHandleFactory
in interface WorkingMemoryEntryPoint
public Collection<org.kie.api.event.rule.AgendaEventListener> getAgendaEventListeners()
WorkingMemoryEventManager
getAgendaEventListeners
in interface EventSupport
getAgendaEventListeners
in interface WorkingMemoryEventManager
getAgendaEventListeners
in interface org.kie.api.event.rule.RuleRuntimeEventManager
public void clearNodeMemory(MemoryFactory node)
clearNodeMemory
in interface InternalWorkingMemory
public <T,K> T don(Activation activation, K core, Collection<Class<? extends Thing>> traits, boolean b, org.kie.api.internal.runtime.beliefs.Mode[] modes)
don
in interface InternalWorkingMemoryActions
public NodeMemories getNodeMemories()
getNodeMemories
in interface InternalWorkingMemory
public long getNextPropagationIdCounter()
getNextPropagationIdCounter
in interface InternalWorkingMemory
public ObjectStore getObjectStore()
getObjectStore
in interface InternalWorkingMemory
getObjectStore
in interface WorkingMemoryEntryPoint
public <T,K> T don(Activation activation, K core, Class<T> trait, boolean b, org.kie.api.internal.runtime.beliefs.Mode[] modes)
don
in interface InternalWorkingMemoryActions
public void queueWorkingMemoryAction(WorkingMemoryAction action)
queueWorkingMemoryAction
in interface InternalWorkingMemory
public void delete(org.kie.api.runtime.rule.FactHandle handle)
delete
in interface org.kie.api.runtime.rule.EntryPoint
public void dispose()
WorkingMemoryEntryPoint
dispose
in interface WorkingMemoryEntryPoint
dispose
in interface org.kie.api.runtime.KieSession
public FactHandleFactory getFactHandleFactory()
getFactHandleFactory
in interface InternalWorkingMemory
public Object getGlobal(String identifier)
WorkingMemory
getGlobal
in interface WorkingMemory
getGlobal
in interface org.kie.api.runtime.KieRuntime
public EntryPointId getEntryPoint()
getEntryPoint
in interface InternalWorkingMemory
getEntryPoint
in interface WorkingMemoryEntryPoint
public EntryPointNode getEntryPointNode()
getEntryPointNode
in interface InternalWorkingMemory
getEntryPointNode
in interface WorkingMemoryEntryPoint
public org.kie.api.runtime.rule.EntryPoint getEntryPoint(String name)
getEntryPoint
in interface InternalWorkingMemory
getEntryPoint
in interface org.kie.api.runtime.rule.RuleRuntime
public void delete(org.kie.api.runtime.rule.FactHandle handle, org.kie.api.runtime.rule.FactHandle.State fhState)
delete
in interface org.kie.api.runtime.rule.EntryPoint
public org.kie.api.runtime.Environment getEnvironment()
getEnvironment
in interface WorkingMemory
getEnvironment
in interface org.kie.api.runtime.KieRuntime
public void setGlobalResolver(GlobalResolver globalResolver)
WorkingMemory
setGlobalResolver
in interface WorkingMemory
public org.kie.api.runtime.rule.FactHandle getFactHandleByIdentity(Object object)
InternalWorkingMemory
getFactHandleByIdentity
in interface InternalWorkingMemory
getFactHandleByIdentity
in interface WorkingMemory
getFactHandleByIdentity
in interface WorkingMemoryEntryPoint
public GlobalResolver getGlobalResolver()
WorkingMemory
getGlobalResolver
in interface WorkingMemory
public InternalKnowledgeBase getKnowledgeBase()
WorkingMemory
RuleBase
for this working memory.getKnowledgeBase
in interface WorkingMemory
getKnowledgeBase
in interface WorkingMemoryEntryPoint
RuleBase
.public Lock getLock()
getLock
in interface InternalWorkingMemory
public boolean isSequential()
isSequential
in interface InternalWorkingMemory
public int fireAllRules()
WorkingMemory
fireAllRules
in interface WorkingMemory
fireAllRules
in interface org.kie.api.runtime.rule.StatefulRuleSession
public ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry()
getObjectTypeConfigurationRegistry
in interface InternalWorkingMemory
getObjectTypeConfigurationRegistry
in interface WorkingMemoryEntryPoint
public InternalFactHandle getInitialFactHandle()
getInitialFactHandle
in interface InternalWorkingMemory
public int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
WorkingMemory
fireAllRules
in interface WorkingMemory
fireAllRules
in interface org.kie.api.runtime.rule.StatefulRuleSession
public org.kie.api.runtime.Calendars getCalendars()
getCalendars
in interface InternalWorkingMemory
getCalendars
in interface org.kie.api.runtime.KieRuntime
public TimerService getTimerService()
InternalWorkingMemory
getTimerService
in interface InternalWorkingMemory
public int fireAllRules(int fireLimit)
WorkingMemory
fireAllRules
in interface WorkingMemory
fireAllRules
in interface org.kie.api.runtime.rule.StatefulRuleSession
public InternalKnowledgeRuntime getKnowledgeRuntime()
getKnowledgeRuntime
in interface InternalWorkingMemory
public int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int fireLimit)
WorkingMemory
fireAllRules
in interface WorkingMemory
fireAllRules
in interface org.kie.api.runtime.rule.StatefulRuleSession
public Map<String,org.kie.api.runtime.Channel> getChannels()
InternalWorkingMemory
getChannels
in interface InternalWorkingMemory
getChannels
in interface org.kie.api.runtime.KieRuntime
public Collection<? extends org.kie.api.runtime.rule.EntryPoint> getEntryPoints()
getEntryPoints
in interface InternalWorkingMemory
getEntryPoints
in interface org.kie.api.runtime.rule.RuleRuntime
public Object getObject(org.kie.api.runtime.rule.FactHandle handle)
WorkingMemory
FactHandle
.getObject
in interface WorkingMemory
getObject
in interface org.kie.api.runtime.rule.EntryPoint
handle
- The fact handle.public SessionConfiguration getSessionConfiguration()
getSessionConfiguration
in interface InternalWorkingMemory
getSessionConfiguration
in interface org.kie.api.runtime.KieRuntime
public Collection<? extends Object> getObjects()
getObjects
in interface org.kie.api.runtime.rule.EntryPoint
public void startBatchExecution()
startBatchExecution
in interface InternalWorkingMemory
public void endBatchExecution()
endBatchExecution
in interface InternalWorkingMemory
public void startOperation()
InternalWorkingMemory
startOperation
in interface InternalWorkingMemory
public org.kie.api.runtime.rule.FactHandle getFactHandle(Object object)
WorkingMemory
FactHandle
associated with an Object.getFactHandle
in interface WorkingMemory
getFactHandle
in interface org.kie.api.runtime.rule.EntryPoint
object
- The object.public Iterator<?> iterateObjects()
WorkingMemory
iterateObjects
in interface WorkingMemory
public void endOperation()
InternalWorkingMemory
endOperation
in interface InternalWorkingMemory
public Iterator<?> iterateObjects(org.kie.api.runtime.ObjectFilter filter)
WorkingMemory
iterateObjects
in interface WorkingMemory
public Collection<? extends Object> getObjects(org.kie.api.runtime.ObjectFilter filter)
getObjects
in interface org.kie.api.runtime.rule.EntryPoint
public long getIdleTime()
InternalWorkingMemory
getIdleTime
in interface InternalWorkingMemory
public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles()
getFactHandles
in interface org.kie.api.runtime.rule.EntryPoint
public long getTimeToNextJob()
InternalWorkingMemory
getTimeToNextJob
in interface InternalWorkingMemory
public Iterator<InternalFactHandle> iterateFactHandles()
WorkingMemory
iterateFactHandles
in interface WorkingMemory
public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles(org.kie.api.runtime.ObjectFilter filter)
getFactHandles
in interface org.kie.api.runtime.rule.EntryPoint
public void updateEntryPointsCache()
updateEntryPointsCache
in interface InternalWorkingMemory
public void prepareToFireActivation()
InternalWorkingMemory
prepareToFireActivation
in interface InternalWorkingMemory
public Iterator<InternalFactHandle> iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
WorkingMemory
iterateFactHandles
in interface WorkingMemory
public long getFactCount()
getFactCount
in interface org.kie.api.runtime.rule.EntryPoint
public void activationFired()
InternalWorkingMemory
activationFired
in interface InternalWorkingMemory
public long getTotalFactCount()
InternalWorkingMemory
getTotalFactCount
in interface InternalWorkingMemory
public void setFocus(String focus)
WorkingMemory
setFocus
in interface WorkingMemory
public InternalProcessRuntime getProcessRuntime()
getProcessRuntime
in interface InternalWorkingMemory
public InternalProcessRuntime internalGetProcessRuntime()
internalGetProcessRuntime
in interface InternalWorkingMemory
public void closeLiveQuery(InternalFactHandle factHandle)
closeLiveQuery
in interface InternalWorkingMemory
public void addPropagation(PropagationEntry propagationEntry)
addPropagation
in interface InternalWorkingMemory
public void flushPropagations()
flushPropagations
in interface InternalWorkingMemory
public void activate()
activate
in interface InternalWorkingMemory
public void deactivate()
deactivate
in interface InternalWorkingMemory
public boolean tryDeactivate()
tryDeactivate
in interface InternalWorkingMemory
public void setAsyncExceptionHandler(AsyncExceptionHandler handler)
WorkingMemory
setAsyncExceptionHandler
in interface WorkingMemory
public Iterator<? extends PropagationEntry> getActionsIterator()
getActionsIterator
in interface InternalWorkingMemory
public void removeGlobal(String identifier)
removeGlobal
in interface InternalWorkingMemory
public void notifyWaitOnRest()
notifyWaitOnRest
in interface InternalWorkingMemory
public void cancelActivation(Activation activation, boolean declarativeAgenda)
cancelActivation
in interface InternalWorkingMemory
public void clearAgenda()
WorkingMemory
clearAgenda
in interface WorkingMemory
public void clearAgendaGroup(String group)
WorkingMemory
clearAgendaGroup
in interface WorkingMemory
public void clearActivationGroup(String group)
WorkingMemory
clearActivationGroup
in interface WorkingMemory
public void clearRuleFlowGroup(String group)
WorkingMemory
clearRuleFlowGroup
in interface WorkingMemory
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId)
WorkingMemory
startProcess
in interface WorkingMemory
startProcess
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, Map<String,Object> parameters)
WorkingMemory
startProcess
in interface WorkingMemory
startProcess
in interface org.kie.api.runtime.process.ProcessRuntime
public Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
WorkingMemory
getProcessInstances
in interface WorkingMemory
getProcessInstances
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id)
WorkingMemory
getProcessInstance
in interface WorkingMemory
getProcessInstance
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id, boolean readOnly)
getProcessInstance
in interface WorkingMemory
getProcessInstance
in interface org.kie.api.runtime.process.ProcessRuntime
public org.kie.api.runtime.process.WorkItemManager getWorkItemManager()
getWorkItemManager
in interface WorkingMemory
getWorkItemManager
in interface org.kie.api.runtime.process.ProcessRuntime
public void halt()
WorkingMemory
halt
in interface WorkingMemory
halt
in interface org.kie.api.runtime.rule.RuleRuntime
public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String id)
WorkingMemory
getWorkingMemoryEntryPoint
in interface WorkingMemory
getWorkingMemoryEntryPoint
in interface WorkingMemoryEntryPoint
id
- the id of the entry point, as defined in the rules filepublic org.kie.api.time.SessionClock getSessionClock()
WorkingMemory
getSessionClock
in interface WorkingMemory
getSessionClock
in interface org.kie.api.runtime.KieRuntime
public void switchToRuleUnit(org.kie.api.runtime.rule.RuleUnit ruleUnit)
public void switchToRuleUnit(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass)
public void guardRuleUnit(org.kie.api.runtime.rule.RuleUnit ruleUnit, Activation activation)
public void guardRuleUnit(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass, Activation activation)
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.