public class ExecutorPerTenantAsyncExecutor extends Object implements TenantAwareAsyncExecutor
AsyncExecutor that has one AsyncExecutor per tenant.
So each tenant has its own acquiring threads and it's own threadpool for executing jobs.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active |
protected boolean |
autoActivate |
protected ProcessEngineConfigurationImpl |
processEngineConfiguration |
protected TenantAwareAsyncExecutorFactory |
tenantAwareAyncExecutorFactory |
protected Map<String,AsyncExecutor> |
tenantExecutors |
protected TenantInfoHolder |
tenantInfoHolder |
| Constructor and Description |
|---|
ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder) |
ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder,
TenantAwareAsyncExecutorFactory tenantAwareAyncExecutorFactory) |
protected TenantInfoHolder tenantInfoHolder
protected TenantAwareAsyncExecutorFactory tenantAwareAyncExecutorFactory
protected Map<String,AsyncExecutor> tenantExecutors
protected ProcessEngineConfigurationImpl processEngineConfiguration
protected boolean active
protected boolean autoActivate
public ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder)
public ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder, TenantAwareAsyncExecutorFactory tenantAwareAyncExecutorFactory)
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 AsyncExecutor determineAsyncExecutor()
public boolean executeAsyncJob(Job job)
AsyncExecutorJobEntity to this AsyncExecutor instance
to execute. If the offering does not work for some reason, false
will be returned (For example when the job queue is full in the DefaultAsyncJobExecutor).executeAsyncJob in interface AsyncExecutorpublic JobManager getJobManager()
public void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration)
setProcessEngineConfiguration in interface AsyncExecutorpublic ProcessEngineConfigurationImpl getProcessEngineConfiguration()
getProcessEngineConfiguration in interface AsyncExecutorpublic boolean isAutoActivate()
isAutoActivate in interface AsyncExecutorpublic void setAutoActivate(boolean isAutoActivate)
setAutoActivate in interface AsyncExecutorpublic boolean isActive()
isActive in interface AsyncExecutorpublic void start()
AsyncExecutorstart in interface AsyncExecutorpublic void shutdown()
AsyncExecutorshutdown in interface AsyncExecutorprotected void shutdownTenantExecutor(String tenantId)
public String getLockOwner()
getLockOwner in interface AsyncExecutorpublic int getTimerLockTimeInMillis()
getTimerLockTimeInMillis in interface AsyncExecutorpublic void setTimerLockTimeInMillis(int lockTimeInMillis)
setTimerLockTimeInMillis in interface AsyncExecutorpublic int getAsyncJobLockTimeInMillis()
getAsyncJobLockTimeInMillis in interface AsyncExecutorpublic void setAsyncJobLockTimeInMillis(int lockTimeInMillis)
setAsyncJobLockTimeInMillis in interface AsyncExecutorpublic int getDefaultTimerJobAcquireWaitTimeInMillis()
getDefaultTimerJobAcquireWaitTimeInMillis in interface AsyncExecutorpublic void setDefaultTimerJobAcquireWaitTimeInMillis(int waitTimeInMillis)
setDefaultTimerJobAcquireWaitTimeInMillis in interface AsyncExecutorpublic int getDefaultAsyncJobAcquireWaitTimeInMillis()
getDefaultAsyncJobAcquireWaitTimeInMillis in interface AsyncExecutorpublic void setDefaultAsyncJobAcquireWaitTimeInMillis(int waitTimeInMillis)
setDefaultAsyncJobAcquireWaitTimeInMillis in interface AsyncExecutorpublic int getDefaultQueueSizeFullWaitTimeInMillis()
getDefaultQueueSizeFullWaitTimeInMillis in interface AsyncExecutorpublic void setDefaultQueueSizeFullWaitTimeInMillis(int defaultQueueSizeFullWaitTimeInMillis)
setDefaultQueueSizeFullWaitTimeInMillis in interface AsyncExecutorpublic int getMaxAsyncJobsDuePerAcquisition()
getMaxAsyncJobsDuePerAcquisition in interface AsyncExecutorpublic void setMaxAsyncJobsDuePerAcquisition(int maxJobs)
setMaxAsyncJobsDuePerAcquisition in interface AsyncExecutorpublic int getMaxTimerJobsPerAcquisition()
getMaxTimerJobsPerAcquisition in interface AsyncExecutorpublic void setMaxTimerJobsPerAcquisition(int maxJobs)
setMaxTimerJobsPerAcquisition in interface AsyncExecutorpublic int getRetryWaitTimeInMillis()
getRetryWaitTimeInMillis in interface AsyncExecutorpublic void setRetryWaitTimeInMillis(int retryWaitTimeInMillis)
setRetryWaitTimeInMillis in interface AsyncExecutorpublic int getResetExpiredJobsInterval()
getResetExpiredJobsInterval in interface AsyncExecutorpublic void setResetExpiredJobsInterval(int resetExpiredJobsInterval)
setResetExpiredJobsInterval in interface AsyncExecutorpublic int getResetExpiredJobsPageSize()
getResetExpiredJobsPageSize in interface AsyncExecutorpublic void setResetExpiredJobsPageSize(int resetExpiredJobsPageSize)
setResetExpiredJobsPageSize in interface AsyncExecutorCopyright © 2016 Alfresco. All rights reserved.