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(Duration duration)
void
sleepChecked(long millis)
default void
sleepChecked(Duration duration)
-
-
-
Method Detail
-
sleep
default void sleep(Duration duration) throws UncheckedInterruptedException
- Throws:
UncheckedInterruptedException
-
sleepChecked
default void sleepChecked(Duration duration) throws InterruptedException
- Throws:
InterruptedException
-
sleep
default void sleep(long millis) throws UncheckedInterruptedException
- Throws:
UncheckedInterruptedException
-
sleepChecked
void sleepChecked(long millis) throws InterruptedException
- Throws:
InterruptedException
-
-