Package org.jclouds.glacier.blobstore.strategy.internal

Examples of org.jclouds.glacier.blobstore.strategy.internal.BasePollingStrategy


         assertThat(api.listJobs(VAULT_NAME)).extracting("jobId").contains(inventoryRetrievalJob, archiveRetrievalJob);
   }

   @Test(groups = {"live", "livelong", "longtest"}, dependsOnMethods = {"testInitiateJob", "testDescribeJob", "testListJobs"})
   public void testWaitForSucceed() throws InterruptedException {
      new BasePollingStrategy(api).waitForSuccess(VAULT_NAME, archiveRetrievalJob);
      new BasePollingStrategy(0, DEFAULT_TIME_BETWEEN_POLLS, api).waitForSuccess(VAULT_NAME, inventoryRetrievalJob);
      assertThat(api.describeJob(VAULT_NAME, archiveRetrievalJob).getStatusCode()).isEqualTo(JobStatus.SUCCEEDED);
      assertThat(api.describeJob(VAULT_NAME, inventoryRetrievalJob).getStatusCode()).isEqualTo(JobStatus.SUCCEEDED);
   }
View Full Code Here


      // Initiate job
      String jobId = client.initiateJob(vaultName, archiveRetrievalJobRequest);
      try {
         // Poll until the job is done
         new BasePollingStrategy(client).waitForSuccess(vaultName, jobId);

         // Get the job output
         Payload result = client.getJobOutput(vaultName, jobId);

         // Print the result
View Full Code Here

TOP

Related Classes of org.jclouds.glacier.blobstore.strategy.internal.BasePollingStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.