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
InterceptsActivitiOptimisticLockingExceptionand tries to run the same command again. The number of retries and the time waited between retries is configurable.
-
-
Field Summary
Fields Modifier and Type Field Description protected intnumOfRetriesprotected intwaitIncreaseFactorprotected intwaitTimeInMs-
Fields inherited from class org.activiti.engine.impl.interceptor.AbstractCommandInterceptor
next
-
-
Constructor Summary
Constructors Constructor Description RetryInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Texecute(CommandConfig config, Command<T> command)intgetNumOfRetries()intgetWaitIncreaseFactor()intgetWaitTimeInMs()voidsetNumOfRetries(int numOfRetries)voidsetWaitIncreaseFactor(int waitIncreaseFactor)voidsetWaitTimeInMs(int waitTimeInMs)protected voidwaitBeforeRetry(long waitTime)-
Methods inherited from class org.activiti.engine.impl.interceptor.AbstractCommandInterceptor
getNext, setNext
-
-
-
-
Method Detail
-
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()
-
-