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-1371: JCLOUDS-1488: list optimize prefix (#1268)
Date Fri, 25 Jan 2019 20:58:05 GMT
gaul commented on this pull request.



> @@ -148,8 +149,13 @@ public boolean blobExists(final String containerName, final String
blobName) {
    }
 
    @Override
-   public Iterable<String> getBlobKeysInsideContainer(final String containerName) {
-      return containerToBlobs.get(containerName).keySet();
+   public Iterable<String> getBlobKeysInsideContainer(final String containerName, String
prefix) {
+      ConcurrentSkipListMap<String, Blob> blobs = containerToBlobs.get(containerName);
+      if (prefix == null) {
+         return blobs.keySet();
+      }
+      String lastPrefix = prefix + (char) 65535;  // TODO: better sentinel?

This is hacky but I don't think is has practical drawbacks?

-- 
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/1268#pullrequestreview-196707281
Mime
View raw message