@Retention(value=RUNTIME) @Target(value=METHOD) @Inherited @Documented public @interface UnitOfWorkRetry
ConcurrentEntityModificationException
occurs.| Modifier and Type | Optional Element and Description |
|---|---|
long |
delayFactor
Number of milliseconds to be added for each additional retry, beyond the second one.
|
long |
initialDelay
Number of milliseconds to wait before executing the second UnitOfOfWork.
|
int |
retries
Number of times that the UnitOfWork should be tried in total.
|
public abstract int retries
public abstract long initialDelay
public abstract long delayFactor
Thread.sleep( initialDelay + retry * delayFactor );
where retry will be 0 after first UnitOfWork had a ConcurrentEntityModificationException and is 1 after
the first retry and so forth.
So, with the retries=4, initialDelay=5, delayFactor=20 the 3 delays between the UnitOfWorks will be
5ms, 25ms, 45ms