aboutsummaryrefslogtreecommitdiffstats
path: root/yt/yt/core/misc/backoff_strategy_config.cpp
blob: 848c25863dba18b9f6906dee1c18ee84ebe73eeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "backoff_strategy_config.h"

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

void TSerializableExponentialBackoffOptions::Register(TRegistrar registrar)
{
    registrar.BaseClassParameter("invocation_count", &TThis::InvocationCount)
        .Alias("retry_count")
        .Default(DefaultInvocationCount);
    registrar.BaseClassParameter("min_backoff", &TThis::MinBackoff)
        .Default(DefaultMinBackoff);
    registrar.BaseClassParameter("max_backoff", &TThis::MaxBackoff)
        .Default(DefaultMaxBackoff);
    registrar.BaseClassParameter("backoff_multiplier", &TThis::BackoffMultiplier)
        .Default(DefaultBackoffMultiplier);
    registrar.BaseClassParameter("backoff_jitter", &TThis::BackoffJitter)
        .Default(DefaultBackoffJitter);
}

////////////////////////////////////////////////////////////////////////////////

void TSerializableConstantBackoffOptions::Register(TRegistrar registrar)
{
    registrar.BaseClassParameter("invocation_count", &TThis::InvocationCount)
        .Alias("retry_count")
        .Default(DefaultInvocationCount);
    registrar.BaseClassParameter("backoff", &TThis::Backoff)
        .Default(DefaultBackoff);
    registrar.BaseClassParameter("backoff_jitter", &TThis::BackoffJitter)
        .Default(DefaultBackoffJitter);
}

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT