userver: userver/storages/redis/hedged_request.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
hedged_request.hpp File Reference

Detailed Description

Classes and functions for performing hedged requests.

Use MakeHedgedRedisRequest method to perform hedged redis request.

Example(Sync): auto result = ::redis::MakeHedgedRedisRequest<storages::redis::RequestHGet>( redis_client_shared_ptr, &storages::redis::Client::Hget, redis_cc, hedging_settings, key, field); Example(Async): auto future = ::redis::MakeHedgedRedisRequestAsync<storages::redis::RequestHGet>( redis_client_shared_ptr, &storages::redis::Client::Hget, redis_cc, hedging_settings, key, field); auto result = future.Get();

Definition in file hedged_request.hpp.

Go to the source code of this file.

+ Include dependency graph for hedged_request.hpp:

Typedefs

template<typename RedisRequestType >
using redis::HedgedRedisRequest
 

Functions

template<typename RedisRequestType , typename... Args, typename M = RedisRequestType (storages::redis::Client::*)( Args..., const redis::CommandControl&)>
HedgedRedisRequest< RedisRequestType > redis::MakeHedgedRedisRequestAsync (std::shared_ptr< storages::redis::Client > redis, M method, const redis::CommandControl &cc, utils::hedging::HedgingSettings hedging_settings, Args... args)
 
template<typename RedisRequestType , typename... Args, typename M = RedisRequestType (storages::redis::Client::*)( Args..., const redis::CommandControl&)>
RedisRequestType redis::MakeHedgedRedisRequest (std::shared_ptr< storages::redis::Client > redis, M method, const redis::CommandControl &cc, utils::hedging::HedgingSettings hedging_settings, Args... args)
 

Typedef Documentation

◆ HedgedRedisRequest

template<typename RedisRequestType >
using redis::HedgedRedisRequest
Initial value:
impl::RedisRequestStrategy<RedisRequestType>>

Definition at line 70 of file hedged_request.hpp.

Function Documentation

◆ MakeHedgedRedisRequest()

template<typename RedisRequestType , typename... Args, typename M = RedisRequestType (storages::redis::Client::*)( Args..., const redis::CommandControl&)>
RedisRequestType redis::MakeHedgedRedisRequest ( std::shared_ptr< storages::redis::Client > redis,
M method,
const redis::CommandControl & cc,
utils::hedging::HedgingSettings hedging_settings,
Args... args )

< We do retries ourselves

Definition at line 105 of file hedged_request.hpp.

◆ MakeHedgedRedisRequestAsync()

template<typename RedisRequestType , typename... Args, typename M = RedisRequestType (storages::redis::Client::*)( Args..., const redis::CommandControl&)>
HedgedRedisRequest< RedisRequestType > redis::MakeHedgedRedisRequestAsync ( std::shared_ptr< storages::redis::Client > redis,
M method,
const redis::CommandControl & cc,
utils::hedging::HedgingSettings hedging_settings,
Args... args )

< We do retries ourselves

Definition at line 76 of file hedged_request.hpp.