RESULT - Type of result to be returned from this executionpublic interface Execution<RESULT>
RESULT somewhen in the future.| Modifier and Type | Method and Description |
|---|---|
RESULT |
await()
Blocks execution of current thread, waiting for the execution to be finished.
|
RESULT |
awaitAtMost(CountDownWatch timeout)
Blocks execution of current thread, waiting for the execution to be finished.
|
RESULT |
awaitAtMost(long timeout,
TimeUnit unit)
Blocks execution of current thread, waiting for the execution to be finished.
|
boolean |
hasFailed()
Checks whether execution failed.
|
boolean |
isFinished()
Checks whether process has finished
|
boolean |
isMarkedAsFinished()
Checks whether process is marked as finished.
|
Execution<RESULT> |
markAsFinished()
Marks execution as finished.
|
Execution<RESULT> |
reexecuteEvery(long step,
TimeUnit unit)
Sets interval for execution reexecution.
|
Execution<RESULT> |
registerShutdownHook()
Registers a shutdown hook that is applied in case program is still running when JVM is going to terminate.
|
Execution<RESULT> |
terminate()
Immediately terminates execution evaluation.
|
RESULT |
until(CountDownWatch timeout,
ExecutionCondition<RESULT> condition)
Continues (re)executing the execution until condition is satisfied.
|
RESULT |
until(long timeout,
TimeUnit unit,
ExecutionCondition<RESULT> condition)
Continues (re)executing the execution until condition is satisfied.
|
Execution<RESULT> markAsFinished()
Execution<RESULT> registerShutdownHook()
boolean isMarkedAsFinished()
boolean isFinished()
boolean hasFailed()
throws IllegalStateException
IllegalStateException - If execution status could not yet be determinedExecution<RESULT> terminate() throws ExecutionException
ExecutionExceptionRESULT await() throws ExecutionException
ExecutionExceptionRESULT awaitAtMost(long timeout, TimeUnit unit) throws ExecutionException, TimeoutExecutionException
timeout - the timeoutunit - timeout unitExecutionException - If execution failedTimeoutExecutionException - If execution was not retrieved during the timeoutRESULT awaitAtMost(CountDownWatch timeout) throws ExecutionException, TimeoutExecutionException
timeout - the timeoutExecutionException - If execution failedTimeoutExecutionException - If execution was not retrieved during the timeoutExecution<RESULT> reexecuteEvery(long step, TimeUnit unit)
step - the time delayunit - time unitRESULT until(long timeout, TimeUnit unit, ExecutionCondition<RESULT> condition) throws ExecutionException, TimeoutExecutionException
timeout - the timeoutunit - condition - condition that determines whether reexecution should continueExecutionExceptionTimeoutExecutionExceptionRESULT until(CountDownWatch timeout, ExecutionCondition<RESULT> condition) throws ExecutionException, TimeoutExecutionException
timeout - the timeoutcondition - condition that determines whether reexecution should continueExecutionExceptionTimeoutExecutionExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.