Package google.registry.util
Class SystemSleeper
java.lang.Object
google.registry.util.SystemSleeper
- All Implemented Interfaces:
Sleeper
,Serializable
Implementation of
Sleeper
for production use.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sleep
(org.joda.time.ReadableDuration duration) Puts the current thread to sleep.void
sleepUninterruptibly
(org.joda.time.ReadableDuration duration) Puts the current thread to sleep, ignoring interrupts.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface google.registry.util.Sleeper
sleepInterruptibly
-
Constructor Details
-
SystemSleeper
@Inject public SystemSleeper()
-
-
Method Details
-
sleep
Description copied from interface:Sleeper
Puts the current thread to sleep.- Specified by:
sleep
in interfaceSleeper
- 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, thenThread.currentThread().interrupt()
will be called at the end of theduration
.- Specified by:
sleepUninterruptibly
in interfaceSleeper
- See Also:
-