org.jclouds.rackspace.clouddns.v1.predicates
Class JobPredicates

java.lang.Object
  extended by org.jclouds.rackspace.clouddns.v1.predicates.JobPredicates

public class JobPredicates
extends Object

Useful Predicates for dealing with Jobs.


Method Summary
static
<T> T
awaitComplete(CloudDNSApi api, Job<T> job)
          Tests to see if a Job has completed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

awaitComplete

public static <T> T awaitComplete(CloudDNSApi api,
                                  Job<T> job)
                       throws TimeoutException
Tests to see if a Job has completed.
 CreateDomain createDomain1 = CreateDomain.builder()
    .name("jclouds-example.org")
    .email("jclouds@jclouds-example.org")
    .ttl(600001)
    .comment("Hello Domain 1")
    .build();

 Iterable<CreateDomain> createDomains = ImmutableList.of(createDomain1);      
 Set<Domain> domains = awaitComplete(api, api.getDomainApi().create(createDomains));
 
 

Throws:
TimeoutException


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