SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::client::Mngr::Group Class Referencefinal

#include <swcdb/db/client/service/mngr/Groups.h>

+ Inheritance diagram for SWC::client::Mngr::Group:
+ Collaboration diagram for SWC::client::Mngr::Group:

Public Types

typedef std::shared_ptr< GroupPtr
 

Public Member Functions

 Group (uint8_t role, cid_t cid_begin, cid_t cid_end, const Comm::EndPoints &endpoints)
 
 Group (uint8_t role, cid_t cid_begin, cid_t cid_end, const Hosts &hosts)
 
 ~Group () noexcept
 
Ptr copy ()
 
void add_host (Comm::EndPoints &new_endpoints)
 
Hosts get_hosts ()
 
bool is_in_group (const Comm::EndPoint &endpoint) noexcept
 
void print (std::ostream &out)
 
void apply_endpoints (Comm::EndPoints &to_endpoints)
 

Public Attributes

const uint8_t role
 
const cid_t cid_begin
 
const cid_t cid_end
 

Private Member Functions

void _get_host (const Comm::EndPoint &point, Comm::EndPoints *&found_host) noexcept
 
- Private Member Functions inherited from SWC::Core::Vector< Comm::EndPoints >
constexpr SWC_CAN_INLINE Vector () noexcept
 
SWC_CAN_INLINE Vector (size_type sz, ArgsT &&... args)
 
constexpr SWC_CAN_INLINE Vector (Vector &&other) noexcept
 
SWC_CAN_INLINE Vector (const Vector &other)
 
SWC_CAN_INLINE Vector (const_iterator _b, const_iterator _e)
 
SWC_CAN_INLINE Vector (std::initializer_list< value_type > &&l)
 
SWC_CAN_INLINE ~Vector () noexcept(_NoExceptDestructor)
 
SWC_CAN_INLINE void clear () noexcept(_NoExceptDestructor)
 
SWC_CAN_INLINE void free () noexcept
 
SWC_CAN_INLINE Vectoroperator= (Vector &&other) noexcept
 
SWC_CAN_INLINE Vectoroperator= (const Vector &other)
 
SWC_CAN_INLINE void swap (Vector &other) noexcept
 
constexpr SWC_CAN_INLINE bool empty () const noexcept
 
constexpr SWC_CAN_INLINE bool operator== (const Vector &other) const noexcept
 
constexpr SWC_CAN_INLINE bool operator!= (const Vector &other) const noexcept
 
constexpr SWC_CAN_INLINE size_type size () const noexcept
 
constexpr SWC_CAN_INLINE size_type capacity () const noexcept
 
constexpr SWC_CAN_INLINE pointer data () noexcept
 
constexpr SWC_CAN_INLINE const_pointer data () const noexcept
 
constexpr SWC_CAN_INLINE iterator begin () noexcept
 
constexpr SWC_CAN_INLINE const_iterator begin () const noexcept
 
constexpr SWC_CAN_INLINE const_iterator cbegin () const noexcept
 
constexpr SWC_CAN_INLINE iterator end () noexcept
 
constexpr SWC_CAN_INLINE const_iterator end () const noexcept
 
constexpr SWC_CAN_INLINE const_iterator cend () const noexcept
 
constexpr SWC_CAN_INLINE reference front () noexcept
 
constexpr SWC_CAN_INLINE const_reference front () const noexcept
 
constexpr SWC_CAN_INLINE reference back () noexcept
 
constexpr SWC_CAN_INLINE const_reference back () const noexcept
 
constexpr SWC_CAN_INLINE reference operator[] (size_type pos) noexcept
 
constexpr SWC_CAN_INLINE const_reference operator[] (size_type pos) const noexcept
 
SWC_CAN_INLINE void shrink_to_fit (size_type sz=0)
 
SWC_CAN_INLINE void reserve (size_type cap)
 
SWC_CAN_INLINE void reserve ()
 
SWC_CAN_INLINE void resize (size_type sz, ArgsT &&... args)
 
SWC_CAN_INLINE void push_back (ArgsT &&... args)
 
SWC_CAN_INLINE void push_back_unsafe (ArgsT &&... args) noexcept(std::is_nothrow_constructible_v< value_type, ArgsT... >)
 
SWC_CAN_INLINE reference emplace_back (ArgsT &&... args)
 
SWC_CAN_INLINE reference emplace_back_unsafe (ArgsT &&... args) noexcept(std::is_nothrow_constructible_v< value_type, ArgsT... >)
 
SWC_CAN_INLINE iterator insert (size_type offset, ArgsT &&... args)
 
SWC_CAN_INLINE iterator insert (const_iterator it, ArgsT &&... args)
 
SWC_CAN_INLINE iterator insert (size_type offset, const_iterator first, const_iterator last)
 
SWC_CAN_INLINE iterator insert (const_iterator it, const_iterator first, const_iterator last)
 
