class S3ChangeLogStore implements ChangeLogStore {

    void listObjects(AmazonS3 s3, Collection<String> domains, long modTime) {

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("listObjects: Retrieving domains from {} with mod time > {}",
                    s3BucketName, modTime);
        }

        ObjectListing objectListing = s3.listObjects(new ListObjectsRequest()
                .withBucketName(s3BucketName));

        String objectName;
        while (objectListing != null) {

            // process each entry in our result set and add the domain
            // name to our return list

            final List<S3ObjectSummary> objectSummaries = objectListing.getObjectSummaries();
            boolean listTruncated = objectListing.isTruncated();

            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("listObjects: retrieved {} objects, more objects available - {}",
                        objectSummaries.size(), listTruncated);
            }

            for (S3ObjectSummary objectSummary : objectSummaries) {

                // if mod time is specified then make sure we automatically skip
                // any domains older than the specified value

                if (modTime > 0 && objectSummary.getLastModified().getTime() <= modTime) {
                    continue;
                }

                // for now skip any folders/objects that start with '.'

                objectName = objectSummary.getKey();
                if (objectName.charAt(0) == '.') {
                    continue;
                }
                domains.add(objectName);
            }

            // check if the object listing is truncated or not (break out in this case)
            // technically we can skip this call and just call listNextBatchOfResults
            // since that returns null if the object listing is not truncated but
            // this direct check here makes the logic easier to follow

            if (!listTruncated) {
                break;
            }

            objectListing = s3.listNextBatchOfObjects(objectListing);
        }
    }

    public  S3ChangeLogStore();
    public  S3ChangeLogStore(String awsRegion);

}