Class JobPredicates


  • public class JobPredicates
    extends Object
    Useful Predicates for dealing with Jobs.
    • 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