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 TenantInfoHolder |
tenantInfoHolder |
protected Map<String,TenantAwareAcquireTimerJobsRunnable> |
timerJobAcquisitionRunnables |
protected Map<String,Thread> |
timerJobAcquisitionThreads |
corePoolSize, executorService, maxPoolSize, queueSize, secondsToWaitOnShutdown, threadPoolQueueasyncJobAcquisitionThread, asyncJobLockTimeInMillis, asyncJobsDueRunnable, commandExecutor, defaultAsyncJobAcquireWaitTimeInMillis, defaultQueueSizeFullWaitTime, defaultTimerJobAcquireWaitTimeInMillis, executeAsyncRunnableFactory, isActive, isAutoActivate, keepAliveTime, lockOwner, maxAsyncJobsDuePerAcquisition, maxTimerJobsPerAcquisition, retryWaitTimeInMillis, temporaryJobQueue, timerJobAcquisitionThread, timerJobRunnable, timerLockTimeInMillis| Constructor and Description |
|---|
SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTenantAsyncExecutor(String tenantId,
boolean startExecutor) |
Set<String> |
getTenantIds() |
void |
removeTenantAsyncExecutor(String tenantId) |
protected void |
startAsyncJobAcquisitionForTenant(String tenantId) |
protected void |
startJobAcquisitionThread()
Starts the acquisition thread
|
protected void |
startTimerJobAcquisitionForTenant(String tenantId) |
protected void |
stopJobAcquisitionThread()
Stops the acquisition thread
|
protected void |
stopThreadsForTenant(String tenantId) |
createRunnableForJob, executeAsyncJob, getCorePoolSize, getExecutorService, getMaxPoolSize, getQueueSize, getSecondsToWaitOnShutdown, getThreadPoolQueue, setCorePoolSize, setExecutorService, setMaxPoolSize, setQueueSize, setSecondsToWaitOnShutdown, setThreadPoolQueue, startExecutingAsyncJobs, stopExecutingAsyncJobs, unlockJobdoUnlockJob, executeAsyncJob, getAsyncJobLockTimeInMillis, getCommandExecutor, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getKeepAliveTime, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getRetryWaitTimeInMillis, getTimerLockTimeInMillis, initialize, isActive, isAutoActivate, setAsyncJobLockTimeInMillis, setAsyncJobsDueRunnable, setAutoActivate, setCommandExecutor, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setKeepAliveTime, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setRetryWaitTimeInMillis, setTimerJobRunnable, setTimerLockTimeInMillis, shutdown, startclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteAsyncJob, getAsyncJobLockTimeInMillis, getCommandExecutor, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getRetryWaitTimeInMillis, getTimerLockTimeInMillis, isActive, isAutoActivate, setAsyncJobLockTimeInMillis, setAutoActivate, setCommandExecutor, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setRetryWaitTimeInMillis, setTimerLockTimeInMillis, shutdown, startprotected TenantInfoHolder tenantInfoHolder
protected Map<String,TenantAwareAcquireTimerJobsRunnable> timerJobAcquisitionRunnables
protected Map<String,TenantAwareAcquireAsyncJobsDueRunnable> asyncJobAcquisitionRunnables
public SharedExecutorServiceAsyncExecutor(TenantInfoHolder tenantInfoHolder)
public Set<String> getTenantIds()
getTenantIds in interface TenantAwareAsyncExecutorpublic void addTenantAsyncExecutor(String tenantId, boolean startExecutor)
addTenantAsyncExecutor in interface TenantAwareAsyncExecutorpublic void removeTenantAsyncExecutor(String tenantId)
removeTenantAsyncExecutor in interface TenantAwareAsyncExecutorprotected void startJobAcquisitionThread()
AbstractAsyncJobExecutorstartJobAcquisitionThread in class AbstractAsyncJobExecutorprotected void startTimerJobAcquisitionForTenant(String tenantId)
protected void startAsyncJobAcquisitionForTenant(String tenantId)
protected void stopJobAcquisitionThread()
AbstractAsyncJobExecutorstopJobAcquisitionThread in class AbstractAsyncJobExecutorprotected void stopThreadsForTenant(String tenantId)
Copyright © 2016 Alfresco. All rights reserved.