Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grpc_core::Subchannel Class Reference

#include <subchannel.h>

Inheritance diagram for grpc_core::Subchannel:
Inheritance graph
[legend]

Classes

class  AsyncWatcherNotifierLocked
 
class  ConnectedSubchannelStateWatcher
 
class  ConnectivityStateWatcherInterface
 
class  ConnectivityStateWatcherList
 
class  DataProducerInterface
 
class  HealthWatcherMap
 

Public Member Functions

void AddDataProducer (DataProducerInterface *data_producer) ABSL_LOCKS_EXCLUDED(mu_)
 
void CancelConnectivityStateWatch (const absl::optional< std::string > &health_check_service_name, ConnectivityStateWatcherInterface *watcher) ABSL_LOCKS_EXCLUDED(mu_)
 
const grpc_channel_argschannel_args () const
 
channelz::SubchannelNodechannelz_node ()
 
RefCountedPtr< ConnectedSubchannelconnected_subchannel () ABSL_LOCKS_EXCLUDED(mu_)
 
DataProducerInterfaceGetDataProducer (UniqueTypeName type) ABSL_LOCKS_EXCLUDED(mu_)
 
void Orphan () override ABSL_LOCKS_EXCLUDED(mu_)
 
grpc_pollset_setpollset_set () const
 
void RemoveDataProducer (DataProducerInterface *data_producer) ABSL_LOCKS_EXCLUDED(mu_)
 
void RequestConnection () ABSL_LOCKS_EXCLUDED(mu_)
 
void ResetBackoff () ABSL_LOCKS_EXCLUDED(mu_)
 
 Subchannel (SubchannelKey key, OrphanablePtr< SubchannelConnector > connector, const grpc_channel_args *args)
 
void ThrottleKeepaliveTime (int new_keepalive_time) ABSL_LOCKS_EXCLUDED(mu_)
 
void WatchConnectivityState (const absl::optional< std::string > &health_check_service_name, RefCountedPtr< ConnectivityStateWatcherInterface > watcher) ABSL_LOCKS_EXCLUDED(mu_)
 
 ~Subchannel () override
 
- Public Member Functions inherited from grpc_core::DualRefCounted< Subchannel >
 DualRefCounted (const DualRefCounted &)=delete
 
DualRefCountedoperator= (const DualRefCounted &)=delete
 
RefCountedPtr< SubchannelRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< SubchannelRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
RefCountedPtr< SubchannelRefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< SubchannelRefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
WeakRefCountedPtr< SubchannelWeakRef () GRPC_MUST_USE_RESULT
 
WeakRefCountedPtr< SubchannelWeakRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void WeakUnref ()
 
void WeakUnref (const DebugLocation &location, const char *reason)
 
 ~DualRefCounted () override=default
 
- Public Member Functions inherited from grpc_core::Orphanable
Orphanableoperator= (const Orphanable &)=delete
 
 Orphanable (const Orphanable &)=delete
 

Static Public Member Functions

static RefCountedPtr< SubchannelCreate (OrphanablePtr< SubchannelConnector > connector, const grpc_resolved_address &address, const grpc_channel_args *args)
 

Private Member Functions

bool shutdown_ ABSL_GUARDED_BY (mu_)
 
grpc_connectivity_state state_ ABSL_GUARDED_BY (mu_)
 
absl::Status status_ ABSL_GUARDED_BY (mu_)
 
ConnectivityStateWatcherList watcher_list_ ABSL_GUARDED_BY (mu_)
 
HealthWatcherMap health_watcher_map_ ABSL_GUARDED_BY (mu_)
 
RefCountedPtr< ConnectedSubchannel > connected_subchannel_ ABSL_GUARDED_BY (mu_)
 
BackOff backoff_ ABSL_GUARDED_BY (mu_)
 
Timestamp next_attempt_time_ ABSL_GUARDED_BY (mu_)
 
grpc_event_engine::experimental::EventEngine::TaskHandle retry_timer_handle_ ABSL_GUARDED_BY (mu_)
 
int keepalive_time_ ABSL_GUARDED_BY (mu_)
 
