Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::internal::ServerRetryThrottleData Class Reference

Tracks retry throttling data for an individual server name. More...

#include <retry_throttle.h>

Inheritance diagram for grpc_core::internal::ServerRetryThrottleData:
Inheritance graph
[legend]

Public Member Functions

intptr_t max_milli_tokens () const
 
intptr_t milli_token_ratio () const
 
bool RecordFailure ()
 Records a failure. Returns true if it's okay to send a retry. More...
 
void RecordSuccess ()
 Records a success. More...
 
 ServerRetryThrottleData (intptr_t max_milli_tokens, intptr_t milli_token_ratio, ServerRetryThrottleData *old_throttle_data)
 
 ~ServerRetryThrottleData () override
 
- Public Member Functions inherited from grpc_core::RefCounted< ServerRetryThrottleData >
RefCountedoperator= (const RefCounted &)=delete
 
RefCountedPtr< ServerRetryThrottleData > Ref () GRPC_MUST_USE_RESULT
 
RefCountedPtr< ServerRetryThrottleData > Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
 RefCounted (const RefCounted &)=delete
 
RefCountedPtr< ServerRetryThrottleData > RefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< ServerRetryThrottleData > RefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
 ~RefCounted ()=default
 
- Public Member Functions inherited from grpc_core::PolymorphicRefCount
virtual ~PolymorphicRefCount ()=default
 

Private Member Functions

void GetReplacementThrottleDataIfNeeded (ServerRetryThrottleData **throttle_data)
 

Private Attributes

const intptr_t max_milli_tokens_
 
const intptr_t milli_token_ratio_
 
gpr_atm milli_tokens_
 
gpr_atm replacement_ = 0
 

Additional Inherited Members

- Public Types inherited from grpc_core::RefCounted< ServerRetryThrottleData >
using RefCountedChildType = ServerRetryThrottleData
 
- Protected Member Functions inherited from grpc_core::RefCounted< ServerRetryThrottleData >
 RefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 

Detailed Description

Tracks retry throttling data for an individual server name.

Definition at line 41 of file retry_throttle.h.

Constructor & Destructor Documentation

◆ ServerRetryThrottleData()

grpc_core::internal::ServerRetryThrottleData::ServerRetryThrottleData ( intptr_t  max_milli_tokens,
intptr_t  milli_token_ratio,
ServerRetryThrottleData old_throttle_data 
)

Definition at line 36 of file retry_throttle.cc.

◆ ~ServerRetryThrottleData()

grpc_core::internal::ServerRetryThrottleData::~ServerRetryThrottleData ( )
override

Definition at line 64 of file retry_throttle.cc.

Member Function Documentation

◆ GetReplacementThrottleDataIfNeeded()

void grpc_core::internal::ServerRetryThrottleData::GetReplacementThrottleDataIfNeeded ( ServerRetryThrottleData **  throttle_data)
private

Definition at line 73 of file retry_throttle.cc.

◆ max_milli_tokens()

intptr_t grpc_core::internal::ServerRetryThrottleData::max_milli_tokens ( ) const
inline

Definition at line 53 of file retry_throttle.h.

◆ milli_token_ratio()

intptr_t grpc_core::internal::ServerRetryThrottleData::milli_token_ratio ( ) const
inline

Definition at line 54 of file retry_throttle.h.

◆ RecordFailure()

bool grpc_core::internal::ServerRetryThrottleData::RecordFailure ( )

Records a failure. Returns true if it's okay to send a retry.

Definition at line 84 of file retry_throttle.cc.

◆ RecordSuccess()

void grpc_core::internal::ServerRetryThrottleData::RecordSuccess ( )

Records a success.

Definition at line 99 of file retry_throttle.cc.

Member Data Documentation

◆ max_milli_tokens_

const intptr_t grpc_core::internal::ServerRetryThrottleData::max_milli_tokens_
private

Definition at line 60 of file retry_throttle.h.

◆ milli_token_ratio_

const intptr_t grpc_core::internal::ServerRetryThrottleData::milli_token_ratio_
private

Definition at line 61 of file retry_throttle.h.

◆ milli_tokens_

gpr_atm grpc_core::internal::ServerRetryThrottleData::milli_tokens_
private

Definition at line 62 of file retry_throttle.h.

◆ replacement_

gpr_atm grpc_core::internal::ServerRetryThrottleData::replacement_ = 0
private

Definition at line 66 of file retry_throttle.h.


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


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