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 byInitScript
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory
-
Constructor Summary
Constructors Constructor Description BlockUntilInitScriptStatusIsZeroThenReturnOutput(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
ExecResponse
get(long timeout, TimeUnit unit)
SudoAwareInitManager
getCommandRunner()
int
hashCode()
BlockUntilInitScriptStatusIsZeroThenReturnOutput
init()
Submits a thread that will either set the result of the future or the exception that took placeprotected void
interruptTask()
void
run()
protected boolean
set(ExecResponse value)
String
toString()
-
-
-
Field Detail
-
logger
protected Logger logger
-
-
Constructor Detail
-
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 Detail
-
getCommandRunner
public SudoAwareInitManager getCommandRunner()
-
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 classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
interruptTask
protected void interruptTask()
- Overrides:
interruptTask
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
toString
public String toString()
- Overrides:
toString
in classcom.google.common.util.concurrent.AbstractFuture<ExecResponse>
-
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
-
-