Class DefaultAsyncJobExecutor

java.lang.Object
org.flowable.job.service.impl.asyncexecutor.AbstractAsyncExecutor
org.flowable.job.service.impl.asyncexecutor.DefaultAsyncJobExecutor
All Implemented Interfaces:
AsyncExecutor
Direct Known Subclasses:
DefaultAsyncHistoryJobExecutor, SharedExecutorServiceAsyncExecutor, SpringAsyncExecutor

public class DefaultAsyncJobExecutor extends AbstractAsyncExecutor
Author:
Joram Barrez, Tijs Rademakers
  • Field Details

    • asyncJobAcquisitionThread

      protected Thread asyncJobAcquisitionThread
      Thread responsible for async job acquisition.
    • timerJobAcquisitionThread

      protected Thread timerJobAcquisitionThread
      Thread responsible for timer job acquisition.
    • resetExpiredJobThread

      protected Thread resetExpiredJobThread
      Thread responsible for resetting the expired jobs.
    • taskExecutor

      protected AsyncTaskExecutor taskExecutor
      The async task executor used for job execution.
    • shutdownTaskExecutor

      protected boolean shutdownTaskExecutor
  • Constructor Details

    • DefaultAsyncJobExecutor

      public DefaultAsyncJobExecutor()
    • DefaultAsyncJobExecutor

      public DefaultAsyncJobExecutor(AsyncJobExecutorConfiguration configuration)
  • Method Details

    • executeAsyncJob

      protected boolean executeAsyncJob(JobInfo job, Runnable runnable)
      Specified by:
      executeAsyncJob in class AbstractAsyncExecutor
    • sendRejectedEvent

      protected void sendRejectedEvent(JobInfo job)
    • unacquireJobAfterRejection

      protected void unacquireJobAfterRejection(JobInfo job)
    • startAdditionalComponents

      protected void startAdditionalComponents()
      Specified by:
      startAdditionalComponents in class AbstractAsyncExecutor
    • shutdownAdditionalComponents

      protected void shutdownAdditionalComponents()
      Specified by:
      shutdownAdditionalComponents in class AbstractAsyncExecutor
    • createResetExpiredJobsRunnable

      protected ResetExpiredJobsRunnable createResetExpiredJobsRunnable(String resetRunnableName)
      Specified by:
      createResetExpiredJobsRunnable in class AbstractAsyncExecutor
    • initAsyncJobExecutionThreadPool

      protected void initAsyncJobExecutionThreadPool()
    • stopExecutingAsyncJobs

      protected void stopExecutingAsyncJobs()
    • startJobAcquisitionThread

      protected void startJobAcquisitionThread()
      Starts the acquisition thread
    • startTimerAcquisitionThread

      protected void startTimerAcquisitionThread()
    • stopJobAcquisitionThread

      protected void stopJobAcquisitionThread()
      Stops the acquisition thread
    • stopTimerAcquisitionThread

      protected void stopTimerAcquisitionThread()
    • startResetExpiredJobsThread

      protected void startResetExpiredJobsThread()
      Starts the reset expired jobs thread
    • stopResetExpiredJobsThread

      protected void stopResetExpiredJobsThread()
      Stops the reset expired jobs thread
    • isAsyncJobAcquisitionEnabled

      public boolean isAsyncJobAcquisitionEnabled()
    • setAsyncJobAcquisitionEnabled

      public void setAsyncJobAcquisitionEnabled(boolean isAsyncJobAcquisitionEnabled)
    • isTimerJobAcquisitionEnabled

      public boolean isTimerJobAcquisitionEnabled()
    • setTimerJobAcquisitionEnabled

      public void setTimerJobAcquisitionEnabled(boolean isTimerJobAcquisitionEnabled)
    • isResetExpiredJobEnabled

      public boolean isResetExpiredJobEnabled()
    • setResetExpiredJobEnabled

      public void setResetExpiredJobEnabled(boolean isResetExpiredJobEnabled)
    • getTimerJobAcquisitionThread

      public Thread getTimerJobAcquisitionThread()
    • setTimerJobAcquisitionThread

      public void setTimerJobAcquisitionThread(Thread timerJobAcquisitionThread)
    • getAsyncJobAcquisitionThread

      public Thread getAsyncJobAcquisitionThread()
    • setAsyncJobAcquisitionThread

      public void setAsyncJobAcquisitionThread(Thread asyncJobAcquisitionThread)
    • getResetExpiredJobThread

      public Thread getResetExpiredJobThread()
    • setResetExpiredJobThread

      public void setResetExpiredJobThread(Thread resetExpiredJobThread)
    • isUnlockOwnedJobs

      public boolean isUnlockOwnedJobs()
    • setUnlockOwnedJobs

      public void setUnlockOwnedJobs(boolean unlockOwnedJobs)
    • getTaskExecutor

      public AsyncTaskExecutor getTaskExecutor()
      Description copied from interface: AsyncExecutor
      The optional task executor for the async executor
      Returns:
      the task executor used by this async executor
    • setTaskExecutor

      public void setTaskExecutor(AsyncTaskExecutor taskExecutor)
      Description copied from interface: AsyncExecutor
      Set the task executor for this async executor.