public class WorkExecutorServiceImpl extends java.lang.Object implements WorkExecutorService, WorkExecutionCallback, ObservableExecutor
Constructor and Description |
---|
WorkExecutorServiceImpl(BonitaExecutorServiceFactory bonitaExecutorServiceFactory,
TechnicalLoggerService loggerService,
long workTerminationTimeout,
WorkExecutionAuditor workExecutionAuditor) |
Modifier and Type | Method and Description |
---|---|
void |
execute(WorkDescriptor work) |
long |
getExecuted() |
long |
getPendings() |
long |
getRunnings() |
boolean |
isStopped() |
void |
notifyNodeStopped(java.lang.String nodeName) |
void |
onFailure(WorkDescriptor work,
BonitaWork bonitaWork,
java.util.Map<java.lang.String,java.lang.Object> context,
java.lang.Throwable thrown) |
void |
onSuccess(WorkDescriptor work) |
void |
pause()
Temporary halt the execution of this service.
|
void |
resume()
resume the execution the service
|
void |
start()
Start the service
|
void |
stop() |
public WorkExecutorServiceImpl(BonitaExecutorServiceFactory bonitaExecutorServiceFactory, TechnicalLoggerService loggerService, long workTerminationTimeout, WorkExecutionAuditor workExecutionAuditor)
public void execute(WorkDescriptor work)
execute
in interface WorkExecutorService
public void onSuccess(WorkDescriptor work)
onSuccess
in interface WorkExecutionCallback
public void onFailure(WorkDescriptor work, BonitaWork bonitaWork, java.util.Map<java.lang.String,java.lang.Object> context, java.lang.Throwable thrown)
onFailure
in interface WorkExecutionCallback
public void stop()
stop
in interface LifecycleService
public void start()
LifecycleService
start
in interface LifecycleService
public void pause() throws SWorkException
LifecycleService
pause
in interface LifecycleService
SWorkException
public void resume()
LifecycleService
resume
in interface LifecycleService
public boolean isStopped()
isStopped
in interface WorkExecutorService
public void notifyNodeStopped(java.lang.String nodeName)
notifyNodeStopped
in interface WorkExecutorService
public long getPendings()
getPendings
in interface ObservableExecutor
public long getRunnings()
getRunnings
in interface ObservableExecutor
public long getExecuted()
getExecuted
in interface ObservableExecutor