std::map< UniqueTypeName, DataProducerInterface * > data_producer_map_ ABSL_GUARDED_BY (mu_)
 
void OnConnectingFinishedLocked (grpc_error_handle error) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void OnRetryTimer () ABSL_LOCKS_EXCLUDED(mu_)
 
void OnRetryTimerLocked () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
bool PublishTransportLocked () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void SetConnectivityStateLocked (grpc_connectivity_state state, const absl::Status &status) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void StartConnectingLocked () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 

Static Private Member Functions

static void OnConnectingFinished (void *arg, grpc_error_handle error) ABSL_LOCKS_EXCLUDED(mu_)
 

Private Attributes

grpc_resolved_address address_for_connect_
 
grpc_channel_argsargs_
 
RefCountedPtr< channelz::SubchannelNodechannelz_node_
 
SubchannelConnector::Result connecting_result_
 
OrphanablePtr< SubchannelConnectorconnector_
 
const SubchannelKey key_
 
Duration min_connect_timeout_
 
Mutex mu_
 
grpc_closure on_connecting_finished_
 
grpc_pollset_setpollset_set_
 
RefCountedPtr< SubchannelPoolInterfacesubchannel_pool_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::DualRefCounted< Subchannel >
 DualRefCounted (const char *trace=nullptr, int32_t initial_refcount=1)
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 

Detailed Description

Definition at line 166 of file subchannel.h.

Constructor & Destructor Documentation

◆ Subchannel()

grpc_core::Subchannel::Subchannel ( SubchannelKey  key,
OrphanablePtr< SubchannelConnector connector,
const grpc_channel_args args 
)

Definition at line 641 of file subchannel.cc.

◆ ~Subchannel()

grpc_core::Subchannel::~Subchannel ( )
override

Definition at line 698 of file subchannel.cc.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/11]

bool shutdown_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/11]

grpc_connectivity_state state_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/11]

absl::Status status_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [4/11]

ConnectivityStateWatcherList watcher_list_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [5/11]

HealthWatcherMap health_watcher_map_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [6/11]

RefCountedPtr<ConnectedSubchannel> connected_subchannel_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [7/11]

BackOff backoff_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [8/11]

Timestamp next_attempt_time_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [9/11]

grpc_event_engine::experimental::EventEngine::TaskHandle retry_timer_handle_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [10/11]

int keepalive_time_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [11/11]

std::map<UniqueTypeName, DataProducerInterface*> data_producer_map_ grpc_core::Subchannel::ABSL_GUARDED_BY ( mu_  )
private

◆ AddDataProducer()

void grpc_core::Subchannel::AddDataProducer ( DataProducerInterface data_producer)

Definition at line 828 of file subchannel.cc.

◆ CancelConnectivityStateWatch()

void grpc_core::Subchannel::CancelConnectivityStateWatch ( const absl::optional< std::string > &  health_check_service_name,
ConnectivityStateWatcherInterface watcher 
)

Definition at line 775 of file subchannel.cc.

◆ channel_args()

const grpc_channel_args* grpc_core::Subchannel::channel_args ( ) const
inline

Definition at line 241 of file subchannel.h.

◆ channelz_node()

channelz::SubchannelNode * grpc_core::Subchannel::channelz_node ( )

Definition at line 753 of file subchannel.cc.

◆ connected_subchannel()

RefCountedPtr<ConnectedSubchannel> grpc_core::Subchannel::connected_subchannel ( )
inline

Definition at line 262 of file subchannel.h.

◆ Create()

RefCountedPtr< Subchannel > grpc_core::Subchannel::Create ( OrphanablePtr< SubchannelConnector connector,
const grpc_resolved_address address,
const grpc_channel_args args 
)
static

Definition at line 712 of file subchannel.cc.

◆ GetDataProducer()

Subchannel::DataProducerInterface * grpc_core::Subchannel::GetDataProducer ( UniqueTypeName  type)

Definition at line 843 of file subchannel.cc.

◆ OnConnectingFinished()

void grpc_core::Subchannel::OnConnectingFinished ( void *  arg,
grpc_error_handle  error 
)
staticprivate

