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 tenant
AsyncExecutor.
For each tenant, there will be acquire threads, but only one ExecutorService will be used
once the jobs are acquired.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,TenantAwareAcquireAsyncJobsDueRunnable> protected Map<String,TenantAwareResetExpiredJobsRunnable> protected TenantInfoHolderprotected Map<String,TenantAwareAcquireTimerJobsRunnable> 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTenantAsyncExecutor(String tenantId, boolean startExecutor) voidremoveTenantAsyncExecutor(String tenantId) voidstart()Starts the async executorprotected voidstartAsyncJobAcquisitionForTenant(String tenantId) protected voidstartResetExpiredJobsForTenant(String tenantId) protected voidstartTimerJobAcquisitionForTenant(String tenantId) protected voidStops 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, stopTimerAcquisitionThreadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
tenantInfoHolder
-
timerJobAcquisitionThreads
-
timerJobAcquisitionRunnables
-
asyncJobAcquisitionThreads
-
asyncJobAcquisitionRunnables
-
resetExpiredJobsThreads
-
resetExpiredJobsRunnables
-
-
Constructor Details
-
SharedExecutorServiceAsyncExecutor
-
-
Method Details
-
getTenantIds
- Specified by:
getTenantIdsin interfaceTenantAwareAsyncExecutor
-
addTenantAsyncExecutor
- Specified by:
addTenantAsyncExecutorin interfaceTenantAwareAsyncExecutor
-
removeTenantAsyncExecutor
- Specified by:
removeTenantAsyncExecutorin interfaceTenantAwareAsyncExecutor
-
start
public void start()Description copied from class:DefaultAsyncJobExecutorStarts the async executor- Specified by:
startin interfaceAsyncExecutor- Overrides:
startin classDefaultAsyncJobExecutor
-
startTimerJobAcquisitionForTenant
-
startAsyncJobAcquisitionForTenant
-
startResetExpiredJobsForTenant
-
stopJobAcquisitionThread
protected void stopJobAcquisitionThread()Description copied from class:DefaultAsyncJobExecutorStops the acquisition thread- Overrides:
stopJobAcquisitionThreadin classDefaultAsyncJobExecutor
-
stopThreadsForTenant
-