|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.TimeUtils
public class TimeUtils
Various utilities for waiting some time.
Constructor Summary | |
---|---|
TimeUtils()
|
Method Summary | |
---|---|
static void |
exponentialBackoffSleep(int attempt)
Sleep for an exponentially backing off amount of time, in milliseconds. |
static void |
exponentialBackoffSleep(int attempt,
int timeunit)
Sleep for an exponentially backing off amount of time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeUtils()
Method Detail |
---|
public static void exponentialBackoffSleep(int attempt)
attempt
- The attempt number, which is the log2 of the number of
milliseconds spent asleep.public static void exponentialBackoffSleep(int attempt, int timeunit)
attempt
- The attempt number, which is the log2 of the number of
timeunits spent asleep.timeunit
- the specified timeunit in miliseconds
ArgumentNotValid
- if timeunit is unsupported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |