List of usage examples for com.amazonaws.services.cloudfront.model DistributionList getNextMarker
public String getNextMarker()
If IsTruncated is true, this element is present and contains the value you can use for the Marker request parameter to continue listing your distributions where they left off.
From source file:org.duracloud.s3task.streaminghls.BaseHlsTaskRunner.java
License:Apache License
/** * Determines if a streaming distribution already exists for a given bucket *//*from www. j ava2 s . c o m*/ protected List<DistributionSummary> getAllExistingWebDistributions(String bucketName) { List<DistributionSummary> distListForBucket = new ArrayList<>(); DistributionList distList = cfClient.listDistributions(new ListDistributionsRequest()) .getDistributionList(); List<DistributionSummary> webDistList = distList.getItems(); while (distList.isTruncated()) { distList = cfClient .listDistributions(new ListDistributionsRequest().withMarker(distList.getNextMarker())) .getDistributionList(); webDistList.addAll(distList.getItems()); } for (DistributionSummary distSummary : webDistList) { if (isDistFromBucket(bucketName, distSummary)) { distListForBucket.add(distSummary); } } return distListForBucket; }