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
Intercepts
ActivitiOptimisticLockingException and tries to run the same command again. The number of retries and the time waited between retries is configurable.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intFields inherited from class org.activiti.engine.impl.interceptor.AbstractCommandInterceptor
next -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Texecute(CommandConfig config, Command<T> command) intintintvoidsetNumOfRetries(int numOfRetries) voidsetWaitIncreaseFactor(int waitIncreaseFactor) voidsetWaitTimeInMs(int waitTimeInMs) protected voidwaitBeforeRetry(long waitTime) Methods inherited from class org.activiti.engine.impl.interceptor.AbstractCommandInterceptor
getNext, setNext
-
Field Details
-
numOfRetries
protected int numOfRetries -
waitTimeInMs
protected int waitTimeInMs -
waitIncreaseFactor
protected int waitIncreaseFactor
-
-
Constructor Details
-
RetryInterceptor
public RetryInterceptor()
-
-
Method Details
-
execute
-
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()
-