Class SharedExecutorServiceAsyncExecutor
- java.lang.Object
-
- org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor
-
- org.activiti.engine.impl.asyncexecutor.multitenant.SharedExecutorServiceAsyncExecutor
-
- All Implemented Interfaces:
AsyncExecutor,TenantAwareAsyncExecutor
public class SharedExecutorServiceAsyncExecutor extends DefaultAsyncJobExecutor implements TenantAwareAsyncExecutor
Multi tenantAsyncExecutor. For each tenant, there will be acquire threads, but only oneExecutorServicewill be used once the jobs are acquired.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,TenantAwareAcquireAsyncJobsDueRunnable>asyncJobAcquisitionRunnablesprotected Map<String,Thread>asyncJobAcquisitionThreadsprotected Map<String,TenantAwareResetExpiredJobsRunnable>resetExpiredJobsRunnablesprotected Map<String,Thread>resetExpiredJobsThreadsprotected TenantInfoHoldertenantInfoHolderprotected Map<String,TenantAwareAcquireTimerJobsRunnable>timerJobAcquisitionRunnablesprotected Map<String,Thread>timerJobAcquisitionThreads-
Fields inherited from class org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor
asyncJobAcquisitionThread, asyncJobLockTimeInMillis, asyncJobsDueRunnable, corePoolSize, defaultAsyncJobAcquireWaitTimeInMillis, defaultQueueSizeFullWaitTime, defaultTimerJobAcquireWaitTimeInMillis, executeAsyncRunnableFactory, executorService, isActive, isAutoActivate, isMessageQueueMode, keepAliveTime, lockOwner, maxAsyncJobsDuePerAcquisition, maxPoolSize, maxTimerJobsPerAcquisition, processEngineConfiguration, queueSize, resetExpiredJobsInterval, resetExpiredJobsPageSize, resetExpiredJobsRunnable, resetExpiredJobThread, retryWaitTimeInMillis, secondsToWaitOnShutdown, temporaryJobQueue, threadPoolQueue, timerJobAcquisitionThread, timerJobRunnable, timerLockTimeInMillis
-
-
Constructor Summary
Constructors Constructor Description SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTenantAsyncExecutor(String tenantId, boolean startExecutor)Set<String>getTenantIds()voidremoveTenantAsyncExecutor(String tenantId)voidstart()Starts the async executorprotected voidstartAsyncJobAcquisitionForTenant(String tenantId)protected voidstartResetExpiredJobsForTenant(String tenantId)protected voidstartTimerJobAcquisitionForTenant(String tenantId)protected voidstopJobAcquisitionThread()Stops the acquisition threadprotected voidstopThreadsForTenant(String tenantId)-
Methods inherited from class org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor
applyConfig, createRunnableForJob, executeAsyncJob, executeTemporaryJobs, getAsyncJobAcquisitionThread, getAsyncJobLockTimeInMillis, getCorePoolSize, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getExecutorService, getKeepAliveTime, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxPoolSize, getMaxTimerJobsPerAcquisition, getProcessEngineConfiguration, getQueueSize, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getResetExpiredJobThread, getRetryWaitTimeInMillis, getSecondsToWaitOnShutdown, getThreadPoolQueue, getTimerJobAcquisitionThread, getTimerLockTimeInMillis, initAsyncJobExecutionThreadPool, isActive, isAutoActivate, isMessageQueueMode, setAsyncJobAcquisitionThread, setAsyncJobLockTimeInMillis, setAsyncJobsDueRunnable, setAutoActivate, setCorePoolSize, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setExecutorService, setKeepAliveTime, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxPoolSize, setMaxTimerJobsPerAcquisition, setMessageQueueMode, setProcessEngineConfiguration, setQueueSize, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setResetExpiredJobsRunnable, setResetExpiredJobThread, setRetryWaitTimeInMillis, setSecondsToWaitOnShutdown, setThreadPoolQueue, setTimerJobAcquisitionThread, setTimerJobRunnable, setTimerLockTimeInMillis, shutdown, startJobAcquisitionThread, startResetExpiredJobsThread, startTimerAcquisitionThread, stopExecutingAsyncJobs, stopResetExpiredJobsThread, stopTimerAcquisitionThread
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.activiti.engine.impl.asyncexecutor.AsyncExecutor
executeAsyncJob, getAsyncJobLockTimeInMillis, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getProcessEngineConfiguration, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getRetryWaitTimeInMillis, getTimerLockTimeInMillis, isActive, isAutoActivate, setAsyncJobLockTimeInMillis, setAutoActivate, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setProcessEngineConfiguration, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setRetryWaitTimeInMillis, setTimerLockTimeInMillis, shutdown
-
-
-
-
Field Detail
-
tenantInfoHolder
protected TenantInfoHolder tenantInfoHolder
-
timerJobAcquisitionRunnables
protected Map<String,TenantAwareAcquireTimerJobsRunnable> timerJobAcquisitionRunnables
-
asyncJobAcquisitionRunnables
protected Map<String,TenantAwareAcquireAsyncJobsDueRunnable> asyncJobAcquisitionRunnables
-
resetExpiredJobsRunnables
protected Map<String,TenantAwareResetExpiredJobsRunnable> resetExpiredJobsRunnables
-
-
Constructor Detail
-
SharedExecutorServiceAsyncExecutor
public SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder)
-
-
Method Detail
-
getTenantIds
public Set<String> getTenantIds()
- Specified by:
getTenantIdsin interfaceTenantAwareAsyncExecutor
-
addTenantAsyncExecutor
public void addTenantAsyncExecutor(String tenantId, boolean startExecutor)
- Specified by:
addTenantAsyncExecutorin interfaceTenantAwareAsyncExecutor
-
removeTenantAsyncExecutor
public void removeTenantAsyncExecutor(String tenantId)
- Specified by:
removeTenantAsyncExecutorin interfaceTenantAwareAsyncExecutor
-
start
public void start()
Description copied from class:DefaultAsyncJobExecutorStarts the async executor- Specified by:
startin interfaceAsyncExecutor- Overrides:
startin classDefaultAsyncJobExecutor
-
startTimerJobAcquisitionForTenant
protected void startTimerJobAcquisitionForTenant(String tenantId)
-
startAsyncJobAcquisitionForTenant
protected void startAsyncJobAcquisitionForTenant(String tenantId)
-
startResetExpiredJobsForTenant
protected void startResetExpiredJobsForTenant(String tenantId)
-
stopJobAcquisitionThread
protected void stopJobAcquisitionThread()
Description copied from class:DefaultAsyncJobExecutorStops the acquisition thread- Overrides:
stopJobAcquisitionThreadin classDefaultAsyncJobExecutor
-
stopThreadsForTenant
protected void stopThreadsForTenant(String tenantId)
-
-