org.jclouds.gogrid.predicates
Class ServerLatestJobCompleted

java.lang.Object
  extended by org.jclouds.gogrid.predicates.ServerLatestJobCompleted
All Implemented Interfaces:
com.google.common.base.Predicate<Server>

@Singleton
public class ServerLatestJobCompleted
extends Object
implements com.google.common.base.Predicate<Server>

Checks if the latest job for the server is in "Succeeded" state. To achieve meaningful results, this must be run in a sequential environment when a server has only one job related to it at a time. The passed server instance must not be null and must have a name.


Field Summary
protected  GridJobApi jobClient
           
protected  org.jclouds.logging.Logger logger
           
 
Constructor Summary
ServerLatestJobCompleted(GridJobApi jobClient)
           
 
Method Summary
 boolean apply(Server server)
           
 
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.Predicate
equals
 

Field Detail

jobClient

protected GridJobApi jobClient

logger

protected org.jclouds.logging.Logger logger
Constructor Detail

ServerLatestJobCompleted

@Inject
public ServerLatestJobCompleted(GridJobApi jobClient)
Method Detail

apply

public boolean apply(Server server)
Specified by:
apply in interface com.google.common.base.Predicate<Server>


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