Class ConcurrentExecutionStatus
java.lang.Object
org.eclipse.epsilon.common.concurrent.ConcurrentExecutionStatus
- Direct Known Subclasses:
SingleConcurrentExecutionStatus
A status object used in co-ordinating concurrent jobs.
- Since:
- 1.6
- Author:
- Sina Madani
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcompleteExceptionally(Throwable exception) protected final booleanfinal voidprotected abstract voidcompleteSuccessfully(Object lockObj) final voidcompleteWithResult(Object result) protected abstract voidcompleteWithResult(Object lockObj, Object result) final Objectprotected abstract Objectfinal booleanprotected abstract booleanisInProgress(Object lockObj) final booleanregister()protected abstract booleanfinal booleanprotected final booleanwaitForCompletion(Object lockObj) protected abstract booleanwaitForCompletion(Object lockObj, Supplier<Boolean> targetState) Waits until either exceptional or successful completion conditions are signalled.final booleanwaitForCompletion(Supplier<Boolean> targetState)
-
Field Details
-
exception
-
-
Constructor Details
-
ConcurrentExecutionStatus
public ConcurrentExecutionStatus()
-
-
Method Details
-
getException
-
getResult
-
getResult
-
register
public final boolean register() -
register
- Parameters:
lockObj-- Returns:
trueif registration was successful.
-
isInProgress
public final boolean isInProgress() -
isInProgress
-
completeSuccessfully
public final void completeSuccessfully() -
completeSuccessfully
-
completeWithResult
-
completeWithResult
-
completeExceptionallyBase
-
completeExceptionally
-
waitForExceptionalCompletion
-
waitForCompletion
Waits until either exceptional or successful completion conditions are signalled.- Returns:
- Whether the completion was successful (
true) or exceptional (false).
-
waitForCompletion
-
waitForCompletion
-
waitForCompletion
public final boolean waitForCompletion()
-