|
jBPM :: RuntimeManager 6.2.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbpm.runtime.manager.impl.AbstractRuntimeManager
org.jbpm.runtime.manager.impl.SingletonRuntimeManager
public class SingletonRuntimeManager
This RuntimeManager is backed by a "Singleton" strategy, meaning that only one RuntimeEngine instance will
exist for for the given RuntimeManager instance. The RuntimeEngine will be synchronized to make sure it will work
properly in multi-threaded environments. However, this might cause some performance issues due to sequential execution.
An important aspect of this manager is that it will persists it's identifier as a temporary file to keep track of the
KieSession it was using to maintain its state: for example, the session state including (drools) facts, etc.
The mentioned file is named as follows:
manager.getIdentifier()-jbpmSessionId.ser
For example, for default named manager it will be:
default-singleton-jbpmSessionId.ser
The location of the file will be one of the following, it is resolved in below order:
| Field Summary |
|---|
| Fields inherited from class org.jbpm.runtime.manager.impl.AbstractRuntimeManager |
|---|
cacheManager, closed, deploymentDescriptor, engineInitEager, environment, identifier, registry, securityManager |
| Constructor Summary | |
|---|---|
SingletonRuntimeManager()
|
|
SingletonRuntimeManager(org.kie.api.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
disposeRuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine runtime)
|
org.kie.internal.runtime.manager.SessionFactory |
getFactory()
|
protected String |
getLocation()
|
protected int |
getPersistedSessionId(String location,
String identifier)
Retrieves session id from serialized file named jbpmSessionId.ser from given location. |
org.kie.api.runtime.manager.RuntimeEngine |
getRuntimeEngine(org.kie.api.runtime.manager.Context context)
|
org.kie.internal.runtime.manager.TaskServiceFactory |
getTaskServiceFactory()
|
void |
init()
|
protected void |
persistSessionId(String location,
String identifier,
int ksessionId)
Stores gives ksessionId in a serialized file in given location under jbpmSessionId.ser file name |
void |
setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
|
void |
setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
|
void |
validate(org.kie.api.runtime.KieSession ksession,
org.kie.api.runtime.manager.Context<?> context)
|
| Methods inherited from class org.jbpm.runtime.manager.impl.AbstractRuntimeManager |
|---|
attachManager, canDestroy, checkPermission, close, configureRuntimeOnTaskService, getCacheManager, getDeploymentDescriptor, getEnvironment, getIdentifier, getTransactionManager, hasEnvironmentEntry, isClosed, registerDisposeCallback, registerItems, removeRuntimeFromTaskService, setCacheManager, setDeploymentDescriptor, setEnvironment, setIdentifier, setSecurityManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingletonRuntimeManager()
public SingletonRuntimeManager(org.kie.api.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
| Method Detail |
|---|
public void init()
init in class AbstractRuntimeManagerpublic org.kie.api.runtime.manager.RuntimeEngine getRuntimeEngine(org.kie.api.runtime.manager.Context context)
public void validate(org.kie.api.runtime.KieSession ksession,
org.kie.api.runtime.manager.Context<?> context)
throws IllegalStateException
IllegalStateExceptionpublic void disposeRuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine runtime)
public void close()
close in interface org.kie.api.runtime.manager.RuntimeManagerclose in class AbstractRuntimeManager
protected int getPersistedSessionId(String location,
String identifier)
location - directory where jbpmSessionId.ser file should beidentifier - of the manager owning this ksessionId
protected void persistSessionId(String location,
String identifier,
int ksessionId)
location - directory where serialized file should be storedidentifier - of the manager owning this ksessionIdksessionId - value of ksessionId to be storedprotected String getLocation()
public org.kie.internal.runtime.manager.SessionFactory getFactory()
public void setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
public org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory()
public void setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
|
jBPM :: RuntimeManager 6.2.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||