userver: utils::hedging::HedgedRequestFuture< RequestStrategy > Struct Template Reference
Loading...
Searching...
No Matches
utils::hedging::HedgedRequestFuture< RequestStrategy > Struct Template Reference

#include <userver/utils/hedged_request.hpp>

Detailed Description

template<typename RequestStrategy>
struct utils::hedging::HedgedRequestFuture< RequestStrategy >

Future of hedged request.

Definition at line 309 of file hedged_request.hpp.

Public Types

using RequestType = typename RequestTraits< RequestStrategy >::RequestType
 
using ReplyType = typename RequestTraits< RequestStrategy >::ReplyType
 

Public Member Functions

 HedgedRequestFuture (HedgedRequestFuture &&) noexcept=default
 
void Wait ()
 Wait for the request finish or for a caller task cancellation.
 
std::optional< ReplyType > Get ()
 Returns (or rethrows) the result of task invocation. After return from this method the task is not valid.
 
void IgnoreResult ()
 
engine::impl::ContextAccessor * TryGetContextAccessor ()
 

Member Typedef Documentation

◆ ReplyType

◆ RequestType

Constructor & Destructor Documentation

◆ ~HedgedRequestFuture()

Member Function Documentation

◆ Get()

std::optional< ReplyType > utils::hedging::HedgedRequestFuture< RequestStrategy >::Get ( )
inline

Returns (or rethrows) the result of task invocation. After return from this method the task is not valid.

Exceptions
WaitInterruptedExceptionwhen current_task::IsCancelRequested() and no TaskCancellationBlockers are present.
TaskCancelledExceptionif no result is available because the task was cancelled

Definition at line 320 of file hedged_request.hpp.

◆ IgnoreResult()

Definition at line 322 of file hedged_request.hpp.

◆ TryGetContextAccessor()

engine::impl::ContextAccessor * utils::hedging::HedgedRequestFuture< RequestStrategy >::TryGetContextAccessor ( )
inline

Definition at line 324 of file hedged_request.hpp.

◆ Wait()

Wait for the request finish or for a caller task cancellation.

Definition at line 317 of file hedged_request.hpp.


The documentation for this struct was generated from the following file: