Class WritableFuture<V>
- java.lang.Object
-
- io.vertigo.datafactory.impl.search.WritableFuture<V>
-
-
Constructor Summary
Constructors Constructor Description WritableFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
void
fail(Exception exception)
Mark this execution as failed.V
get()
V
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
void
success(V result)
Mark this execution as success.
-
-
-
Method Detail
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
success
public void success(V result)
Mark this execution as success.- Parameters:
result
- Result of execution
-
fail
public void fail(Exception exception)
Mark this execution as failed.- Parameters:
exception
- Failure reason
-
-