summaryrefslogtreecommitdiff
path: root/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h')
-rw-r--r--grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h b/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
index 7d18d9b5..f039f6da 100644
--- a/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
+++ b/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include <map>
+
#include "src/core/ext/filters/client_channel/subchannel_pool_interface.h"
namespace grpc_core {
@@ -34,22 +36,21 @@ namespace grpc_core {
// Thread-unsafe.
class LocalSubchannelPool final : public SubchannelPoolInterface {
public:
- LocalSubchannelPool();
- ~LocalSubchannelPool() override;
+ LocalSubchannelPool() {}
+ ~LocalSubchannelPool() override {}
// Implements interface methods.
// Thread-unsafe. Intended to be invoked within the client_channel work
// serializer.
- Subchannel* RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) override;
- void UnregisterSubchannel(SubchannelKey* key) override;
- Subchannel* FindSubchannel(SubchannelKey* key) override;
+ RefCountedPtr<Subchannel> RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) override;
+ void UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) override;
+ RefCountedPtr<Subchannel> FindSubchannel(const SubchannelKey& key) override;
private:
- // The vtable for subchannel operations in an AVL tree.
- static const grpc_avl_vtable subchannel_avl_vtable_;
// A map from subchannel key to subchannel.
- grpc_avl subchannel_map_;
+ std::map<SubchannelKey, Subchannel*> subchannel_map_;
};
} // namespace grpc_core