Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Friends | List of all members
seastar::scheduling_group_key Class Reference

Detailed Description

A class that is intended to encapsulate the scheduling group specific key and "hide" it implementation concerns and details.

Note
this object can be copied accross shards and scheduling groups.

#include <seastar/core/scheduling.hh>

Public Member Functions

 scheduling_group_key (const scheduling_group_key &)=default
 The only user allowed operation on a key is copying.
 

Friends

future< scheduling_group_keyscheduling_group_key_create (scheduling_group_key_config cfg)
 
template<typename T >
T & scheduling_group_get_specific (scheduling_group sg, scheduling_group_key key)
 
template<typename T >
T & scheduling_group_get_specific (scheduling_group_key key)
 

Friends And Related Function Documentation

◆ scheduling_group_get_specific [1/2]

template<typename T >
T& scheduling_group_get_specific ( scheduling_group  sg,
scheduling_group_key  key 
)
friend

Returnes a reference to the given scheduling group specific value

Template Parameters
T- the type of the scheduling specific type (cannot be deduced)
Parameters
sg- the scheduling group which it's specific value to retrieve
key- the key of the value to retrieve.
Returns
A reference to the scheduling specific value.

Returns a reference to the given scheduling group specific data.

Parameters
sg- The scheduling group which it's data needs to be accessed
key- The scheduling group key that for the data to access
Returns
A reference of type T& to the data.
Note
The parameter T has to be given since there is no way to deduce it.

◆ scheduling_group_get_specific [2/2]

template<typename T >
T& scheduling_group_get_specific ( scheduling_group_key  key)
friend

Returns a reference to the current specific data.

Parameters
key- The scheduling group key that for the data to access
Returns
A reference of type T& to the data.
Note
The parameter T has to be given since there is no way to deduce it.

◆ scheduling_group_key_create

future<scheduling_group_key> scheduling_group_key_create ( scheduling_group_key_config  cfg)
friend

Returns a future that holds a scheduling key and resolves when this key can be used to access the scheduling group specific value it represents.

Parameters
cfg- A scheduling_group_key_config object (by recomendation: initialized with make_scheduling_group_key_config )
Returns
A future containing scheduling_group_key for the newly created specific value.

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