Class RetryInterceptor

java.lang.Object
org.activiti.engine.impl.interceptor.AbstractCommandInterceptor
org.activiti.engine.impl.interceptor.RetryInterceptor
All Implemented Interfaces:
CommandInterceptor
Direct Known Subclasses:
JtaRetryInterceptor

public class RetryInterceptor extends AbstractCommandInterceptor
Intercepts ActivitiOptimisticLockingException and tries to run the same command again. The number of retries and the time waited between retries is configurable.
  • Field Details

    • numOfRetries

      protected int numOfRetries
    • waitTimeInMs

      protected int waitTimeInMs
    • waitIncreaseFactor

      protected int waitIncreaseFactor
  • Constructor Details

    • RetryInterceptor

      public RetryInterceptor()
  • Method Details

    • execute

      public <T> T execute(CommandConfig config, Command<T> command)
    • waitBeforeRetry

      protected void waitBeforeRetry(long waitTime)
    • setNumOfRetries

      public void setNumOfRetries(int numOfRetries)
    • setWaitIncreaseFactor

      public void setWaitIncreaseFactor(int waitIncreaseFactor)
    • setWaitTimeInMs

      public void setWaitTimeInMs(int waitTimeInMs)
    • getNumOfRetries

      public int getNumOfRetries()
    • getWaitIncreaseFactor

      public int getWaitIncreaseFactor()
    • getWaitTimeInMs

      public int getWaitTimeInMs()