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

#include <backoff.h>

Classes

class  Options
 

Public Member Functions

 BackOff (const Options &options)
 Initialize backoff machinery - does not need to be destroyed. More...
 
Timestamp NextAttemptTime ()
 Returns the time at which the next attempt should start. More...
 
void Reset ()
 

Private Attributes

Duration current_backoff_
 current delay before retries More...
 
bool initial_
 
const Options options_
 
absl::BitGen rand_gen_
 

Detailed Description

Implementation of the backoff mechanism described in doc/connection-backoff.md

Definition at line 32 of file backoff.h.

Constructor & Destructor Documentation

◆ BackOff()

grpc_core::BackOff::BackOff ( const Options options)
explicit

Initialize backoff machinery - does not need to be destroyed.

Definition at line 29 of file backoff.cc.

Member Function Documentation

◆ NextAttemptTime()

Timestamp grpc_core::BackOff::NextAttemptTime ( )

Returns the time at which the next attempt should start.

Definition at line 31 of file backoff.cc.

◆ Reset()

void grpc_core::BackOff::Reset ( )

Reset the backoff, so the next value returned by NextAttemptTime() will be the time of the second attempt (rather than the Nth).

Definition at line 44 of file backoff.cc.

Member Data Documentation

◆ current_backoff_

Duration grpc_core::BackOff::current_backoff_
private

current delay before retries

Definition at line 85 of file backoff.h.

◆ initial_

bool grpc_core::BackOff::initial_
private

Definition at line 83 of file backoff.h.

◆ options_

const Options grpc_core::BackOff::options_
private

Definition at line 81 of file backoff.h.

◆ rand_gen_

absl::BitGen grpc_core::BackOff::rand_gen_
private

Definition at line 82 of file backoff.h.


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


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