diff options
author | Mark D. Roth <roth@google.com> | 2018-04-03 11:57:45 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2018-04-03 11:57:45 -0700 |
commit | 9b620a2ee38306315fb6f915d0e8d4aab8856757 (patch) | |
tree | d3b9e81a2be6830530b11dba365f678083e9d2d9 /src/core/ext/filters/client_channel/lb_policy/subchannel_list.h | |
parent | 485c4ba87c2f2cecce7e3104db7db5d50392be2a (diff) |
more comments
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy/subchannel_list.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index b647c5d425..5f7810d801 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -194,21 +194,25 @@ class SubchannelData { }; // A list of subchannels. -// FIXME: document more template <typename SubchannelListType, typename SubchannelDataType> class SubchannelList : public RefCountedWithTracing<SubchannelListType> { public: typedef InlinedVector<SubchannelDataType, 10> SubchannelVector; + // The number of subchannels in the list. size_t num_subchannels() const { return subchannels_.size(); } + + // The data for the subchannel at a particular index. SubchannelDataType* subchannel(size_t index) { return &subchannels_[index]; } // Marks the subchannel_list as discarded. Unsubscribes all its subchannels. void ShutdownLocked(const char* reason); + // Returns true if the subchannel list is shutting down. bool shutting_down() const { return shutting_down_; } + // Accessors. LoadBalancingPolicy* policy() const { return policy_; } TraceFlag* tracer() const { return tracer_; } |