org.camunda.bpm.engine.impl.interceptor
Class RetryInterceptor

java.lang.Object
  extended by org.camunda.bpm.engine.impl.interceptor.CommandInterceptor
      extended by org.camunda.bpm.engine.impl.interceptor.RetryInterceptor
All Implemented Interfaces:
CommandExecutor
Direct Known Subclasses:
JtaRetryInterceptor

public class RetryInterceptor
extends CommandInterceptor

Intercepts OptimisticLockingException and tries to run the same command again. The number of retries and the time waited between retries is configurable.

Author:
Daniel Meyer

Field Summary
protected  int numOfRetries
           
protected  int waitIncreaseFactor
           
protected  int waitTimeInMs
           
 
Fields inherited from class org.camunda.bpm.engine.impl.interceptor.CommandInterceptor
next
 
Constructor Summary
RetryInterceptor()
           
 
Method Summary
<T> T
execute(Command<T> command)
           
 int getNumOfRetries()
           
 int getWaitIncreaseFactor()
           
 int getWaitTimeInMs()
           
 void setNumOfRetries(int numOfRetries)
           
 void setWaitIncreaseFactor(int waitIncreaseFactor)
           
 void setWaitTimeInMs(int waitTimeInMs)
           
protected  void waitBeforeRetry(long waitTime)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.interceptor.CommandInterceptor
getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numOfRetries

protected int numOfRetries

waitTimeInMs

protected int waitTimeInMs

waitIncreaseFactor

protected int waitIncreaseFactor
Constructor Detail

RetryInterceptor

public RetryInterceptor()
Method Detail

execute

public <T> T execute(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()


Copyright © 2015 camunda services GmbH. All rights reserved.