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

#include <child_policy_handler.h>

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

Classes

class  Helper
 

Public Member Functions

 ChildPolicyHandler (Args args, TraceFlag *tracer)
 
virtual bool ConfigChangeRequiresNewPolicyInstance (LoadBalancingPolicy::Config *old_config, LoadBalancingPolicy::Config *new_config) const
 
virtual OrphanablePtr< LoadBalancingPolicyCreateLoadBalancingPolicy (const char *name, LoadBalancingPolicy::Args args) const
 
void ExitIdleLocked () override
 
const char * name () const override
 Returns the name of the LB policy. More...
 
void ResetBackoffLocked () override
 Resets connection backoff. More...
 
void UpdateLocked (UpdateArgs args) override
 
- Public Member Functions inherited from grpc_core::LoadBalancingPolicy
grpc_pollset_setinterested_parties () const
 
 LoadBalancingPolicy (Args args, intptr_t initial_refcount=1)
 
 LoadBalancingPolicy (const LoadBalancingPolicy &)=delete
 
LoadBalancingPolicyoperator= (const LoadBalancingPolicy &)=delete
 
void Orphan () override
 
 ~LoadBalancingPolicy () override
 
- Public Member Functions inherited from grpc_core::InternallyRefCounted< LoadBalancingPolicy >
 InternallyRefCounted (const InternallyRefCounted &)=delete
 
InternallyRefCountedoperator= (const InternallyRefCounted &)=delete
 
- Public Member Functions inherited from grpc_core::Orphanable
Orphanableoperator= (const Orphanable &)=delete
 
 Orphanable (const Orphanable &)=delete
 

Private Member Functions

OrphanablePtr< LoadBalancingPolicyCreateChildPolicy (const char *child_policy_name, const grpc_channel_args &args)
 
void ShutdownLocked () override
 Shuts down the policy. More...
 

Private Attributes

OrphanablePtr< LoadBalancingPolicychild_policy_
 
RefCountedPtr< LoadBalancingPolicy::Configcurrent_config_
 
OrphanablePtr< LoadBalancingPolicypending_child_policy_
 
bool shutting_down_ = false
 
TraceFlagtracer_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::LoadBalancingPolicy
ChannelControlHelperchannel_control_helper () const
 
std::shared_ptr< WorkSerializerwork_serializer () const
 
- Protected Member Functions inherited from grpc_core::InternallyRefCounted< LoadBalancingPolicy >
 InternallyRefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 
RefCountedPtr< LoadBalancingPolicyRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< LoadBalancingPolicyRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
 ~InternallyRefCounted () override=default
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 

Detailed Description

Definition at line 39 of file child_policy_handler.h.

Constructor & Destructor Documentation

◆ ChildPolicyHandler()

grpc_core::ChildPolicyHandler::ChildPolicyHandler ( Args  args,
TraceFlag tracer 
)
inline

Definition at line 41 of file child_policy_handler.h.

Member Function Documentation

◆ ConfigChangeRequiresNewPolicyInstance()

bool grpc_core::ChildPolicyHandler::ConfigChangeRequiresNewPolicyInstance ( LoadBalancingPolicy::Config old_config,
LoadBalancingPolicy::Config new_config 
) const
virtual

Definition at line 303 of file child_policy_handler.cc.

◆ CreateChildPolicy()

OrphanablePtr< LoadBalancingPolicy > grpc_core::ChildPolicyHandler::CreateChildPolicy ( const char *  child_policy_name,
const grpc_channel_args args 
)
private

Definition at line 275 of file child_policy_handler.cc.

◆ CreateLoadBalancingPolicy()

OrphanablePtr< LoadBalancingPolicy > grpc_core::ChildPolicyHandler::CreateLoadBalancingPolicy ( const char *  name,
LoadBalancingPolicy::Args  args 
) const
virtual

Definition at line 310 of file child_policy_handler.cc.

◆ ExitIdleLocked()

void grpc_core::ChildPolicyHandler::ExitIdleLocked ( )
overridevirtual

Tries to enter a READY connectivity state. This is a no-op by default, since most LB policies never go into IDLE state.

Reimplemented from grpc_core::LoadBalancingPolicy.

Definition at line 257 of file child_policy_handler.cc.

◆ name()

const char* grpc_core::ChildPolicyHandler::name ( ) const
inlineoverridevirtual

Returns the name of the LB policy.

Implements grpc_core::LoadBalancingPolicy.

Definition at line 44 of file child_policy_handler.h.

◆ ResetBackoffLocked()

void grpc_core::ChildPolicyHandler::ResetBackoffLocked ( )
overridevirtual

Resets connection backoff.

Implements grpc_core::LoadBalancingPolicy.

Definition at line 266 of file child_policy_handler.cc.

◆ ShutdownLocked()

void grpc_core::ChildPolicyHandler::ShutdownLocked ( )
overrideprivatevirtual

Shuts down the policy.

Implements grpc_core::LoadBalancingPolicy.

Definition at line 137 of file child_policy_handler.cc.

◆ UpdateLocked()

void grpc_core::ChildPolicyHandler::UpdateLocked ( UpdateArgs  )
overridevirtual

Updates the policy with new data from the resolver. Will be invoked immediately after LB policy is constructed, and then again whenever the resolver returns a new result.

Implements grpc_core::LoadBalancingPolicy.

Definition at line 163 of file child_policy_handler.cc.

Member Data Documentation

◆ child_policy_

OrphanablePtr<LoadBalancingPolicy> grpc_core::ChildPolicyHandler::child_policy_
private

Definition at line 81 of file child_policy_handler.h.

◆ current_config_

RefCountedPtr<LoadBalancingPolicy::Config> grpc_core::ChildPolicyHandler::current_config_
private

Definition at line 78 of file child_policy_handler.h.

◆ pending_child_policy_

OrphanablePtr<LoadBalancingPolicy> grpc_core::ChildPolicyHandler::pending_child_policy_
private

Definition at line 82 of file child_policy_handler.h.

◆ shutting_down_

bool grpc_core::ChildPolicyHandler::shutting_down_ = false
private

Definition at line 73 of file child_policy_handler.h.

◆ tracer_

TraceFlag* grpc_core::ChildPolicyHandler::tracer_
private

Definition at line 71 of file child_policy_handler.h.


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


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