Class CurrentTaskFuture.DownAllTheWay
- java.lang.Object
-
- org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.DownAllTheWay
-
- All Implemented Interfaces:
java.lang.Runnable,CurrentTaskFuture.AllTheWay
- Enclosing class:
- CurrentTaskFuture
private class CurrentTaskFuture.DownAllTheWay extends java.lang.Object implements java.lang.Runnable, CurrentTaskFuture.AllTheWay
Goes down all the way to the proposed level
-
-
Field Summary
Fields Modifier and Type Field Description private booleancancelledprivate booleandoneprivate booleandownHardCancelledprivate CurrentTaskFuturefutureprivate intgoingToprivate CurrentTaskFuture.HardCancelDownTimerhardCancelDownTimerprivate java.lang.ThrowablelastErrorprivate ActiveDescriptor<?>lastErrorDescriptorprivate java.util.List<ServiceHandle<RunLevelListener>>listenersprivate java.util.List<ActiveDescriptor<?>>queueprivate booleanrepurposedprivate intworkingOn
-
Constructor Summary
Constructors Constructor Description DownAllTheWay(int goingTo, CurrentTaskFuture future, java.util.List<ServiceHandle<RunLevelListener>> listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcancel()private intgetGoingTo()voidrun()private voidsetGoingTo(int goingTo, boolean repurposed)java.lang.BooleanwaitForResult(long timeout, java.util.concurrent.TimeUnit unit)The method to call on the internal job
-
-
-
Field Detail
-
goingTo
private int goingTo
-
future
private CurrentTaskFuture future
-
listeners
private final java.util.List<ServiceHandle<RunLevelListener>> listeners
-
workingOn
private int workingOn
-
cancelled
private boolean cancelled
-
done
private boolean done
-
repurposed
private boolean repurposed
-
lastError
private java.lang.Throwable lastError
-
lastErrorDescriptor
private ActiveDescriptor<?> lastErrorDescriptor
-
queue
private java.util.List<ActiveDescriptor<?>> queue
-
downHardCancelled
private boolean downHardCancelled
-
hardCancelDownTimer
private CurrentTaskFuture.HardCancelDownTimer hardCancelDownTimer
-
-
Constructor Detail
-
DownAllTheWay
public DownAllTheWay(int goingTo, CurrentTaskFuture future, java.util.List<ServiceHandle<RunLevelListener>> listeners)
-
-
Method Detail
-
cancel
private void cancel()
-
setGoingTo
private void setGoingTo(int goingTo, boolean repurposed)
-
getGoingTo
private int getGoingTo()
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
waitForResult
public java.lang.Boolean waitForResult(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, MultiExceptionDescription copied from interface:CurrentTaskFuture.AllTheWayThe method to call on the internal job- Specified by:
waitForResultin 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:
java.lang.InterruptedException- On a thread getting jackedMultiException- Other exceptions
-
-