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 JobServiceConfiguration |
jobServiceConfiguration |
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 JobServiceConfiguration jobServiceConfiguration
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 AsyncExecutor getTenantAsyncExecutor(String tenantId)
getTenantAsyncExecutor in interface TenantAwareAsyncExecutorpublic void removeTenantAsyncExecutor(String tenantId)
removeTenantAsyncExecutor in interface TenantAwareAsyncExecutorprotected AsyncExecutor determineAsyncExecutor()
public boolean executeAsyncJob(JobInfo job)
AsyncExecutorJobInfo 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 int getRemainingCapacity()
getRemainingCapacity in interface AsyncExecutorpublic JobManager getJobManager()
public void setJobServiceConfiguration(JobServiceConfiguration jobServiceConfiguration)
setJobServiceConfiguration in interface AsyncExecutorpublic JobServiceConfiguration getJobServiceConfiguration()
getJobServiceConfiguration 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 AsyncExecutorprotected void startTenantExecutor(String tenantId)
public 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 © 2020 Flowable. All rights reserved.