SObjectizer  5.5
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
so_5::mchain_props::capacity_t Class Reference

Parameters for defining chain size. More...

#include <mchain.hpp>

Public Member Functions

 capacity_t ()
 Default constructor. More...
 
bool unlimited () const
 Is message chain have no size limit? More...
 
std::size_t max_size () const
 Max size for size-limited chain. More...
 
memory_usage_t memory_usage () const
 Memory allocation type for size-limited chain. More...
 
overflow_reaction_t overflow_reaction () const
 Overflow reaction for size-limited chain. More...
 
bool is_overflow_timeout_defined () const
 Is waiting timeout for overflow case defined? More...
 
duration_t overflow_timeout () const
 Get the value of waiting timeout for overflow case. More...
 

Static Public Member Functions

static capacity_t make_unlimited ()
 Create capacity description for size-unlimited message chain. More...
 
static capacity_t make_limited_without_waiting (std::size_t max_size, memory_usage_t memory_usage, overflow_reaction_t overflow_reaction)
 
static capacity_t make_limited_with_waiting (std::size_t max_size, memory_usage_t memory_usage, overflow_reaction_t overflow_reaction, duration_t wait_timeout)
 

Private Member Functions

 capacity_t (std::size_t max_size, memory_usage_t memory_usage, overflow_reaction_t overflow_reaction, duration_t overflow_timeout)
 Initializing constructor for size-limited message chain. More...
 

Private Attributes

bool m_unlimited = { true }
 Has chain unlimited size? More...
 
std::size_t m_max_size
 Max size of the chain with limited size. More...
 
memory_usage_t m_memory
 Type of the storage for size-limited chain. More...
 
overflow_reaction_t m_overflow_reaction
 Type of reaction for chain overflow. More...
 
duration_t m_overflow_timeout
 Timeout for waiting on full chain during 'message push' operation. More...
 

Detailed Description

Parameters for defining chain size.

Since
v.5.5.13

Constructor & Destructor Documentation

◆ capacity_t() [1/2]

so_5::mchain_props::capacity_t::capacity_t ( std::size_t  max_size,
memory_usage_t  memory_usage,
overflow_reaction_t  overflow_reaction,
duration_t  overflow_timeout 
)
inlineprivate

Initializing constructor for size-limited message chain.

◆ capacity_t() [2/2]

so_5::mchain_props::capacity_t::capacity_t ( )
inline

Default constructor.

Creates description for size-unlimited chain.

Member Function Documentation

◆ is_overflow_timeout_defined()

bool so_5::mchain_props::capacity_t::is_overflow_timeout_defined ( ) const
inline

Is waiting timeout for overflow case defined?

Attention
Has sence only for size-limited chain.

◆ make_limited_with_waiting()

static capacity_t so_5::mchain_props::capacity_t::make_limited_with_waiting ( std::size_t  max_size,
memory_usage_t  memory_usage,
overflow_reaction_t  overflow_reaction,
duration_t  wait_timeout 
)
inlinestatic

Create capacity description for size-limited message chain with waiting on full queue during 'push message' operation.

Parameters
max_sizeMax size of the chain.
memory_usageType of chain storage.
overflow_reactionReaction on chain overflow.
wait_timeoutWaiting time on full message chain.

◆ make_limited_without_waiting()

static capacity_t so_5::mchain_props::capacity_t::make_limited_without_waiting ( std::size_t  max_size,
memory_usage_t  memory_usage,
overflow_reaction_t  overflow_reaction 
)
inlinestatic

Create capacity description for size-limited message chain without waiting on full queue during 'push message' operation.

Parameters
max_sizeMax size of the chain.
memory_usageType of chain storage.
overflow_reactionReaction on chain overflow.

◆ make_unlimited()

static capacity_t so_5::mchain_props::capacity_t::make_unlimited ( )
inlinestatic

Create capacity description for size-unlimited message chain.

◆ max_size()

std::size_t so_5::mchain_props::capacity_t::max_size ( ) const
inline

Max size for size-limited chain.

Attention
Has sence only for size-limited chain.

◆ memory_usage()

memory_usage_t so_5::mchain_props::capacity_t::memory_usage ( ) const
inline

Memory allocation type for size-limited chain.

Attention
Has sence only for size-limited chain.

◆ overflow_reaction()

overflow_reaction_t so_5::mchain_props::capacity_t::overflow_reaction ( ) const
inline

Overflow reaction for size-limited chain.

Attention
Has sence only for size-limited chain.

◆ overflow_timeout()

duration_t so_5::mchain_props::capacity_t::overflow_timeout ( ) const
inline

Get the value of waiting timeout for overflow case.

Attention
Has sence only for size-limited chain.

◆ unlimited()

bool so_5::mchain_props::capacity_t::unlimited ( ) const
inline

Is message chain have no size limit?

Member Data Documentation

◆ m_max_size

std::size_t so_5::mchain_props::capacity_t::m_max_size
private

Max size of the chain with limited size.

◆ m_memory

memory_usage_t so_5::mchain_props::capacity_t::m_memory
private

Type of the storage for size-limited chain.

◆ m_overflow_reaction

overflow_reaction_t so_5::mchain_props::capacity_t::m_overflow_reaction
private

Type of reaction for chain overflow.

◆ m_overflow_timeout

duration_t so_5::mchain_props::capacity_t::m_overflow_timeout
private

Timeout for waiting on full chain during 'message push' operation.

Note
Value 'zero' means that there must not be waiting on full chain.

◆ m_unlimited

bool so_5::mchain_props::capacity_t::m_unlimited = { true }
private

Has chain unlimited size?


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