> +
> +   private void removeObjectsWithPrefix(String container, String prefix) {
> +      String nextMarker = null;
> +      do {
> +         org.jclouds.openstack.swift.options.ListContainerOptions 
> listContainerOptions =
> +            withPrefix(prefix);
> +         if (nextMarker != null) {
> +            listContainerOptions = 
> listContainerOptions.afterMarker(nextMarker);
> +         }
> +
> +         PageSet<ObjectInfo> chunks = sync.listObjects(container, 
> listContainerOptions);
> +         for (ObjectInfo chunk : chunks) {
> +            sync.removeObject(container, chunk.getName());
> +         }
> +         nextMarker = chunks.getNextMarker();
> +      } while (nextMarker != null);

> I did it in a paged way because that was the most obvious way to me (I'm not 
> all that familiar with the jclouds code yet).

If the only call we have right now that gets the values we need uses pages, 
that's fine with me - I was just wondering whether there's e.g. already a 
"fetchAll" version. I don't think we need to create anything different for now.

Thanks also for explaining the expectation that we're most likely to get all 
the chunks in one page. How big is the page size, incidentally?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/123/files#r5924390

Reply via email to