High performance C++ framework for concurrent servers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
seastar::fair_group Class Reference

Detailed Description

Group of queues class.

This is a fair group. It's attached by one or mode fair queues. On machines having the big* amount of shards, queues use the group to borrow/lend the needed capacity for requests dispatching.

#include <seastar/core/fair_queue.hh>


struct  config

Public Types

using capacity_t = fair_queue_entry::capacity_t
using clock_type = std::chrono::steady_clock
using rate_resolution = std::milli
using token_bucket_t = internal::shared_token_bucket< capacity_t, rate_resolution, internal::capped_release::yes >

Public Member Functions

auto capacity_duration (capacity_t cap) const noexcept
 fair_group (config cfg, unsigned nr_queues)
 fair_group (fair_group &&)=delete
capacity_t maximum_capacity () const noexcept
capacity_t per_tick_grab_threshold () const noexcept
capacity_t grab_capacity (capacity_t cap) noexcept
clock_type::time_point replenished_ts () const noexcept
void release_capacity (capacity_t cap) noexcept
void replenish_capacity (clock_type::time_point now) noexcept
void maybe_replenish_capacity (clock_type::time_point &local_ts) noexcept
capacity_t capacity_deficiency (capacity_t from) const noexcept
std::chrono::duration< double > rate_limit_duration () const noexcept
const token_bucket_t & token_bucket () const noexcept

Static Public Member Functions

static double capacity_tokens (capacity_t cap) noexcept
static capacity_t tokens_capacity (double tokens) noexcept

Static Public Attributes

static constexpr float fixed_point_factor = float(1 << 24)

Class Documentation

◆ seastar::fair_group::config

struct seastar::fair_group::config
Class Members
sstring label
double limit_min_tokens
double min_tokens
float rate_factor
duration< double > rate_limit_duration

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