Class RetryInterceptor
java.lang.Object
org.flowable.common.engine.impl.interceptor.AbstractCommandInterceptor
org.flowable.common.engine.impl.interceptor.RetryInterceptor
- All Implemented Interfaces:
CommandInterceptor
- Direct Known Subclasses:
JtaRetryInterceptor
Intercepts
FlowableOptimisticLockingException
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
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
Fields inherited from class org.flowable.common.engine.impl.interceptor.AbstractCommandInterceptor
next
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
execute
(CommandConfig config, Command<T> command, CommandExecutor commandExecutor) int
int
int
void
setNumOfRetries
(int numOfRetries) void
setWaitIncreaseFactor
(int waitIncreaseFactor) void
setWaitTimeInMs
(int waitTimeInMs) protected void
waitBeforeRetry
(long waitTime) Methods inherited from class org.flowable.common.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()
-