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
serviceConfigurationFields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntityManager
dataManager, engineType -
Constructor Summary
ConstructorsConstructorDescriptionTimerJobEntityManagerImpl(JobServiceConfiguration jobServiceConfiguration, TimerJobDataManager jobDataManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidbulkDeleteTimerJobsWithoutRevisionCheck(List<TimerJobEntity> timerJobEntities) voidbulkUpdateJobLockWithoutRevisionCheck(List<TimerJobEntity> timerJobEntities, String lockOwner, Date lockExpirationTime) protected DatecalculateNextTimer(JobEntity timerEntity, VariableScope variableScope) protected intcalculateRepeatValue(JobEntity timerEntity) createAndCalculateNextTimer(JobEntity timerEntity, VariableScope variableScope) Creates a newTimerJobEntity, typically when a timer is used in a repeating way.protected TimerJobEntitycreateTimer(JobEntity te) voiddelete(TimerJobEntity jobEntity) voiddelete(TimerJobEntity jobEntity, boolean fireDeleteEvent) protected booleandoInsert(TimerJobEntity jobEntity, boolean fireCreateEvent) findJobByCorrelationId(String correlationId) Find the timer job with the given correlation id.longfindJobCountByQueryCriteria(TimerJobQueryImpl jobQuery) Same asTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl), but only returns a count and not the instances itself.Returns allJobEntityinstances related to on ExecutionEntity.Returns allJobEntityinstances related to one process instance ExecutionEntity.findJobsByQueryCriteria(TimerJobQueryImpl jobQuery) Executes aJobQueryImpland returns the matchingTimerJobEntityinstances.findJobsByScopeIdAndSubScopeId(String scopeId, String subScopeId) Returns allTimerJobEntityfor the given scope and subscope.findJobsByTypeAndProcessDefinitionId(String jobHandlerType, String processDefinitionId) Returns theTimerJobEntityfor 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.voidinsert(TimerJobEntity jobEntity) voidinsert(TimerJobEntity jobEntity, boolean fireCreateEvent) booleaninsertTimerJobEntity(TimerJobEntity timerJobEntity) Insert theTimerJobEntity, similar to insert(TimerJobEntity), but returns a boolean in case the insert did not go through.protected booleanisValidTime(JobEntity timerEntity, Date newTimerDate, VariableScope variableScope) protected voidsetNewRepeat(JobEntity timerEntity, int newRepeatValue) voidupdateJobTenantIdForDeployment(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, resetExpiredJobMethods inherited from class org.flowable.job.service.impl.persistence.entity.AbstractJobServiceEngineEntityManager
bulkDeleteByteArraysById, createEntityEvent, deleteByteArrayRefMethods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractServiceEngineEntityManager
getClock, getEventDispatcher, getServiceConfigurationMethods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntityManager
create, delete, findById, fireEntityDeletedEvent, fireEntityInsertedEvent, fireEntityUpdatedEvent, getDataManager, setDataManager, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.flowable.common.engine.impl.persistence.entity.EntityManager
create, delete, findById, update, updateMethods 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:TimerJobEntityManagerCreates a newTimerJobEntity, typically when a timer is used in a repeating way. The returnsTimerJobEntityis not yet inserted.Returns null if the timer has finished its repetitions.
- Specified by:
createAndCalculateNextTimerin interfaceTimerJobEntityManager
-
findJobByCorrelationId
Description copied from interface:TimerJobEntityManagerFind the timer job with the given correlation id.- Specified by:
findJobByCorrelationIdin interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionId(String jobHandlerType, String processDefinitionId) Description copied from interface:TimerJobEntityManagerReturns theTimerJobEntityfor a given process definition.This is for example used when deleting a process definition: it finds the
TimerJobEntityrepresenting the timer start events.- Specified by:
findJobsByTypeAndProcessDefinitionIdin interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionKeyNoTenantId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType, String processDefinitionKey) Description copied from interface:TimerJobEntityManagerThe same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and specifically for the 'no tenant' mode.- Specified by:
findJobsByTypeAndProcessDefinitionKeyNoTenantIdin interfaceTimerJobEntityManager
-
findJobsByTypeAndProcessDefinitionKeyAndTenantId
public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType, String processDefinitionKey, String tenantId) Description copied from interface:TimerJobEntityManagerThe same asTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and for a specific tenantId.- Specified by:
findJobsByTypeAndProcessDefinitionKeyAndTenantIdin interfaceTimerJobEntityManager
-
findJobsByExecutionId
Description copied from interface:JobInfoEntityManagerReturns allJobEntityinstances related to on ExecutionEntity.- Specified by:
findJobsByExecutionIdin interfaceJobInfoEntityManager<TimerJobEntity>- Overrides:
findJobsByExecutionIdin classJobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
-
findJobsByProcessInstanceId
Description copied from interface:JobInfoEntityManagerReturns allJobEntityinstances related to one process instance ExecutionEntity.- Specified by:
findJobsByProcessInstanceIdin interfaceJobInfoEntityManager<TimerJobEntity>- Overrides:
findJobsByProcessInstanceIdin classJobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
-
findJobsByScopeIdAndSubScopeId
Description copied from interface:TimerJobEntityManagerReturns allTimerJobEntityfor the given scope and subscope.- Specified by:
findJobsByScopeIdAndSubScopeIdin interfaceTimerJobEntityManager
-
findJobsByQueryCriteria
Description copied from interface:TimerJobEntityManagerExecutes aJobQueryImpland returns the matchingTimerJobEntityinstances.- Specified by:
findJobsByQueryCriteriain interfaceTimerJobEntityManager
-
findJobCountByQueryCriteria
Description copied from interface:TimerJobEntityManagerSame asTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl), but only returns a count and not the instances itself.- Specified by:
findJobCountByQueryCriteriain interfaceTimerJobEntityManager
-
updateJobTenantIdForDeployment
Description copied from interface:JobInfoEntityManagerChanges the tenantId for all jobs related to a given DeploymentEntity.- Specified by:
updateJobTenantIdForDeploymentin interfaceJobInfoEntityManager<TimerJobEntity>- Overrides:
updateJobTenantIdForDeploymentin classJobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
-
insertTimerJobEntity
Description copied from interface:TimerJobEntityManagerInsert 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 theTimerJobEntityhas been removed (for example due to a task complete for a timer boundary on that task).- Specified by:
insertTimerJobEntityin interfaceTimerJobEntityManager
-
insert
- Specified by:
insertin interfaceEntityManager<TimerJobEntity>- Overrides:
insertin classAbstractEntityManager<TimerJobEntity,TimerJobDataManager>
-
insert
- Specified by:
insertin interfaceEntityManager<TimerJobEntity>- Overrides:
insertin classAbstractEntityManager<TimerJobEntity,TimerJobDataManager>
-
doInsert
-
delete
- Specified by:
deletein interfaceEntityManager<TimerJobEntity>- Overrides:
deletein classAbstractEntityManager<TimerJobEntity,TimerJobDataManager>
-
delete
- Specified by:
deletein interfaceEntityManager<TimerJobEntity>- Overrides:
deletein classAbstractEntityManager<TimerJobEntity,TimerJobDataManager>
-
bulkUpdateJobLockWithoutRevisionCheck
public void bulkUpdateJobLockWithoutRevisionCheck(List<TimerJobEntity> timerJobEntities, String lockOwner, Date lockExpirationTime) - Specified by:
bulkUpdateJobLockWithoutRevisionCheckin interfaceJobInfoEntityManager<TimerJobEntity>- Overrides:
bulkUpdateJobLockWithoutRevisionCheckin classJobInfoEntityManagerImpl<TimerJobEntity,TimerJobDataManager>
-
bulkDeleteTimerJobsWithoutRevisionCheck
- Specified by:
bulkDeleteTimerJobsWithoutRevisionCheckin interfaceTimerJobEntityManager
-
createTimer
-
setNewRepeat
-
isValidTime
protected boolean isValidTime(JobEntity timerEntity, Date newTimerDate, VariableScope variableScope) -
calculateNextTimer
-
calculateRepeatValue
-