|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--springs.util.retries.RetryingStrategy
A retrying strategy.
Field Summary | |
private int |
_hours
|
private java.lang.Exception |
_lastException
|
private long |
_millis
|
private int |
_mins
|
private int |
_nHours
|
private int |
_nMillis
|
private int |
_nMins
|
private int |
_nSecs
|
private int |
_secs
|
Constructor Summary | |
RetryingStrategy(long millis,
int nMillis,
int secs,
int nSecs,
int mins,
int nMins,
int hours,
int nHours)
Constructor. |
Method Summary | |
java.lang.Object |
clone()
|
long |
failed(java.lang.Exception e)
Registers a fail and gets the milliseconds to wait until the next try. |
long |
getMillisNextAttempt()
Gets the milliseconds to wait until the next try. |
private void |
throwOutOfAttemptsException()
Throws an OutOfAttemptsException. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private long _millis
private int _nMillis
private int _nSecs
private int _nMins
private int _nHours
private int _hours
private int _mins
private int _secs
private java.lang.Exception _lastException
Constructor Detail |
public RetryingStrategy(long millis, int nMillis, int secs, int nSecs, int mins, int nMins, int hours, int nHours)
Method Detail |
public long failed(java.lang.Exception e) throws OutOfAttemptsException
e
- the exception thrown.
OutOfAttemptsException
- if there are no more attempts left.Exception
,
OutOfAttemptsException
public long getMillisNextAttempt() throws OutOfAttemptsException
OutOfAttemptsException
- if there are no more attempts left.OutOfAttemptsException
private void throwOutOfAttemptsException() throws OutOfAttemptsException
OutOfAttemptsException
- always.OutOfAttemptsException
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |