MADARA  3.4.1
madara::knowledge::WaitSettings Class Reference

Encapsulates settings for a wait statement. More...

#include <WaitSettings.h>

Inheritance diagram for madara::knowledge::WaitSettings:
madara::knowledge::EvalSettings madara::knowledge::KnowledgeUpdateSettings madara::knowledge::KnowledgeReferenceSettings

Public Member Functions

 WaitSettings ()
 Constructor. More...
 
 WaitSettings (bool t_delay_sending_modifieds, bool t_treat_globals_as_locals, bool t_signal_updates, bool t_always_overwrite, bool t_always_expand, bool t_track_local_changes, std::string t_pre_print_statement, std::string t_post_print_statement, double t_poll_frequency, double t_max_wait_time, uint64_t t_clock_increment=1, bool t_treat_locals_as_globals=false, bool t_stream_changes=true, bool t_exceptions_on_unitialized=false)
 Constructor. More...
 
 WaitSettings (const WaitSettings &rhs)
 Copy constructor. More...
 

Public Attributes

bool always_overwrite = false
 Toggle for always overwriting records, regardless of quality, clock values, etc. More...
 
uint64_t clock_increment = 1
 Default clock increment. More...
 
bool delay_sending_modifieds
 Toggle for sending modifieds in a single update event after each evaluation. More...
 
bool exception_on_unitialized
 throw an exception if reference is on uninitialized variable More...
 
bool expand_variables
 Toggle for always attempting to expand variables (true) or never expanding variables (false) More...
 
double max_wait_time
 Maximum time to wait for an expression to become true (in seconds) More...
 
bool never_exit
 Never allow MADARA to exit, even with fatal errors or invalid state. More...
 
double poll_frequency
 Frequency to poll an expression for truth (in seconds) More...
 
std::string post_print_statement
 Statement to print after evaluations. More...
 
std::string pre_print_statement
 Statement to print before evaluations. More...
 
std::map< std::string, bool > send_list
 Map of record names that are allowed to be sent after operation. More...
 
bool signal_changes = true
 Toggle whether to signal changes have happened. More...
 
bool stream_changes = true
 Toggle for streaming support. More...
 
bool track_local_changes = true
 Toggle for checkpointing support. More...
 
bool treat_globals_as_locals = false
 Toggle whether updates to global variables are treated as local variables and not marked as modified to the transport. More...
 
bool treat_locals_as_globals = false
 Toggle whether updates to local variables are treated as global variables that should be sent over the transport. More...
 

Static Public Attributes

static const WaitSettings CHECKPOINT
 Settings to enable checkpoints. More...
 
static const WaitSettings DEFAULT
 Settings to use whatever defaults there are. More...
 
static const WaitSettings DELAY
 Settings to delay sending modifieds and expand variables. More...
 
static const WaitSettings DELAY_CHECKPOINT
 Settings to delay sending modifieds and enable checkpoints. More...
 
static const WaitSettings DELAY_EXPAND
 Settings to delay sending modifieds and expand variables. More...
 
static const WaitSettings DELAY_NO_EXPAND
 Settings to delay send modifieds and not expand variables. More...
 
static const WaitSettings EXPAND
 Settings to delay sending modifieds and expand variables. More...
 
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL
 
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL_NO_EXPAND
 
static const WaitSettings NO_EXPAND
 Settings to delay sending modifieds and expand variables. More...
 
static const WaitSettings NO_EXPAND_CHECKPOINT
 Settings to not expand odifieds and enable checkpoints. More...
 
static const WaitSettings SEND
 Settings to immediately send modifieds and expand variables. More...
 
static const WaitSettings SEND_EXPAND
 Settings to immediately send modifieds and expand variables. More...
 
static const WaitSettings SEND_NO_EXPAND
 Settings to immediately send modifieds and not expand variables. More...
 

Detailed Description

Encapsulates settings for a wait statement.

Definition at line 24 of file WaitSettings.h.

Constructor & Destructor Documentation

◆ WaitSettings() [1/3]

madara::knowledge::WaitSettings::WaitSettings ( )
inline

Constructor.

Definition at line 67 of file WaitSettings.h.

◆ WaitSettings() [2/3]

madara::knowledge::WaitSettings::WaitSettings ( bool  t_delay_sending_modifieds,
bool  t_treat_globals_as_locals,
bool  t_signal_updates,
bool  t_always_overwrite,
bool  t_always_expand,
bool  t_track_local_changes,
std::string  t_pre_print_statement,
std::string  t_post_print_statement,
double  t_poll_frequency,
double  t_max_wait_time,
uint64_t  t_clock_increment = 1,
bool  t_treat_locals_as_globals = false,
bool  t_stream_changes = true,
bool  t_exceptions_on_unitialized = false 
)
inline

Constructor.

Parameters
t_delay_sending_modifiedstrue to send modifieds
t_treat_globals_as_localstrue if global variables should be marked as not to be sent to the transport
t_signal_updatesindicates whether to signal updates to a separate thread that may be waiting. This is only potentially useful to multithreaded MADARA apps
t_always_overwritealways overwrite, despite quality
t_always_expandalways try to expand variable names
t_track_local_changesif true, keep track of modifications to local variables for checkpoint saving purposes.
t_pre_print_statementstatement to print out before evaluations
t_post_print_statementstatement to print out after evaluations
t_poll_frequencythe frequency to poll for changes (in seconds)
t_max_wait_timethe maximum time to wait for truth (in seconds)
t_clock_incrementamount of clock ticks to increment updated records by
t_treat_locals_as_globalstrue if local variable changes should be sent over the network (dangerous).
See also
treat_locals_as_globals
Parameters
t_stream_changestrue if changes must be streamed
t_exceptions_on_unitializedtrue if exceptions must be thrown when reading uninitialized variables

Definition at line 101 of file WaitSettings.h.

◆ WaitSettings() [3/3]

madara::knowledge::WaitSettings::WaitSettings ( const WaitSettings rhs)
inline

Copy constructor.

Definition at line 121 of file WaitSettings.h.

Member Data Documentation

◆ always_overwrite

bool madara::knowledge::KnowledgeUpdateSettings::always_overwrite = false
inherited

Toggle for always overwriting records, regardless of quality, clock values, etc.

Definition at line 114 of file KnowledgeUpdateSettings.h.

◆ CHECKPOINT

const WaitSettings madara::knowledge::WaitSettings::CHECKPOINT
static

Settings to enable checkpoints.

Definition at line 32 of file WaitSettings.h.

◆ clock_increment

uint64_t madara::knowledge::KnowledgeUpdateSettings::clock_increment = 1
inherited

Default clock increment.

Definition at line 126 of file KnowledgeUpdateSettings.h.

◆ DEFAULT

const WaitSettings madara::knowledge::WaitSettings::DEFAULT
static

Settings to use whatever defaults there are.

Definition at line 29 of file WaitSettings.h.

◆ DELAY

const WaitSettings madara::knowledge::WaitSettings::DELAY
static

Settings to delay sending modifieds and expand variables.

Definition at line 35 of file WaitSettings.h.

◆ DELAY_CHECKPOINT

const WaitSettings madara::knowledge::WaitSettings::DELAY_CHECKPOINT
static

Settings to delay sending modifieds and enable checkpoints.

Definition at line 38 of file WaitSettings.h.

◆ DELAY_EXPAND

const WaitSettings madara::knowledge::WaitSettings::DELAY_EXPAND
static

Settings to delay sending modifieds and expand variables.

Definition at line 44 of file WaitSettings.h.

◆ DELAY_NO_EXPAND

const WaitSettings madara::knowledge::WaitSettings::DELAY_NO_EXPAND
static

Settings to delay send modifieds and not expand variables.

Definition at line 47 of file WaitSettings.h.

◆ delay_sending_modifieds

bool madara::knowledge::EvalSettings::delay_sending_modifieds
inherited

Toggle for sending modifieds in a single update event after each evaluation.

Definition at line 141 of file EvalSettings.h.

◆ exception_on_unitialized

bool madara::knowledge::KnowledgeReferenceSettings::exception_on_unitialized
inherited

throw an exception if reference is on uninitialized variable

Definition at line 76 of file KnowledgeReferenceSettings.h.

◆ EXPAND

const WaitSettings madara::knowledge::WaitSettings::EXPAND
static

Settings to delay sending modifieds and expand variables.

Definition at line 41 of file WaitSettings.h.

◆ expand_variables

bool madara::knowledge::KnowledgeReferenceSettings::expand_variables
inherited

Toggle for always attempting to expand variables (true) or never expanding variables (false)

Definition at line 68 of file KnowledgeReferenceSettings.h.

◆ GLOBAL_AS_LOCAL

const KnowledgeUpdateSettings madara::knowledge::KnowledgeUpdateSettings::GLOBAL_AS_LOCAL
staticinherited

Definition at line 29 of file KnowledgeUpdateSettings.h.

◆ GLOBAL_AS_LOCAL_NO_EXPAND

const KnowledgeUpdateSettings madara::knowledge::KnowledgeUpdateSettings::GLOBAL_AS_LOCAL_NO_EXPAND
staticinherited

Definition at line 30 of file KnowledgeUpdateSettings.h.

◆ max_wait_time

double madara::knowledge::WaitSettings::max_wait_time

Maximum time to wait for an expression to become true (in seconds)

Definition at line 136 of file WaitSettings.h.

◆ never_exit

bool madara::knowledge::KnowledgeReferenceSettings::never_exit
inherited

Never allow MADARA to exit, even with fatal errors or invalid state.

Definition at line 73 of file KnowledgeReferenceSettings.h.

◆ NO_EXPAND

const WaitSettings madara::knowledge::WaitSettings::NO_EXPAND
static

Settings to delay sending modifieds and expand variables.

Definition at line 50 of file WaitSettings.h.

◆ NO_EXPAND_CHECKPOINT

const WaitSettings madara::knowledge::WaitSettings::NO_EXPAND_CHECKPOINT
static

Settings to not expand odifieds and enable checkpoints.

Definition at line 53 of file WaitSettings.h.

◆ poll_frequency

double madara::knowledge::WaitSettings::poll_frequency

Frequency to poll an expression for truth (in seconds)

Definition at line 131 of file WaitSettings.h.

◆ post_print_statement

std::string madara::knowledge::EvalSettings::post_print_statement
inherited

Statement to print after evaluations.

Definition at line 151 of file EvalSettings.h.

◆ pre_print_statement

std::string madara::knowledge::EvalSettings::pre_print_statement
inherited

Statement to print before evaluations.

Definition at line 146 of file EvalSettings.h.

◆ SEND

const WaitSettings madara::knowledge::WaitSettings::SEND
static

Settings to immediately send modifieds and expand variables.

Definition at line 56 of file WaitSettings.h.

◆ SEND_EXPAND

const WaitSettings madara::knowledge::WaitSettings::SEND_EXPAND
static

Settings to immediately send modifieds and expand variables.

Definition at line 59 of file WaitSettings.h.

◆ send_list

std::map<std::string, bool> madara::knowledge::EvalSettings::send_list
inherited

Map of record names that are allowed to be sent after operation.

The map is only valid if

See also
delay_sending_modifieds is false.

Definition at line 157 of file EvalSettings.h.

◆ SEND_NO_EXPAND

const WaitSettings madara::knowledge::WaitSettings::SEND_NO_EXPAND
static

Settings to immediately send modifieds and not expand variables.

Definition at line 62 of file WaitSettings.h.

◆ signal_changes

bool madara::knowledge::KnowledgeUpdateSettings::signal_changes = true
inherited

Toggle whether to signal changes have happened.

Setting this to false will increase performance, but in general should be left to true. Setting this to false can result in problems with wait statements.

Definition at line 108 of file KnowledgeUpdateSettings.h.

◆ stream_changes

bool madara::knowledge::KnowledgeUpdateSettings::stream_changes = true
inherited

Toggle for streaming support.

If this is true, all changes will be streamed to the attached streamer, if any.

Definition at line 144 of file KnowledgeUpdateSettings.h.

◆ track_local_changes

bool madara::knowledge::KnowledgeUpdateSettings::track_local_changes = true
inherited

Toggle for checkpointing support.

If this is true, all changes will be added to the local changes map in the knowledge base, which is used by save_checkpoint to create diffs of knowledge

Definition at line 121 of file KnowledgeUpdateSettings.h.

◆ treat_globals_as_locals

bool madara::knowledge::KnowledgeUpdateSettings::treat_globals_as_locals = false
inherited

Toggle whether updates to global variables are treated as local variables and not marked as modified to the transport.

Definition at line 100 of file KnowledgeUpdateSettings.h.

◆ treat_locals_as_globals

bool madara::knowledge::KnowledgeUpdateSettings::treat_locals_as_globals = false
inherited

Toggle whether updates to local variables are treated as global variables that should be sent over the transport.

It should be stressed that this is dangerous and should only be used for debugging. If you toggle this to true, all local variables will be sent over the network where they will overwrite local variables in remote systems, unless the remote system filters out the local variable changes with an on-receive filter

Definition at line 138 of file KnowledgeUpdateSettings.h.


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