public enum ExecutorHelper extends Enum<ExecutorHelper>
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
await(Promise<T> promise)
Await method
|
static <T> Try<T> |
await(Promise<T> promise,
long duration,
TimeUnit timeUnit)
Await method for a given duration
|
static Executor |
create(ExecutorService executorService)
Factory
|
static ExecutorHelper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExecutorHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static ExecutorHelper[] values()
for (ExecutorHelper c : ExecutorHelper.values()) System.out.println(c);
public static ExecutorHelper valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Executor create(ExecutorService executorService)
executorService - The underlying executr servicepublic static <T> Try<T> await(Promise<T> promise)
promise - The promise to await forpublic static <T> Try<T> await(Promise<T> promise, long duration, TimeUnit timeUnit) throws TimeoutException
promise - The promise to await forTimeoutException - raised when no result is available after a given delayCopyright © 2017. All rights reserved.