public class SharedExecutorServiceAsyncExecutor extends DefaultAsyncJobExecutor implements TenantAwareAsyncExecutor
AsyncExecutor.
For each tenant, there will be acquire threads, but only one ExecutorService will be used once the jobs are acquired.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,TenantAwareAcquireAsyncJobsDueRunnable> |
asyncJobAcquisitionRunnables |
protected Map<String,Thread> |
asyncJobAcquisitionThreads |
protected Map<String,TenantAwareResetExpiredJobsRunnable> |
resetExpiredJobsRunnables |
protected Map<String,Thread> |
resetExpiredJobsThreads |
protected TenantInfoHolder |
tenantInfoHolder |
protected Map<String,TenantAwareAcquireTimerJobsRunnable> |
timerJobAcquisitionRunnables |
protected Map<String,Thread> |
timerJobAcquisitionThreads |
allowCoreThreadTimeout, asyncJobAcquisitionThread, corePoolSize, executorService, isAsyncJobAcquisitionEnabled, isResetExpiredJobEnabled, isTimerJobAcquisitionEnabled, keepAliveTime, maxPoolSize, queueSize, resetExpiredJobThread, secondsToWaitOnShutdown, threadPoolNamingPattern, threadPoolQueue, timerJobAcquisitionThread, unlockOwnedJobsacquireRunnableThreadName, asyncJobLockTimeInMillis, asyncJobsDueRunnable, asyncRunnableExecutionExceptionHandler, defaultAsyncJobAcquireWaitTimeInMillis, defaultQueueSizeFullWaitTime, defaultTimerJobAcquireWaitTimeInMillis, executeAsyncRunnableFactory, isActive, isAutoActivate, isMessageQueueMode, jobEntityManager, jobServiceConfiguration, lockOwner, maxAsyncJobsDuePerAcquisition, maxTimerJobsPerAcquisition, resetExpiredJobsInterval, resetExpiredJobsPageSize, resetExpiredJobsRunnable, resetExpiredRunnableName, retryWaitTimeInMillis, temporaryJobQueue, timerJobRunnable, timerLockTimeInMillis, timerRunnableNeeded| Constructor and Description |
|---|
SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTenantAsyncExecutor(String tenantId,
boolean startExecutor) |
AsyncExecutor |
getTenantAsyncExecutor(String tenantId) |
Set<String> |
getTenantIds() |
void |
removeTenantAsyncExecutor(String tenantId) |
void |
start()
Starts the async executor
|
protected void |
startAsyncJobAcquisitionForTenant(String tenantId) |
protected void |
startResetExpiredJobsForTenant(String tenantId) |
protected void |
startTimerJobAcquisitionForTenant(String tenantId) |
protected void |
stopJobAcquisitionThread()
Stops the acquisition thread
|
protected void |
stopThreadsForTenant(String tenantId) |
protected void |
unlockOwnedJobs() |
executeAsyncJob, getAsyncJobAcquisitionThread, getCorePoolSize, getExecutorService, getKeepAliveTime, getMaxPoolSize, getQueueSize, getRemainingCapacity, getResetExpiredJobThread, getSecondsToWaitOnShutdown, getThreadPoolNamingPattern, getThreadPoolQueue, getTimerJobAcquisitionThread, initAsyncJobExecutionThreadPool, isAllowCoreThreadTimeout, isAsyncJobAcquisitionEnabled, isResetExpiredJobEnabled, isTimerJobAcquisitionEnabled, isUnlockOwnedJobs, setAllowCoreThreadTimeout, setAsyncJobAcquisitionEnabled, setAsyncJobAcquisitionThread, setCorePoolSize, setExecutorService, setKeepAliveTime, setMaxPoolSize, setQueueSize, setResetExpiredJobEnabled, setResetExpiredJobThread, setSecondsToWaitOnShutdown, setThreadPoolNamingPattern, setThreadPoolQueue, setTimerJobAcquisitionEnabled, setTimerJobAcquisitionThread, setUnlockOwnedJobs, shutdownAdditionalComponents, startAdditionalComponents, startJobAcquisitionThread, startResetExpiredJobsThread, startTimerAcquisitionThread, stopExecutingAsyncJobs, stopResetExpiredJobsThread, stopTimerAcquisitionThread, unacquireJobAfterRejectioncreateRunnableForJob, executeAsyncJob, executeTemporaryJobs, getAsyncJobLockTimeInMillis, getAsyncJobsDueRunnable, getAsyncRunnableExecutionExceptionHandler, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getJobServiceConfiguration, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getResetExpiredJobsRunnable, getRetryWaitTimeInMillis, getTimerJobRunnable, getTimerLockTimeInMillis, initializeJobEntityManager, initializeRunnables, isActive, isAutoActivate, isMessageQueueMode, setAcquireRunnableThreadName, setAsyncJobLockTimeInMillis, setAsyncJobsDueRunnable, setAsyncRunnableExecutionExceptionHandler, setAutoActivate, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setJobEntityManager, setJobServiceConfiguration, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setMessageQueueMode, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setResetExpiredJobsRunnable, setResetExpiredRunnableName, setRetryWaitTimeInMillis, setTenantId, setTimerJobRunnable, setTimerLockTimeInMillis, setTimerRunnableNeeded, shutdown, stopRunnablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteAsyncJob, getAsyncJobLockTimeInMillis, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getJobServiceConfiguration, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getRemainingCapacity, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getRetryWaitTimeInMillis, getTimerLockTimeInMillis, isActive, isAutoActivate, setAsyncJobLockTimeInMillis, setAutoActivate, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setJobServiceConfiguration, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setRetryWaitTimeInMillis, setTimerLockTimeInMillis, shutdownprotected TenantInfoHolder tenantInfoHolder
protected Map<String,TenantAwareAcquireTimerJobsRunnable> timerJobAcquisitionRunnables
protected Map<String,TenantAwareAcquireAsyncJobsDueRunnable> asyncJobAcquisitionRunnables
protected Map<String,TenantAwareResetExpiredJobsRunnable> resetExpiredJobsRunnables
public SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder)
public Set<String> getTenantIds()
getTenantIds in interface TenantAwareAsyncExecutorpublic void addTenantAsyncExecutor(String tenantId, boolean startExecutor)
addTenantAsyncExecutor in interface TenantAwareAsyncExecutorpublic AsyncExecutor getTenantAsyncExecutor(String tenantId)
getTenantAsyncExecutor in interface TenantAwareAsyncExecutorpublic void removeTenantAsyncExecutor(String tenantId)
removeTenantAsyncExecutor in interface TenantAwareAsyncExecutorprotected void unlockOwnedJobs()
unlockOwnedJobs in class AbstractAsyncExecutorpublic void start()
AbstractAsyncExecutorstart in interface AsyncExecutorstart in class AbstractAsyncExecutorprotected void startTimerJobAcquisitionForTenant(String tenantId)
protected void startAsyncJobAcquisitionForTenant(String tenantId)
protected void startResetExpiredJobsForTenant(String tenantId)
protected void stopJobAcquisitionThread()
DefaultAsyncJobExecutorstopJobAcquisitionThread in class DefaultAsyncJobExecutorprotected void stopThreadsForTenant(String tenantId)
Copyright © 2020 Flowable. All rights reserved.