org.camunda.bpm.engine.impl.jobexecutor
Class DefaultJobExecutor

java.lang.Object
  extended by org.camunda.bpm.engine.impl.jobexecutor.JobExecutor
      extended by org.camunda.bpm.engine.impl.jobexecutor.ThreadPoolJobExecutor
          extended by org.camunda.bpm.engine.impl.jobexecutor.DefaultJobExecutor

public class DefaultJobExecutor
extends ThreadPoolJobExecutor

This is a simple implementation of the JobExecutor using self-managed threads for performing background work.

This implementation uses a ThreadPoolExecutor backed by a queue to which work is submitted.

NOTE: use this class in environments in which self-management of threads is permitted. Consider using a different thread-management strategy in J(2)EE-Environments.

Author:
Daniel Meyer

Field Summary
protected  int corePoolSize
           
protected  int maxPoolSize
           
protected  int queueSize
           
 
Fields inherited from class org.camunda.bpm.engine.impl.jobexecutor.ThreadPoolJobExecutor
threadPoolExecutor
 
Fields inherited from class org.camunda.bpm.engine.impl.jobexecutor.JobExecutor
acquireJobsCmdFactory, acquireJobsRunnable, backoffDecreaseThreshold, backoffTimeInMillis, isActive, isAutoActivate, jobAcquisitionThread, lockOwner, lockTimeInMillis, maxBackoff, maxJobsPerAcquisition, maxWait, name, processEngines, rejectedJobsHandler, waitIncreaseFactor, waitTimeInMillis
 
Constructor Summary
DefaultJobExecutor()
           
 
Method Summary
 int getCorePoolSize()
           
 int getMaxPoolSize()
           
 int getQueueSize()
           
 void setCorePoolSize(int corePoolSize)
           
 void setMaxPoolSize(int maxPoolSize)
           
 void setQueueSize(int queueSize)
           
protected  void startExecutingJobs()
           
protected  void stopExecutingJobs()
           
 
Methods inherited from class org.camunda.bpm.engine.impl.jobexecutor.ThreadPoolJobExecutor
executeJobs, getThreadPoolExecutor, setThreadPoolExecutor
 
Methods inherited from class org.camunda.bpm.engine.impl.jobexecutor.JobExecutor
engineIterator, ensureCleanup, ensureInitialization, executeJobs, getAcquireJobsCmd, getAcquireJobsCmdFactory, getAcquireJobsRunnable, getBackoffDecreaseThreshold, getBackoffTimeInMillis, getCommandExecutor, getExecuteJobsRunnable, getLockOwner, getLockTimeInMillis, getMaxBackoff, getMaxJobsPerAcquisition, getMaxWait, getName, getProcessEngines, getRejectedJobsHandler, getWaitIncreaseFactor, getWaitTimeInMillis, hasRegisteredEngine, isActive, isAutoActivate, jobWasAdded, logAcquiredJobs, logAcquisitionAttempt, logAcquisitionFailureJobs, logRejectedExecution, registerProcessEngine, setAcquireJobsCmdFactory, setAutoActivate, setBackoffDecreaseThreshold, setBackoffTimeInMillis, setCommandExecutor, setLockOwner, setLockTimeInMillis, setMaxBackoff, setMaxJobsPerAcquisition, setMaxWait, setProcessEngines, setRejectedJobsHandler, setWaitIncreaseFactor, setWaitTimeInMillis, shutdown, start, startJobAcquisitionThread, stopJobAcquisitionThread, unregisterProcessEngine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queueSize

protected int queueSize

corePoolSize

protected int corePoolSize

maxPoolSize

protected int maxPoolSize
Constructor Detail

DefaultJobExecutor

public DefaultJobExecutor()
Method Detail

startExecutingJobs

protected void startExecutingJobs()
Overrides:
startExecutingJobs in class ThreadPoolJobExecutor

stopExecutingJobs

protected void stopExecutingJobs()
Overrides:
stopExecutingJobs in class ThreadPoolJobExecutor

getQueueSize

public int getQueueSize()

setQueueSize

public void setQueueSize(int queueSize)

getCorePoolSize

public int getCorePoolSize()

setCorePoolSize

public void setCorePoolSize(int corePoolSize)

getMaxPoolSize

public int getMaxPoolSize()

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)


Copyright © 2015 camunda services GmbH. All rights reserved.