Package org.jclouds.compute.functions
Class PollNodeRunning
- java.lang.Object
-
- org.jclouds.compute.functions.PollNodeRunning
-
- All Implemented Interfaces:
com.google.common.base.Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
,Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
@Named("jclouds.compute.timeout.node-running") public class PollNodeRunning extends Object implements com.google.common.base.Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
Polls until the node is running or throwsIllegalStateException
if this cannot be achieved within the timeout.
-
-
Constructor Summary
Constructors Constructor Description PollNodeRunning(com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtomicReference<NodeMetadata>
apply(AtomicReference<NodeMetadata> node)
-
-
-
Constructor Detail
-
PollNodeRunning
@Inject public PollNodeRunning(@Named("jclouds.compute.timeout.node-running") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning)
-
-
Method Detail
-
apply
public AtomicReference<NodeMetadata> apply(AtomicReference<NodeMetadata> node) throws IllegalStateException
- Specified by:
apply
in interfacecom.google.common.base.Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
- Specified by:
apply
in interfaceFunction<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
- Parameters:
node
- will be updated with the node which is running- Throws:
IllegalStateException
-
-