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 CommandExecutor |
commandExecutor |
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 CommandExecutor commandExecutor
protected boolean active
protected boolean autoActivate
public ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder)
public ExecutorPerTenantAsyncExecutor(TenantInfoHolder tenantInfoHolder, TenantAwareAsyncExecutorFactory tenantAwareAyncExecutorFactory)
public void addTenantAsyncExecutor(String tenantId, boolean startExecutor)
addTenantAsyncExecutor
in interface TenantAwareAsyncExecutor
protected AsyncExecutor determineAsyncExecutor()
public void executeAsyncJob(JobEntity job)
executeAsyncJob
in interface AsyncExecutor
public void setCommandExecutor(CommandExecutor commandExecutor)
setCommandExecutor
in interface AsyncExecutor
public CommandExecutor getCommandExecutor()
getCommandExecutor
in interface AsyncExecutor
public boolean isAutoActivate()
isAutoActivate
in interface AsyncExecutor
public void setAutoActivate(boolean isAutoActivate)
setAutoActivate
in interface AsyncExecutor
public boolean isActive()
isActive
in interface AsyncExecutor
public void start()
start
in interface AsyncExecutor
public void shutdown()
shutdown
in interface AsyncExecutor
public String getLockOwner()
getLockOwner
in interface AsyncExecutor
public int getTimerLockTimeInMillis()
getTimerLockTimeInMillis
in interface AsyncExecutor
public void setTimerLockTimeInMillis(int lockTimeInMillis)
setTimerLockTimeInMillis
in interface AsyncExecutor
public int getAsyncJobLockTimeInMillis()
getAsyncJobLockTimeInMillis
in interface AsyncExecutor
public void setAsyncJobLockTimeInMillis(int lockTimeInMillis)
setAsyncJobLockTimeInMillis
in interface AsyncExecutor
public int getDefaultTimerJobAcquireWaitTimeInMillis()
getDefaultTimerJobAcquireWaitTimeInMillis
in interface AsyncExecutor
public void setDefaultTimerJobAcquireWaitTimeInMillis(int waitTimeInMillis)
setDefaultTimerJobAcquireWaitTimeInMillis
in interface AsyncExecutor
public int getDefaultAsyncJobAcquireWaitTimeInMillis()
getDefaultAsyncJobAcquireWaitTimeInMillis
in interface AsyncExecutor
public void setDefaultAsyncJobAcquireWaitTimeInMillis(int waitTimeInMillis)
setDefaultAsyncJobAcquireWaitTimeInMillis
in interface AsyncExecutor
public int getMaxAsyncJobsDuePerAcquisition()
getMaxAsyncJobsDuePerAcquisition
in interface AsyncExecutor
public void setMaxAsyncJobsDuePerAcquisition(int maxJobs)
setMaxAsyncJobsDuePerAcquisition
in interface AsyncExecutor
public int getMaxTimerJobsPerAcquisition()
getMaxTimerJobsPerAcquisition
in interface AsyncExecutor
public void setMaxTimerJobsPerAcquisition(int maxJobs)
setMaxTimerJobsPerAcquisition
in interface AsyncExecutor
public int getRetryWaitTimeInMillis()
getRetryWaitTimeInMillis
in interface AsyncExecutor
public void setRetryWaitTimeInMillis(int retryWaitTimeInMillis)
setRetryWaitTimeInMillis
in interface AsyncExecutor
Copyright © 2015 Alfresco. All rights reserved.