]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: extend shards marker api
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 8 Dec 2014 23:43:47 +0000 (15:43 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 14 Jan 2015 03:21:27 +0000 (19:21 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/cls/rgw/cls_rgw_client.h

index efe6d517ed1512a5865ebe3155ee7ef2b81198cf..64d6407d52b1abbc09a59afe911788810c99a166 100644 (file)
@@ -142,6 +142,10 @@ public:
     return (iter == value_by_shards.end() ? default_value : iter->second);
   }
 
+  map<int, string>& get() {
+    return value_by_shards;
+  }
+
   bool empty() {
     return value_by_shards.empty();
   }
@@ -168,6 +172,10 @@ public:
     }
   }
 
+  static bool is_shards_marker(const string& marker) {
+    return marker.find(KEY_VALUE_SEPARATOR) != string::npos;
+  }
+
   int from_string(const string& composed_marker, bool has_shards) {
     value_by_shards.clear();
     if (!has_shards) {