summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_sync_trace.h
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2017-08-15 22:48:20 +0200
committerYehuda Sadeh <yehuda@redhat.com>2017-08-31 12:09:03 +0200
commit53526d5050a30f7c7bf4457cc3cbb371f12466f3 (patch)
tree0f337978ced933da01f32c6ff72e78f49c89fc86 /src/rgw/rgw_sync_trace.h
parentrgw: sync trace: update service map with current active entities (diff)
downloadceph-53526d5050a30f7c7bf4457cc3cbb371f12466f3.tar.xz
ceph-53526d5050a30f7c7bf4457cc3cbb371f12466f3.zip
rgw: replace RGWSyncTraceNodeContainer wrapper
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_sync_trace.h')
-rw-r--r--src/rgw/rgw_sync_trace.h50
1 files changed, 1 insertions, 49 deletions
diff --git a/src/rgw/rgw_sync_trace.h b/src/rgw/rgw_sync_trace.h
index 847ae20b8e1..7d25373fcf0 100644
--- a/src/rgw/rgw_sync_trace.h
+++ b/src/rgw/rgw_sync_trace.h
@@ -24,11 +24,9 @@
class RGWRados;
class RGWSyncTraceManager;
class RGWSyncTraceNode;
-class RGWSyncTraceNodeContainer;
class RGWSyncTraceServiceMapThread;
using RGWSyncTraceNodeRef = std::shared_ptr<RGWSyncTraceNode>;
-using RGWSTNCRef = std::shared_ptr<RGWSyncTraceNodeContainer>;
class RGWSyncTraceNode {
friend class RGWSyncTraceManager;
@@ -98,52 +96,6 @@ public:
bool match(const string& search_term, bool search_history);
};
-/*
- * a container to RGWSyncTraceNodeRef, responsible to keep track
- * of live nodes, and when last ref is dropped, calls ->finish()
- * so that node moves to the retired list in the manager
- */
-class RGWSyncTraceNodeContainer {
- RGWSyncTraceNodeRef tn;
-public:
- RGWSyncTraceNodeContainer(RGWSyncTraceNodeRef& _tn) : tn(_tn) {}
-
- ~RGWSyncTraceNodeContainer();
-
- RGWSyncTraceNodeRef& operator*() {
- return tn;
- }
-
- RGWSyncTraceNodeRef& operator->() {
- return tn;
- }
-
- void set_resource_name(const string& s) {
- tn->set_resource_name(s);
- }
-
- const string& get_resource_name() {
- return tn->get_resource_name();
- }
-
- void set_flag(uint16_t flag) {
- tn->set_flag(flag);
- }
- void unset_flag(uint16_t flag) {
- tn->unset_flag(flag);
- }
- bool test_flags(uint16_t f) {
- return tn->test_flags(f);
- }
- void log(int level, const std::string& s) {
- return tn->log(level, s);
- }
- RGWSyncTraceNodeRef& ref() {
- return tn;
- }
-};
-
-
class RGWSyncTraceManager : public AdminSocketHook {
friend class RGWSyncTraceNode;
@@ -171,7 +123,7 @@ public:
const RGWSyncTraceNodeRef root_node;
- RGWSTNCRef add_node(RGWSyncTraceNode *node);
+ RGWSyncTraceNodeRef add_node(RGWSyncTraceNode *node);
void finish_node(RGWSyncTraceNode *node);
int hook_to_admin_command();