jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Gaul <notificati...@github.com>
Subject Re: [jclouds/jclouds] JClouds 1281- DLO Swift Implementation (#1090)
Date Sun, 30 Apr 2017 18:35:21 GMT
andrewgaul commented on this pull request.



> +    * @param prefix
+    * 
+    */
+   private void removeObjectsWithPrefix(String container, String prefix) {
+      String nextMarker = null;
+      ObjectApi objectApi = api.getObjectApi(regionId, container);
+      do {
+         org.jclouds.openstack.swift.v1.options.ListContainerOptions listContainerOptions
= prefix(prefix);
+         if (nextMarker != null) {
+            listContainerOptions = listContainerOptions.marker(nextMarker);
+         }
+         PageSet<? extends StorageMetadata> chunks = list(container, listContainerOptions);
+         Iterator<? extends StorageMetadata> iter = chunks.iterator();
+
+         while (iter.hasNext()) {
+            objectApi.delete(iter.next().getName());

Call `BulkApi.buckDelete`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1090#pullrequestreview-35522686
Mime
View raw message