Example usage for com.amazonaws.services.route53.model ListHostedZonesResult isTruncated

List of usage examples for com.amazonaws.services.route53.model ListHostedZonesResult isTruncated

Introduction

In this page you can find the example usage for com.amazonaws.services.route53.model ListHostedZonesResult isTruncated.

Prototype

Boolean isTruncated

To view the source code for com.amazonaws.services.route53.model ListHostedZonesResult isTruncated.

Click Source Link

Document

A flag indicating whether there are more hosted zones to be listed.

Usage

From source file:com.github.blacklocus.rdsecho.utl.Route53Find.java

License:Open Source License

public Iterable<HostedZone> hostedZones(final Predicate<HostedZone> predicate) {
    return new PagingIterable<HostedZone>(new Supplier<Iterable<HostedZone>>() {

        String nextMarker = null;
        boolean isTruncated = true;

        @Override// w w w. j a v  a2s.c  om
        public Iterable<HostedZone> get() {
            if (isTruncated) {
                ListHostedZonesRequest request = new ListHostedZonesRequest().withMarker(nextMarker);
                ListHostedZonesResult result = route53.listHostedZones();
                nextMarker = result.getNextMarker();
                isTruncated = result.isTruncated();
                return Iterables.filter(result.getHostedZones(), predicate);

            } else {
                return Collections.emptyList();
            }
        }
    });
}

From source file:org.lendingclub.mercator.aws.Route53Scanner.java

License:Apache License

@Override
protected void doScan() {

    ListHostedZonesRequest request = new ListHostedZonesRequest();
    ListHostedZonesResult result = new ListHostedZonesResult();

    do {//www  .j  av a2  s . c om
        result = getClient().listHostedZones(request);
        for (HostedZone zone : result.getHostedZones()) {
            scanHostedZoneById(zone.getId());
        }
        request.setMarker(result.getMarker());
    } while (result.isTruncated());

}