folly::Singleton-based McrouterManager
authorAndrii Grynenko <andrii@fb.com>
Tue, 11 Nov 2014 19:13:30 +0000 (11:13 -0800)
committerDave Watson <davejwatson@fb.com>
Wed, 19 Nov 2014 20:52:21 +0000 (12:52 -0800)
Summary: Introduces a Singleton which keeps a map persistence_id => mcrouter_t*. Makes mcrouter instance not know if it's managed by McrouterManager.

Test Plan: unit tests

Reviewed By: pavlo@fb.com

Subscribers: trunkagent, alikhtarov, njormrod, folly-diffs@

FB internal diff: D1673274

Signature: t1:1673274:1415735863:c990a6a526f9525c68cc23892d690a9b3cb94ace

folly/experimental/Singleton.h

index ff0ef56faa7a5bc643f677e964fdc493dca717dd..c42daf01f075d7fa2d9ebac1f30e5ac4510833bf 100644 (file)
@@ -126,8 +126,8 @@ const char* const kDefaultTypeDescriptorName = "(default)";
 // a key in unordered_maps.
 class TypeDescriptor {
  public:
-  TypeDescriptor(const std::type_info& ti, std::string name)
-      : ti_(ti), name_(name) {
+  TypeDescriptor(const std::type_info& ti, std::string name__)
+      : ti_(ti), name_(name__) {
     if (name_ == kDefaultTypeDescriptorName) {
       LOG(DFATAL) << "Caller used the default name as their literal name; "
                   << "name your singleton something other than "