@Component(value="cuba_Executions") public class ExecutionsImpl extends java.lang.Object implements Executions
Modifier and Type | Class and Description |
---|---|
protected class |
ExecutionsImpl.CancelExecutionClusterListener |
protected static class |
ExecutionsImpl.CancelExecutionMessage |
Modifier and Type | Field and Description |
---|---|
protected ClusterManagerAPI |
clusterManager |
protected static java.lang.String |
EXECUTIONS_ATTR |
protected TimeSource |
timeSource |
protected UserSessionsAPI |
userSessionsAPI |
protected UserSessionSource |
userSessionSource |
NAME
Constructor and Description |
---|
ExecutionsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cancelExecution(java.util.UUID userSessionId,
java.lang.String group,
java.lang.String key)
Cancel execution context:
- cancel all resources with context.
|
protected void |
cancelLocally(UserSession userSession,
java.lang.String group,
java.lang.String key) |
void |
endExecution()
INTERNAL
End execution context for the current thread.
|
protected java.util.List<ExecutionContext> |
findExecutionContextsByKeyAndGroup(UserSession userSession,
java.lang.String group,
java.lang.String key) |
ExecutionContext |
getCurrentContext()
INTERNAL
|
void |
init() |
protected void |
removeExecutionContextFromUserSession(UserSession userSession,
ExecutionContext context) |
ExecutionContext |
startExecution(java.lang.String key,
java.lang.String group)
INTERNAL
Start execution context for the current thread.
|
protected static final java.lang.String EXECUTIONS_ATTR
@Inject protected TimeSource timeSource
@Inject protected UserSessionSource userSessionSource
@Inject protected UserSessionsAPI userSessionsAPI
@Inject protected ClusterManagerAPI clusterManager
@PostConstruct public void init()
public ExecutionContext startExecution(java.lang.String key, java.lang.String group)
Executions
startExecution
in interface Executions
key
- - unique identifier of executiongroup
- - group is used for grouping execution by type.
E.g. group 'Reporting' is used for all reporting
module executionspublic void endExecution()
Executions
endExecution
in interface Executions
public void cancelExecution(java.util.UUID userSessionId, java.lang.String group, java.lang.String key)
Executions
cancelExecution
in interface Executions
userSessionId
- - user session in that started execution contextgroup
- - group of started execution contextkey
- - key of started execution contextpublic ExecutionContext getCurrentContext()
Executions
getCurrentContext
in interface Executions
protected void cancelLocally(UserSession userSession, java.lang.String group, java.lang.String key)
protected java.util.List<ExecutionContext> findExecutionContextsByKeyAndGroup(UserSession userSession, java.lang.String group, java.lang.String key)
protected void removeExecutionContextFromUserSession(UserSession userSession, ExecutionContext context)