Package org.jclouds.compute.callables
Class BlockUntilInitScriptStatusIsZeroThenReturnOutput
java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<ExecResponse>
org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<ExecResponse>
,Runnable
,Future<ExecResponse>
public class BlockUntilInitScriptStatusIsZeroThenReturnOutput
extends com.google.common.util.concurrent.AbstractFuture<ExecResponse>
implements Runnable
A future that works in tandem with a task that was invoked by
invalid reference
InitScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockUntilInitScriptStatusIsZeroThenReturnOutput
(com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.eventbus.EventBus eventBus, com.google.common.base.Predicate<String> notRunningAnymore, SudoAwareInitManager commandRunner) BlockUntilInitScriptStatusIsZeroThenReturnOutput
(com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.eventbus.EventBus eventBus, ComputeServiceConstants.InitStatusProperties properties, SudoAwareInitManager commandRunner) -
Method Summary
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, afterDone, cancel, get, isCancelled, isDone, pendingToString, setException, setFuture, tryInternalFastPathGetFailure, wasInterrupted
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Field Details
-
logger
-
-
Constructor Details
-
BlockUntilInitScriptStatusIsZeroThenReturnOutput
@Inject public BlockUntilInitScriptStatusIsZeroThenReturnOutput(com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.eventbus.EventBus eventBus, ComputeServiceConstants.InitStatusProperties properties, SudoAwareInitManager commandRunner) -
BlockUntilInitScriptStatusIsZeroThenReturnOutput
public BlockUntilInitScriptStatusIsZeroThenReturnOutput(com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.eventbus.EventBus eventBus, com.google.common.base.Predicate<String> notRunningAnymore, SudoAwareInitManager commandRunner)
-
-
Method Details
-
getCommandRunner
-
init
Submits a thread that will either set the result of the future or the exception that took place -
run
public void run() -
set
- Overrides:
set
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
interruptTask
protected void interruptTask()- Overrides:
interruptTask
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
toString
- Overrides:
toString
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
hashCode
public int hashCode() -
equals
-
get
public ExecResponse get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException - Specified by:
get
in interfaceFuture<ExecResponse>
- Overrides:
get
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
- Throws:
InterruptedException
TimeoutException
ExecutionException
-