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 boolean
cancelled
private boolean
done
private boolean
downHardCancelled
private CurrentTaskFuture
future
private int
goingTo
private CurrentTaskFuture.HardCancelDownTimer
hardCancelDownTimer
private java.lang.Throwable
lastError
private ActiveDescriptor<?>
lastErrorDescriptor
private java.util.List<ServiceHandle<RunLevelListener>>
listeners
private java.util.List<ActiveDescriptor<?>>
queue
private boolean
repurposed
private int
workingOn
-
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 void
cancel()
private int
getGoingTo()
void
run()
private void
setGoingTo(int goingTo, boolean repurposed)
java.lang.Boolean
waitForResult(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:
run
in interfacejava.lang.Runnable
-
waitForResult
public java.lang.Boolean waitForResult(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.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:
java.lang.InterruptedException
- On a thread getting jackedMultiException
- Other exceptions
-
-