Class SystemSleeper

java.lang.Object
google.registry.util.SystemSleeper
All Implemented Interfaces:
Sleeper, Serializable

@ThreadSafe public final class SystemSleeper extends Object implements Sleeper, Serializable
Implementation of Sleeper for production use.
See Also:
  • Constructor Details

    • SystemSleeper

      @Inject public SystemSleeper()
  • Method Details

    • sleep

      public void sleep(org.joda.time.ReadableDuration duration) throws InterruptedException
      Description copied from interface: Sleeper
      Puts the current thread to sleep.
      Specified by:
      sleep in interface Sleeper
      Throws:
      InterruptedException - if this thread was interrupted
    • sleepUninterruptibly

      public void sleepUninterruptibly(org.joda.time.ReadableDuration duration)
      Description copied from interface: Sleeper
      Puts the current thread to sleep, ignoring interrupts.

      If InterruptedException was caught, then Thread.currentThread().interrupt() will be called at the end of the duration.

      Specified by:
      sleepUninterruptibly in interface Sleeper
      See Also:
      • Uninterruptibles.sleepUninterruptibly(java.time.Duration)