Class Future
java.lang.Object
ch.nolix.base.programcontrol.future.AbstractFuture
ch.nolix.base.programcontrol.jobpool.Future
- All Implemented Interfaces:
IFuture, FinishRequestable
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FutureforJobWrapper(ch.nolix.base.programcontrol.jobpool.JobWrapper jobWrapper) getError()booleanvoidLets the currentIFuturewait until it is finished.voidwaitUntilIsFinished(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished within the given timeoutInMilliseconds.Methods inherited from class AbstractFuture
isFinishedSuccessfully, isFinishedWithError, waitUntilIsFinishedSuccessfully, waitUntilIsFinishedSuccessfullyMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FinishRequestable
isRunning
-
Method Details
-
forJobWrapper
- Parameters:
jobWrapper-- Returns:
- a new
Futurefor the given jobWrapper. - Throws:
RuntimeException- if the given jobWrapper is null.
-
caughtError
public boolean caughtError()- Returns:
- true if the current
IFuturecaught an error, false otherwise.
-
getError
-
isFinished
public boolean isFinished()- Returns:
- true if the current
FinishRequestableis finished, false otherwise.
-
waitUntilIsFinished
public void waitUntilIsFinished()Lets the currentIFuturewait until it is finished. -
waitUntilIsFinished
public void waitUntilIsFinished(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished within the given timeoutInMilliseconds.- Parameters:
timeoutInMilliseconds-
-