org.gridbus.broker.util
Class SleepUtil

java.lang.Object
  extended by org.gridbus.broker.util.SleepUtil

public class SleepUtil
extends java.lang.Object

Author:
marcos

Field Summary
static long HALFSMALL_SLEEP
           
static long LONG_SLEEP
           
static long MEDIUM_SLEEP
           
static long SMALL_SLEEP
           
static long TINY_SLEEP
           
 
Constructor Summary
SleepUtil()
           
 
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
 

Field Detail

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
Constructor Detail

SleepUtil

public SleepUtil()
Method Detail

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


Copyright © The University of Melbourne. 2006