Class CurrentTaskFuture.DownAllTheWay
java.lang.Object
org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.DownAllTheWay
- All Implemented Interfaces:
Runnable
,CurrentTaskFuture.AllTheWay
- Enclosing class:
CurrentTaskFuture
private class CurrentTaskFuture.DownAllTheWay
extends Object
implements Runnable, CurrentTaskFuture.AllTheWay
Goes down all the way to the proposed level
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private CurrentTaskFuture
private int
private Throwable
private ActiveDescriptor
<?> private final List
<ServiceHandle<RunLevelListener>> private List
<ActiveDescriptor<?>> private boolean
private int
-
Constructor Summary
ConstructorsConstructorDescriptionDownAllTheWay
(int goingTo, CurrentTaskFuture future, List<ServiceHandle<RunLevelListener>> listeners) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
cancel()
private int
void
run()
private void
setGoingTo
(int goingTo, boolean repurposed) waitForResult
(long timeout, TimeUnit unit) The method to call on the internal job
-
Field Details
-
goingTo
private int goingTo -
future
-
listeners
-
workingOn
private int workingOn -
cancelled
private boolean cancelled -
done
private boolean done -
repurposed
private boolean repurposed -
lastError
-
lastErrorDescriptor
-
queue
-
downHardCancelled
private boolean downHardCancelled -
hardCancelDownTimer
-
-
Constructor Details
-
DownAllTheWay
public DownAllTheWay(int goingTo, CurrentTaskFuture future, List<ServiceHandle<RunLevelListener>> listeners)
-
-
Method Details
-
cancel
private void cancel() -
setGoingTo
private void setGoingTo(int goingTo, boolean repurposed) -
getGoingTo
private int getGoingTo() -
run
public void run() -
waitForResult
public Boolean waitForResult(long timeout, TimeUnit unit) throws InterruptedException, MultiException Description copied from interface:CurrentTaskFuture.AllTheWay
The method to call on the internal job- Specified by:
waitForResult
in interfaceCurrentTaskFuture.AllTheWay
- Parameters:
timeout
- The amount of time to wait for a resultunit
- The unit of the above time value- Returns:
- True if the job finished, False if the timeout is up prior to the job finishing, and null if the job was repurposed and the caller may now need to listen on a different job
- Throws:
InterruptedException
- On a thread getting jackedMultiException
- Other exceptions
-