|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.batch.retry.backoff.StatelessBackOffPolicy
org.springframework.batch.retry.backoff.FixedBackOffPolicy
public class FixedBackOffPolicy
Implementation of BackOffPolicy
that pauses for a fixed period of
time before continuing. A pause is implemented using Thread.sleep(long)
.
setBackOffPeriod(long)
is thread-safe and it is safe to call
setBackOffPeriod(long)
during execution from multiple threads, however
this may cause a single retry operation to have pauses of different
intervals.
Constructor Summary | |
---|---|
FixedBackOffPolicy()
|
Method Summary | |
---|---|
protected void |
doBackOff()
Pause for the setBackOffPeriod(long) . |
long |
getBackOffPeriod()
The backoff period in milliseconds. |
void |
setBackOffPeriod(long backOffPeriod)
Set the back off period in milliseconds. |
void |
setSleeper(Sleeper sleeper)
Public setter for the Sleeper strategy. |
Methods inherited from class org.springframework.batch.retry.backoff.StatelessBackOffPolicy |
---|
backOff, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedBackOffPolicy()
Method Detail |
---|
public void setSleeper(Sleeper sleeper)
Sleeper
strategy.
sleeper
- the sleeper to set defaults to ObjectWaitSleeper
.public void setBackOffPeriod(long backOffPeriod)
public long getBackOffPeriod()
protected void doBackOff() throws BackOffInterruptedException
setBackOffPeriod(long)
.
doBackOff
in class StatelessBackOffPolicy
BackOffInterruptedException
- if interrupted during sleep.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |