org.jclouds.compute.callables
Class BlockUntilInitScriptStatusIsZeroThenReturnOutput
java.lang.Object
com.google.common.util.concurrent.AbstractFuture<ExecResponse>
org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput
- All Implemented Interfaces:
- com.google.common.util.concurrent.ListenableFuture<ExecResponse>, Future<ExecResponse>
public class BlockUntilInitScriptStatusIsZeroThenReturnOutput
- extends com.google.common.util.concurrent.AbstractFuture<ExecResponse>
A future that works in tandem with a task that was invoked by
InitScript
- Author:
- Adrian Cole
Methods inherited from class com.google.common.util.concurrent.AbstractFuture |
addListener, cancel, get, isCancelled, isDone, setException |
logger
protected Logger logger
BlockUntilInitScriptStatusIsZeroThenReturnOutput
@Inject
public BlockUntilInitScriptStatusIsZeroThenReturnOutput(ExecutorService userThreads,
com.google.common.eventbus.EventBus eventBus,
ComputeServiceConstants.InitStatusProperties properties,
ScriptStatusReturnsZero stateRunning,
SudoAwareInitManager commandRunner)
getCommandRunner
public SudoAwareInitManager getCommandRunner()
setSshClient
public void setSshClient(SshClient client)
- in case login credentials or user changes at runtime.
init
public BlockUntilInitScriptStatusIsZeroThenReturnOutput init()
- Submits a thread that will either set the result of the future or the
exception that took place
set
protected boolean set(ExecResponse value)
- Overrides:
set
in class com.google.common.util.concurrent.AbstractFuture<ExecResponse>
interruptTask
protected void interruptTask()
- Overrides:
interruptTask
in class com.google.common.util.concurrent.AbstractFuture<ExecResponse>
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
get
public ExecResponse get(long timeout,
TimeUnit unit)
throws InterruptedException,
TimeoutException,
ExecutionException
- Specified by:
get
in interface Future<ExecResponse>
- Overrides:
get
in class com.google.common.util.concurrent.AbstractFuture<ExecResponse>
- Throws:
InterruptedException
TimeoutException
ExecutionException
Copyright © 2009-2012 jclouds. All Rights Reserved.