org.jclouds.compute.functions
Class PollNodeRunning

java.lang.Object
  extended by org.jclouds.compute.functions.PollNodeRunning
All Implemented Interfaces:
com.google.common.base.Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>

@Named(value="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 throws IllegalStateException if this cannot be achieved within the timeout.


Constructor Summary
PollNodeRunning(com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning)
           
 
Method Summary
 AtomicReference<NodeMetadata> apply(AtomicReference<NodeMetadata> node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

PollNodeRunning

@Inject
public PollNodeRunning(@Named(value="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 interface com.google.common.base.Function<AtomicReference<NodeMetadata>,AtomicReference<NodeMetadata>>
Parameters:
node - will be updated with the node which is running
Throws:
{@link - IllegalStateException} if this cannot be achieved within the timeout.
IllegalStateException


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.