public class OptimisticLockRetryInterceptor
extends org.drools.core.command.impl.AbstractInterceptor
org.hibernate.StaleObjectStateException
and only
then attempt to retry.
Since this is Hibernate specific class another can be given as system property to override default. Name of the
system property org.kie.optlock.exclass
and its value should be fully qualified class name of the
exception that indicates OptimisticLocking.
By default it will:
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
targetExceptionClass |
Constructor and Description |
---|
OptimisticLockRetryInterceptor() |
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(org.kie.api.command.Command<T> command) |
long |
getDelay() |
long |
getDelayFactor() |
int |
getRetries() |
Class<?> |
getTargetExceptionClass() |
protected boolean |
isCausedByOptimisticLockingFailure(Throwable throwable) |
void |
setDelay(long delay) |
void |
setDelayFactor(long delayFactor) |
void |
setRetries(int retries) |
void |
setTargetExceptionClass(Class<?> targetExceptionClass) |
protected Class<?> targetExceptionClass
public <T> T execute(org.kie.api.command.Command<T> command)
protected boolean isCausedByOptimisticLockingFailure(Throwable throwable)
public int getRetries()
public void setRetries(int retries)
public long getDelay()
public void setDelay(long delay)
public long getDelayFactor()
public void setDelayFactor(long delayFactor)
public Class<?> getTargetExceptionClass()
public void setTargetExceptionClass(Class<?> targetExceptionClass)
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.