Package com.yahoo.yolean.concurrent
Interface Sleeper
public interface Sleeper
An abstraction used for mocking
Thread.sleep(long)
in unit tests.- Author:
- bjorncs
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
sleep
(long millis) default void
void
sleepChecked
(long millis) default void
sleepChecked
(Duration duration)
-
Field Details
-
DEFAULT
-
NOOP
-
-
Method Details
-
sleep
- Throws:
UncheckedInterruptedException
-
sleepChecked
- Throws:
InterruptedException
-
sleep
- Throws:
UncheckedInterruptedException
-
sleepChecked
- Throws:
InterruptedException
-