public class Threads extends Object
| Constructor and Description |
|---|
Threads() |
| Modifier and Type | Method and Description |
|---|---|
void |
doAndWaitUntil(Runnable runnable,
BooleanSupplier state,
Object semaphore) |
<T> T |
doAndWaitUntil(Supplier<T> supplier,
BooleanSupplier state,
Object semaphore) |
void |
rethrowInterrupt(InterruptedException e)
Wraps the given
InterruptedException in an UncheckedInterruptedException and re-interrupts the
thread. |
void |
sleep(long milliSeconds) |
void |
waitUntilAndDo(BooleanSupplier state,
Runnable runnable,
Object semaphore) |
<T> T |
waitUntilAndDo(BooleanSupplier state,
Supplier<T> supplier,
Object semaphore) |
public void sleep(long milliSeconds)
UncheckedInterruptedException - If the thread was interrupted.public void doAndWaitUntil(Runnable runnable, BooleanSupplier state, Object semaphore)
public <T> T doAndWaitUntil(Supplier<T> supplier, BooleanSupplier state, Object semaphore)
public void waitUntilAndDo(BooleanSupplier state, Runnable runnable, Object semaphore)
public <T> T waitUntilAndDo(BooleanSupplier state, Supplier<T> supplier, Object semaphore)
public void rethrowInterrupt(InterruptedException e)
InterruptedException in an UncheckedInterruptedException and re-interrupts the
thread.UncheckedInterruptedException - Wrapping the given InterruptedException.Copyright © 2020. All rights reserved.