Constructor and Description |
---|
LazyFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
reset()
Reset this future to the initial state.
|
protected abstract T |
run()
Run computation and produce the result.
|
public boolean reset()
false
if it was already in initial stateprotected abstract T run() throws Exception
Exception
public boolean cancel(boolean mayInterruptIfRunning)
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public boolean isCancelled()
isCancelled
in interface Future<T>
Copyright © 2017 JBoss by Red Hat. All rights reserved.