Class Sleeper

java.lang.Object
org.kendar.sync.lib.utils.Sleeper

public class Sleeper extends Object
No thread lock wait
  • Constructor Details

    • Sleeper

      public Sleeper()
  • Method Details

    • sleep

      public static void sleep(long timeoutMillis)
      Runs a synchronized-based wait mechanism instead of sleep
      Parameters:
      timeoutMillis - Timeout in ms
    • sleep

      public static void sleep(long timeoutMillis, BooleanSupplier booleanSupplier)
    • sleepNoException

      public static void sleepNoException(long timeoutMillis, BooleanSupplier booleanSupplier)
    • sleepNoException

      public static void sleepNoException(long timeoutMillis, BooleanSupplier booleanSupplier, boolean silent)
    • yield

      public static void yield()
      Give control to other threads