public void pollArchiveByDepositId(String depositId) throws ArchiveServiceException { archive_service.pollArchiveByDepositId(depositId); }
public void pollArchiveByDepositId(String depositId) throws ArchiveServiceException { archive_service.pollArchiveByDepositId(depositId); }
/** * This method polls for a collection and waits for it to transition from a * PENDING state. It then returns the new state. If the collection * remains in a PENDING state after a configured amount of time, it returns * PENDING. * * @param depositId the deposit id of the collection to poll for. * @return the status of the collection after either waiting a specified * time or the collection leaves a PENDING state. * @throws ArchiveServiceException */ private Status pollAndWaitForCollection(String depositId) throws ArchiveServiceException { Status collectionStatus = Status.PENDING; long sleepInterval; int count = 0; while (collectionStatus == Status.PENDING && count < POLL_COUNT) { sleepInterval = count * POLL_DELAY_FACTOR_MS; try{ Thread.sleep(sleepInterval); } catch (InterruptedException e) { // ignore } archiveService.pollArchiveByDepositId(depositId); collectionStatus = archiveService.getDepositStatus(depositId); ++count; } return collectionStatus; }
/** * This method polls for a collection and waits for it to transition from a * PENDING state. It then returns the new state. If the collection * remains in a PENDING state after a configured amount of time, it returns * PENDING. * * @param depositId the deposit id of the collection to poll for. * @return the status of the collection after either waiting a specified * time or the collection leaves a PENDING state. * @throws ArchiveServiceException */ private Status pollAndWaitForCollection(String depositId) throws ArchiveServiceException { Status collectionStatus = Status.PENDING; long sleepInterval; int count = 0; while (collectionStatus == Status.PENDING && count < POLL_COUNT) { sleepInterval = count * POLL_DELAY_FACTOR_MS; try{ Thread.sleep(sleepInterval); } catch (InterruptedException e) { // ignore } archiveService.pollArchiveByDepositId(depositId); collectionStatus = archiveService.getDepositStatus(depositId); ++count; } return collectionStatus; }
archiveService.pollArchiveByDepositId(depositID); Status entryStatus = archiveService.getDepositStatus(depositID); int count = 0; archiveService.pollArchiveByDepositId(depositID); entryStatus = archiveService.getDepositStatus(depositID); ++count;
archiveService.pollArchiveByDepositId(depositID); Status entryStatus = archiveService.getDepositStatus(depositID); int count = 0; archiveService.pollArchiveByDepositId(depositID); entryStatus = archiveService.getDepositStatus(depositID); ++count;