Definition at line 920 of file subchannel.cc.

◆ OnConnectingFinishedLocked()

void grpc_core::Subchannel::OnConnectingFinishedLocked ( grpc_error_handle  error)
private

Definition at line 932 of file subchannel.cc.

◆ OnRetryTimer()

void grpc_core::Subchannel::OnRetryTimer ( )
private

Definition at line 892 of file subchannel.cc.

◆ OnRetryTimerLocked()

void grpc_core::Subchannel::OnRetryTimerLocked ( )
private

Definition at line 897 of file subchannel.cc.

◆ Orphan()

void grpc_core::Subchannel::Orphan ( )
overridevirtual

Implements grpc_core::Orphanable.

Definition at line 813 of file subchannel.cc.

◆ pollset_set()

grpc_pollset_set* grpc_core::Subchannel::pollset_set ( ) const
inline

Definition at line 239 of file subchannel.h.

◆ PublishTransportLocked()

bool grpc_core::Subchannel::PublishTransportLocked ( )
private

Definition at line 972 of file subchannel.cc.

◆ RemoveDataProducer()

void grpc_core::Subchannel::RemoveDataProducer ( DataProducerInterface data_producer)

Definition at line 835 of file subchannel.cc.

◆ RequestConnection()

void grpc_core::Subchannel::RequestConnection ( )

Definition at line 791 of file subchannel.cc.

◆ ResetBackoff()

void grpc_core::Subchannel::ResetBackoff ( )

Definition at line 798 of file subchannel.cc.

◆ SetConnectivityStateLocked()

void grpc_core::Subchannel::SetConnectivityStateLocked ( grpc_connectivity_state  state,
const absl::Status status 
)
private

Definition at line 875 of file subchannel.cc.

◆ StartConnectingLocked()

void grpc_core::Subchannel::StartConnectingLocked ( )
private

Definition at line 904 of file subchannel.cc.

◆ ThrottleKeepaliveTime()

void grpc_core::Subchannel::ThrottleKeepaliveTime ( int  new_keepalive_time)

Definition at line 734 of file subchannel.cc.

◆ WatchConnectivityState()

void grpc_core::Subchannel::WatchConnectivityState ( const absl::optional< std::string > &  health_check_service_name,
RefCountedPtr< ConnectivityStateWatcherInterface watcher 
)

Definition at line 757 of file subchannel.cc.

Member Data Documentation

◆ address_for_connect_

grpc_resolved_address grpc_core::Subchannel::address_for_connect_
private

Definition at line 373 of file subchannel.h.

◆ args_

grpc_channel_args* grpc_core::Subchannel::args_
private

Definition at line 375 of file subchannel.h.

◆ channelz_node_

RefCountedPtr<channelz::SubchannelNode> grpc_core::Subchannel::channelz_node_
private

Definition at line 379 of file subchannel.h.

◆ connecting_result_

SubchannelConnector::Result grpc_core::Subchannel::connecting_result_
private

Definition at line 385 of file subchannel.h.

◆ connector_

OrphanablePtr<SubchannelConnector> grpc_core::Subchannel::connector_
private

Definition at line 384 of file subchannel.h.

◆ key_

const SubchannelKey grpc_core::Subchannel::key_
private

Definition at line 370 of file subchannel.h.

◆ min_connect_timeout_

Duration grpc_core::Subchannel::min_connect_timeout_
private

Definition at line 381 of file subchannel.h.

◆ mu_

Mutex grpc_core::Subchannel::mu_
private

Definition at line 389 of file subchannel.h.

◆ on_connecting_finished_

grpc_closure grpc_core::Subchannel::on_connecting_finished_
private

Definition at line 386 of file subchannel.h.

◆ pollset_set_

grpc_pollset_set* grpc_core::Subchannel::pollset_set_
private

Definition at line 377 of file subchannel.h.

◆ subchannel_pool_

RefCountedPtr<SubchannelPoolInterface> grpc_core::Subchannel::subchannel_pool_
private

Definition at line 368 of file subchannel.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37