Package com.yahoo.yolean.concurrent
Interface Sleeper
-
public interface Sleeper
An abstraction used for mockingThread.sleep(long)
in unit tests.- Author:
- bjorncs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
sleep(long millis)
default void
sleep(java.time.Duration duration)
void
sleepChecked(long millis)
default void
sleepChecked(java.time.Duration duration)
-
-
-
Method Detail
-
sleep
default void sleep(java.time.Duration duration) throws UncheckedInterruptedException
- Throws:
UncheckedInterruptedException
-
sleepChecked
default void sleepChecked(java.time.Duration duration) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
sleep
default void sleep(long millis) throws UncheckedInterruptedException
- Throws:
UncheckedInterruptedException
-
sleepChecked
void sleepChecked(long millis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-