|
SObjectizer
5.5
|
Basic parameters for advanced receive from mchain and for multi chain select. More...
#include <mchain.hpp>
Public Types | |
| using | actual_type = Derived |
| Actual type of params. More... | |
| using | stop_predicate = std::function< bool() > |
| Type of stop-predicate. More... | |
| using | chain_closed_handler = std::function< void(const mchain_t &) > |
| Type of chain-closed event. More... | |
Public Member Functions | |
| actual_type & | extract_n (std::size_t v) |
| Set limit for count of messages to be extracted. More... | |
| std::size_t | to_extract () const |
| Get limit for count of messages to be extracted. More... | |
| actual_type & | handle_n (std::size_t v) |
| Set limit for count of messages to be handled. More... | |
| std::size_t | to_handle () const |
| Get limit for count of message to be handled. More... | |
| template<typename Timeout > | |
| actual_type & | empty_timeout (Timeout v) |
| Set timeout for waiting on empty chain. More... | |
| const mchain_props::duration_t & | empty_timeout () const |
| Get timeout for waiting on empty chain. More... | |
| actual_type & | no_wait_on_empty () |
| Disable waiting on the empty queue. More... | |
| template<typename Timeout > | |
| actual_type & | total_time (Timeout v) |
| Set total time for the whole receive operation. More... | |
| const mchain_props::duration_t & | total_time () const |
| Get total time for the whole receive operation. More... | |
| actual_type & | stop_on (stop_predicate predicate) |
| Set user condition for stopping receive operation. More... | |
| const stop_predicate & | stop_on () const |
| Get user condition for stopping receive operation. More... | |
| actual_type & | on_close (chain_closed_handler handler) |
| Set handler for chain-closed event. More... | |
| const chain_closed_handler & | closed_handler () const |
| Get handler for chain-closed event. More... | |
Protected Member Functions | |
| actual_type & | self_reference () |
Private Attributes | |
| std::size_t | m_to_extract = { 0 } |
| Minimal count of messages to be extracted. More... | |
| std::size_t | m_to_handle = { 0 } |
| Minimal count of messages to be handled. More... | |
| mchain_props::duration_t | m_empty_timeout |
| Timeout for waiting on empty queue. More... | |
| mchain_props::duration_t | m_total_time |
| Total time for all work of advanced receive. More... | |
| stop_predicate | m_stop_predicate |
| Optional stop-predicate. More... | |
| chain_closed_handler | m_chain_closed_handler |
| Optional chain-closed handler. More... | |
Basic parameters for advanced receive from mchain and for multi chain select.
| using so_5::mchain_bulk_processing_params_t< Derived >::actual_type = Derived |
Actual type of params.
| using so_5::mchain_bulk_processing_params_t< Derived >::chain_closed_handler = std::function< void(const mchain_t &) > |
Type of chain-closed event.
| using so_5::mchain_bulk_processing_params_t< Derived >::stop_predicate = std::function< bool() > |
Type of stop-predicate.
Must return true if receive procedure should be stopped.
|
inline |
Get handler for chain-closed event.
|
inline |
Set timeout for waiting on empty chain.
|
inline |
Get timeout for waiting on empty chain.
|
inline |
Set limit for count of messages to be extracted.
|
inline |
Set limit for count of messages to be handled.
|
inline |
Disable waiting on the empty queue.
|
inline |
Set handler for chain-closed event.
If there is a previously set handler the old handler will be lost.
Usage example:
|
inlineprotected |
|
inline |
Set user condition for stopping receive operation.
|
inline |
Get user condition for stopping receive operation.
|
inline |
Get limit for count of messages to be extracted.
|
inline |
Get limit for count of message to be handled.
|
inline |
Set total time for the whole receive operation.
|
inline |
Get total time for the whole receive operation.
|
private |
Optional chain-closed handler.
|
private |
Timeout for waiting on empty queue.
|
private |
Optional stop-predicate.
|
private |
Minimal count of messages to be extracted.
Value 0 means that this parameter is not set.
|
private |
Minimal count of messages to be handled.
Value 0 means that this parameter it not set.
|
private |
Total time for all work of advanced receive.
1.8.14