org.gridbus.broker.util
Class SleepUtil
java.lang.Object
org.gridbus.broker.util.SleepUtil
public class SleepUtil
- extends java.lang.Object
- Author:
- marcos
|
Method Summary |
static void |
randomSleep()
Sleeps for a random amount of time upto a max of MEDIUM_SLEEP milliseconds. |
static void |
randomSleep(long max)
Sleeps for a random amount of time upto a max given milliseconds. |
static void |
safeSleep(long time)
|
static void |
sleep(long time)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TINY_SLEEP
public static final long TINY_SLEEP
- See Also:
- Constant Field Values
HALFSMALL_SLEEP
public static final long HALFSMALL_SLEEP
- See Also:
- Constant Field Values
SMALL_SLEEP
public static final long SMALL_SLEEP
- See Also:
- Constant Field Values
MEDIUM_SLEEP
public static final long MEDIUM_SLEEP
- See Also:
- Constant Field Values
LONG_SLEEP
public static final long LONG_SLEEP
- See Also:
- Constant Field Values
SleepUtil
public SleepUtil()
safeSleep
public static void safeSleep(long time)
- Parameters:
time -
sleep
public static void sleep(long time)
throws java.lang.InterruptedException
- Parameters:
time -
- Throws:
java.lang.InterruptedException
randomSleep
public static void randomSleep(long max)
- Sleeps for a random amount of time upto a max given milliseconds.
Random sleep is always a safe sleep.
- Parameters:
max - (maximum milliseconds to sleep)
randomSleep
public static void randomSleep()
- Sleeps for a random amount of time upto a max of MEDIUM_SLEEP milliseconds.
Random sleep is always a safe sleep