public interface JobManager
| Modifier and Type | Method and Description |
|---|---|
AbstractJobEntity |
activateSuspendedJob(SuspendedJobEntity job)
Transforms a
SuspendedJobEntity back to an AbstractJobEntity
(i.e. |
JobEntity |
createAsyncJob(ExecutionEntity execution,
boolean exclusive)
Creates an async job for the provided
ExecutionEntity, so that
it can be continued later in a background thread. |
TimerJobEntity |
createTimerJob(TimerEventDefinition timerEventDefinition,
boolean interrupting,
ExecutionEntity execution,
String timerEventType,
String jobHandlerConfiguration)
Creates a
TimerJobEntity based on the current ExecutionEntity and the
configuration in the TimerEventDefinition. |
void |
execute(Job job)
Execute a job, which means that the logic (async logic, timer that fires, etc)
is executed, typically by a background thread of an executor.
|
JobEntity |
moveDeadLetterJobToExecutableJob(DeadLetterJobEntity deadLetterJobEntity,
int retries)
Transforms a
DeadLetterJobEntity to a JobEntity, thus
making it executable again. |
DeadLetterJobEntity |
moveJobToDeadLetterJob(AbstractJobEntity job)
Transforms an
AbstractJobEntity to a DeadLetterJobEntity. |
SuspendedJobEntity |
moveJobToSuspendedJob(AbstractJobEntity job)
Moves an
AbstractJobEntity to become a SuspendedJobEntity,
such that the AsyncExecutor won't pick it up anymore for execution. |
TimerJobEntity |
moveJobToTimerJob(AbstractJobEntity job)
Moves an
AbstractJobEntity to become a TimerJobEntity. |
JobEntity |
moveTimerJobToExecutableJob(TimerJobEntity timerJob)
Moves a
TimerJobEntity to become an async JobEntity. |
void |
scheduleAsyncJob(JobEntity job)
Schedules and async job.
|
void |
scheduleTimerJob(TimerJobEntity timerJob)
Schedules a timer, meaning it will be inserted in the datastore.
|
void |
setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration)
The ProcessEngineCongiguration instance will be passed when the
ProcessEngine is built. |
void |
unacquire(Job job)
Unacquires a job, meaning that this job was previously locked, and
it is now freed to be acquired by other executor nodes.
|
void execute(Job job)
void unacquire(Job job)
JobEntity createAsyncJob(ExecutionEntity execution, boolean exclusive)
ExecutionEntity, so that
it can be continued later in a background thread.void scheduleAsyncJob(JobEntity job)
AsyncExecutor is running, it
can be executed immediately after the transaction. Otherwise it can
be picked up by other executors.TimerJobEntity createTimerJob(TimerEventDefinition timerEventDefinition, boolean interrupting, ExecutionEntity execution, String timerEventType, String jobHandlerConfiguration)
TimerJobEntity based on the current ExecutionEntity and the
configuration in the TimerEventDefinition.void scheduleTimerJob(TimerJobEntity timerJob)
JobEntity moveTimerJobToExecutableJob(TimerJobEntity timerJob)
TimerJobEntity to become an async JobEntity.
This happens for example when the due date of a timer is reached,
the timer entity then becomes a 'regular' async job that can be
picked up by the AsyncExecutor.TimerJobEntity moveJobToTimerJob(AbstractJobEntity job)
AbstractJobEntity to become a TimerJobEntity.
This happens for example when an async job is executed and fails.
It then becomes a timer, as it needs to be retried later.SuspendedJobEntity moveJobToSuspendedJob(AbstractJobEntity job)
AbstractJobEntity to become a SuspendedJobEntity,
such that the AsyncExecutor won't pick it up anymore for execution.AbstractJobEntity activateSuspendedJob(SuspendedJobEntity job)
SuspendedJobEntity back to an AbstractJobEntity
(i.e. to what it was originally). The job will now again be able to
picked up by the AsyncExecutor.DeadLetterJobEntity moveJobToDeadLetterJob(AbstractJobEntity job)
AbstractJobEntity to a DeadLetterJobEntity.
This means that the job has been tried a configurable amount of times,
but kept failing.JobEntity moveDeadLetterJobToExecutableJob(DeadLetterJobEntity deadLetterJobEntity, int retries)
DeadLetterJobEntity to a JobEntity, thus
making it executable again. Note that a 'retries' parameter needs to be passed,
as the job got into the deadletter table because of it failed and retries became 0.void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration)
ProcessEngine is built.Copyright © 2010–2018 Alfresco. All rights reserved.