Class TimerJobEntityManagerImpl
java.lang.Object
org.flowable.common.engine.impl.persistence.entity.AbstractEntityManager<EntityImpl,DM>
org.flowable.common.engine.impl.persistence.entity.AbstractServiceEngineEntityManager<JobServiceConfiguration,EntityImpl,DM>
org.flowable.job.service.impl.persistence.entity.AbstractJobServiceEngineEntityManager<T,DM>
org.flowable.job.service.impl.persistence.entity.JobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
org.flowable.job.service.impl.persistence.entity.TimerJobEntityManagerImpl
- All Implemented Interfaces:
EntityManager<TimerJobEntity>
,JobInfoEntityManager<TimerJobEntity>
,TimerJobEntityManager
public class TimerJobEntityManagerImpl
extends JobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
implements TimerJobEntityManager
- Author:
- Tijs Rademakers
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractServiceEngineEntityManager
serviceConfiguration
Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntityManager
dataManager, engineType
-
Constructor Summary
ConstructorsConstructorDescriptionTimerJobEntityManagerImpl
(JobServiceConfiguration jobServiceConfiguration, TimerJobDataManager jobDataManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
bulkDeleteTimerJobsWithoutRevisionCheck
(List<TimerJobEntity> timerJobEntities) void
bulkUpdateJobLockWithoutRevisionCheck
(List<TimerJobEntity> timerJobEntities, String lockOwner, Date lockExpirationTime) protected Date
calculateNextTimer
(JobEntity timerEntity, VariableScope variableScope) protected int
calculateRepeatValue
(JobEntity timerEntity) createAndCalculateNextTimer
(JobEntity timerEntity, VariableScope variableScope) Creates a newTimerJobEntity
, typically when a timer is used in a repeating way.protected TimerJobEntity
createTimer
(JobEntity te) void
delete
(TimerJobEntity jobEntity) void
delete
(TimerJobEntity jobEntity, boolean fireDeleteEvent) protected boolean
doInsert
(TimerJobEntity jobEntity, boolean fireCreateEvent) findJobByCorrelationId
(String correlationId) Find the timer job with the given correlation id.long
findJobCountByQueryCriteria
(TimerJobQueryImpl jobQuery) Same asTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl)
, but only returns a count and not the instances itself.Returns allJobEntity
instances related to on ExecutionEntity.Returns allJobEntity
instances related to one process instance ExecutionEntity.findJobsByQueryCriteria
(TimerJobQueryImpl jobQuery) Executes aJobQueryImpl
and returns the matchingTimerJobEntity
instances.findJobsByScopeIdAndSubScopeId
(String scopeId, String subScopeId) Returns allTimerJobEntity
for the given scope and subscope.findJobsByTypeAndProcessDefinitionId
(String jobHandlerType, String processDefinitionId) Returns theTimerJobEntity
for a given process definition.findJobsByTypeAndProcessDefinitionKeyAndTenantId
(String jobHandlerType, String processDefinitionKey, String tenantId) The same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String)
, but by key and for a specific tenantId.findJobsByTypeAndProcessDefinitionKeyNoTenantId
(String jobHandlerType, String processDefinitionKey) The same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String)
, but by key and specifically for the 'no tenant' mode.void
insert
(TimerJobEntity jobEntity) void
insert
(TimerJobEntity jobEntity, boolean fireCreateEvent) boolean
insertTimerJobEntity
(TimerJobEntity timerJobEntity) Insert theTimerJobEntity
, similar to insert(TimerJobEntity), but returns a boolean in case the insert did not go through.protected boolean
isValidTime
(JobEntity timerEntity, Date newTimerDate, VariableScope variableScope) protected void
setNewRepeat
(JobEntity timerEntity, int newRepeatValue) void
updateJobTenantIdForDeployment
(String deploymentId, String newTenantId) Changes the tenantId for all jobs related to a given DeploymentEntity.Methods inherited from class org.flowable.job.service.impl.persistence.entity.JobInfoEntityManagerImpl
findExpiredJobs, findJobsToExecute, resetExpiredJob
Methods inherited from class org.flowable.job.service.impl.persistence.entity.AbstractJobServiceEngineEntityManager
bulkDeleteByteArraysById, createEntityEvent, deleteByteArrayRef
Methods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractServiceEngineEntityManager
getClock, getEventDispatcher, getServiceConfiguration
Methods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntityManager
create, delete, findById, fireEntityDeletedEvent, fireEntityInsertedEvent, fireEntityUpdatedEvent, getDataManager, setDataManager, update, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.flowable.common.engine.impl.persistence.entity.EntityManager
create, delete, findById, update, update
Methods inherited from interface org.flowable.job.service.impl.persistence.entity.JobInfoEntityManager
findExpiredJobs, findJobsToExecute, findJobsToExecuteAndLockInBulk, resetExpiredJob
-
Constructor Details
-
TimerJobEntityManagerImpl
public TimerJobEntityManagerImpl(JobServiceConfiguration jobServiceConfiguration, TimerJobDataManager jobDataManager)
-
-
Method Details
-
createAndCalculateNextTimer
public TimerJobEntity createAndCalculateNextTimer(JobEntity timerEntity, VariableScope variableScope) Description copied from interface:TimerJobEntityManager
Creates a newTimerJobEntity
, typically when a timer is used in a repeating way. The returnsTimerJobEntity
is not yet inserted.Returns null if the timer has finished its repetitions.
- Specified by:
createAndCalculateNextTimer
in interfaceTimerJobEntityManager
-
findJobByCorrelationId
Description copied from interface:TimerJobEntityManager
Find the timer job with the given correlation id.- Specified by:
findJobByCorrelationId
in interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionId(String jobHandlerType, String processDefinitionId) Description copied from interface:TimerJobEntityManager
Returns theTimerJobEntity
for a given process definition.This is for example used when deleting a process definition: it finds the
TimerJobEntity
representing the timer start events.- Specified by:
findJobsByTypeAndProcessDefinitionId
in interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionKeyNoTenantId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType, String processDefinitionKey) Description copied from interface:TimerJobEntityManager
The same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String)
, but by key and specifically for the 'no tenant' mode.- Specified by:
findJobsByTypeAndProcessDefinitionKeyNoTenantId
in interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionKeyAndTenantId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType, String processDefinitionKey, String tenantId) Description copied from interface:TimerJobEntityManager
The same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String)
, but by key and for a specific tenantId.- Specified by:
findJobsByTypeAndProcessDefinitionKeyAndTenantId
in interfaceTimerJobEntityManager
-
findJobsByExecutionId
Description copied from interface:JobInfoEntityManager
Returns allJobEntity
instances related to on ExecutionEntity.- Specified by:
findJobsByExecutionId
in interfaceJobInfoEntityManager<TimerJobEntity>
- Overrides:
findJobsByExecutionId
in classJobInfoEntityManagerImpl<TimerJobEntity,
TimerJobDataManager>
-
findJobsByProcessInstanceId
Description copied from interface:JobInfoEntityManager
Returns allJobEntity
instances related to one process instance ExecutionEntity.- Specified by:
findJobsByProcessInstanceId
in interfaceJobInfoEntityManager<TimerJobEntity>
- Overrides:
findJobsByProcessInstanceId
in classJobInfoEntityManagerImpl<TimerJobEntity,
TimerJobDataManager>
-
findJobsByScopeIdAndSubScopeId
Description copied from interface:TimerJobEntityManager
Returns allTimerJobEntity
for the given scope and subscope.- Specified by:
findJobsByScopeIdAndSubScopeId
in interfaceTimerJobEntityManager
-
findJobsByQueryCriteria
Description copied from interface:TimerJobEntityManager
Executes aJobQueryImpl
and returns the matchingTimerJobEntity
instances.- Specified by:
findJobsByQueryCriteria
in interfaceTimerJobEntityManager
-
findJobCountByQueryCriteria
Description copied from interface:TimerJobEntityManager
Same asTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl)
, but only returns a count and not the instances itself.- Specified by:
findJobCountByQueryCriteria
in interfaceTimerJobEntityManager
-
updateJobTenantIdForDeployment
Description copied from interface:JobInfoEntityManager
Changes the tenantId for all jobs related to a given DeploymentEntity.- Specified by:
updateJobTenantIdForDeployment
in interfaceJobInfoEntityManager<TimerJobEntity>
- Overrides:
updateJobTenantIdForDeployment
in classJobInfoEntityManagerImpl<TimerJobEntity,
TimerJobDataManager>
-
insertTimerJobEntity
Description copied from interface:TimerJobEntityManager
Insert theTimerJobEntity
, similar to insert(TimerJobEntity), but returns a boolean in case the insert did not go through. This could happen if the execution related to theTimerJobEntity
has been removed (for example due to a task complete for a timer boundary on that task).- Specified by:
insertTimerJobEntity
in interfaceTimerJobEntityManager
-
insert
- Specified by:
insert
in interfaceEntityManager<TimerJobEntity>
- Overrides:
insert
in classAbstractEntityManager<TimerJobEntity,
TimerJobDataManager>
-
insert
- Specified by:
insert
in interfaceEntityManager<TimerJobEntity>
- Overrides:
insert
in classAbstractEntityManager<TimerJobEntity,
TimerJobDataManager>
-
doInsert
-
delete
- Specified by:
delete
in interfaceEntityManager<TimerJobEntity>
- Overrides:
delete
in classAbstractEntityManager<TimerJobEntity,
TimerJobDataManager>
-
delete
- Specified by:
delete
in interfaceEntityManager<TimerJobEntity>
- Overrides:
delete
in classAbstractEntityManager<TimerJobEntity,
TimerJobDataManager>
-
bulkUpdateJobLockWithoutRevisionCheck
public void bulkUpdateJobLockWithoutRevisionCheck(List<TimerJobEntity> timerJobEntities, String lockOwner, Date lockExpirationTime) - Specified by:
bulkUpdateJobLockWithoutRevisionCheck
in interfaceJobInfoEntityManager<TimerJobEntity>
- Overrides:
bulkUpdateJobLockWithoutRevisionCheck
in classJobInfoEntityManagerImpl<TimerJobEntity,
TimerJobDataManager>
-
bulkDeleteTimerJobsWithoutRevisionCheck
- Specified by:
bulkDeleteTimerJobsWithoutRevisionCheck
in interfaceTimerJobEntityManager
-
createTimer
-
setNewRepeat
-
isValidTime
protected boolean isValidTime(JobEntity timerEntity, Date newTimerDate, VariableScope variableScope) -
calculateNextTimer
-
calculateRepeatValue
-