SWC_CAN_INLINE reference emplace (const_iterator it, ArgsT &&... args)
 
SWC_CAN_INLINE iterator insert_unsafe (const_iterator it, ArgsT &&... args) noexcept(_NoExceptMove &&_NoExceptDestructor &&std::is_nothrow_constructible_v< value_type, ArgsT... >)
 
SWC_CAN_INLINE void assign (IteratorT first, IteratorT last)
 
SWC_CAN_INLINE iterator erase (size_type offset) noexcept(_NoExceptMoveAssign &&_NoExceptDestructor)
 
SWC_CAN_INLINE iterator erase (const_iterator it) noexcept(_NoExceptMoveAssign &&_NoExceptDestructor)
 
SWC_CAN_INLINE iterator erase (const_iterator first, const_iterator last) noexcept(_NoExceptMoveAssign &&_NoExceptDestructor)
 
SWC_CAN_INLINE void pop_back () noexcept(_NoExceptDestructor)
 

Private Attributes

Core::MutexSptd m_mutex
 

Additional Inherited Members

- Private Types inherited from SWC::Core::Vector< Comm::EndPoints >
using value_type = Comm::EndPoints
 
using size_type = uint32_t
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typeiterator
 
typedef const value_typeconst_iterator
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
- Static Private Member Functions inherited from SWC::Core::Vector< Comm::EndPoints >
constexpr static SWC_CAN_INLINE size_type max_size () noexcept
 

Detailed Description

Definition at line 20 of file Groups.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Group> SWC::client::Mngr::Group::Ptr

Definition at line 23 of file Groups.h.

Constructor & Destructor Documentation

◆ Group() [1/2]

SWC::client::Mngr::Group::Group ( uint8_t  role,
cid_t  cid_begin,
cid_t  cid_end,
const Comm::EndPoints endpoints 
)

Definition at line 13 of file Groups.cc.

Referenced by copy().

+ Here is the caller graph for this function:

◆ Group() [2/2]

SWC::client::Mngr::Group::Group ( uint8_t  role,
cid_t  cid_begin,
cid_t  cid_end,
const Hosts hosts 
)

Definition at line 20 of file Groups.cc.

◆ ~Group()

SWC::client::Mngr::Group::~Group ( )
inlinenoexcept

Definition at line 35 of file Groups.h.

Member Function Documentation

◆ _get_host()

void SWC::client::Mngr::Group::_get_host ( const Comm::EndPoint point,
Comm::EndPoints *&  found_host 
)
privatenoexcept

Definition at line 80 of file Groups.cc.

Referenced by add_host().

+ Here is the caller graph for this function:

◆ add_host()

void SWC::client::Mngr::Group::add_host ( Comm::EndPoints new_endpoints)

Definition at line 31 of file Groups.cc.

References _get_host(), m_mutex, SWC::Core::Vector< Comm::EndPoints >::push_back(), and SWC::Core::Vector< T, SizeT, GROW_SZ >::swap().

+ Here is the call graph for this function:

◆ apply_endpoints()

void SWC::client::Mngr::Group::apply_endpoints ( Comm::EndPoints to_endpoints)

Definition at line 69 of file Groups.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::cbegin(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cend(), m_mutex, and SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back().

+ Here is the call graph for this function:

◆ copy()

Group::Ptr SWC::client::Mngr::Group::copy ( )

Definition at line 27 of file Groups.cc.

References cid_begin, cid_end, get_hosts(), Group(), and role.

+ Here is the call graph for this function:

◆ get_hosts()

Hosts SWC::client::Mngr::Group::get_hosts ( )

Definition at line 43 of file Groups.cc.

References SWC::Core::Vector< Comm::EndPoints >::cbegin(), SWC::Core::Vector< Comm::EndPoints >::cend(), and m_mutex.

Referenced by copy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_in_group()

bool SWC::client::Mngr::Group::is_in_group ( const Comm::EndPoint endpoint)
noexcept

Definition at line 48 of file Groups.cc.

◆ print()

void SWC::client::Mngr::Group::print ( std::ostream &  out)

Definition at line 56 of file Groups.cc.

References cid_begin, cid_end, m_mutex, role, and SWC::DB::Types::MngrRole::to_string().

+ Here is the call graph for this function:

Member Data Documentation

◆ cid_begin

const cid_t SWC::client::Mngr::Group::cid_begin

Definition at line 25 of file Groups.h.

Referenced by copy(), and print().

◆ cid_end

const cid_t SWC::client::Mngr::Group::cid_end

Definition at line 26 of file Groups.h.

Referenced by copy(), and print().

◆ m_mutex

Core::MutexSptd SWC::client::Mngr::Group::m_mutex
private

Definition at line 54 of file Groups.h.

Referenced by add_host(), apply_endpoints(), get_hosts(), and print().

◆ role

const uint8_t SWC::client::Mngr::Group::role

Definition at line 24 of file Groups.h.

Referenced by copy(), and print().


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