|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.retry.policy.TimeoutRetryPolicy
public class TimeoutRetryPolicy
A RetryPolicy that allows a retry only if it hasn't timed out. The
clock is started on a call to open(RetryContext).
| Field Summary | |
|---|---|
static long |
DEFAULT_TIMEOUT
Default value for timeout (milliseconds). |
| Constructor Summary | |
|---|---|
TimeoutRetryPolicy()
|
|
| Method Summary | |
|---|---|
boolean |
canRetry(RetryContext context)
Only permits a retry if the timeout has not expired. |
void |
close(RetryContext context)
|
long |
getTimeout()
The value of the timeout. |
RetryContext |
open(RetryContext parent)
Acquire resources needed for the retry operation. |
void |
registerThrowable(RetryContext context,
Throwable throwable)
Called once per retry attempt, after the callback fails. |
void |
setTimeout(long timeout)
Setter for timeout in milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_TIMEOUT
| Constructor Detail |
|---|
public TimeoutRetryPolicy()
| Method Detail |
|---|
public void setTimeout(long timeout)
DEFAULT_TIMEOUT.
timeout - public long getTimeout()
public boolean canRetry(RetryContext context)
canRetry in interface RetryPolicycontext - the current retry status
RetryPolicy.canRetry(org.springframework.batch.retry.RetryContext)public void close(RetryContext context)
close in interface RetryPolicycontext - a retry status created by the
RetryPolicy.open(RetryContext) method of this manager.public RetryContext open(RetryContext parent)
RetryPolicy
open in interface RetryPolicyparent - the parent context if we are in a nested retry.
RetryContext object specific to this manager.
public void registerThrowable(RetryContext context,
Throwable throwable)
RetryPolicy
registerThrowable in interface RetryPolicycontext - the current status object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||