MADARA  3.4.1
madara::knowledge::KnowledgeUpdateSettings Class Reference

Settings for applying knowledge updates. More...

#include <KnowledgeUpdateSettings.h>

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

Public Member Functions

 KnowledgeUpdateSettings ()=default
 Constructor. More...
 
 KnowledgeUpdateSettings (bool t_treat_globals_as_locals, bool t_signal_changes=true, bool t_always_overwrite=false, bool t_always_expand=true, bool t_track_local_changes=true, 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...
 
 KnowledgeUpdateSettings (const KnowledgeUpdateSettings &rhs)=default
 Constructor. More...
 
 ~KnowledgeUpdateSettings ()=default
 Destructor. 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 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...
 
bool never_exit
 Never allow MADARA to exit, even with fatal errors or invalid state. 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 KnowledgeUpdateSettings DEFAULT
 
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL
 
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL_NO_EXPAND
 
static const KnowledgeUpdateSettings NO_EXPAND
 

Detailed Description

Settings for applying knowledge updates.

Definition at line 23 of file KnowledgeUpdateSettings.h.

Constructor & Destructor Documentation

◆ KnowledgeUpdateSettings() [1/3]

madara::knowledge::KnowledgeUpdateSettings::KnowledgeUpdateSettings ( )
default

Constructor.

◆ KnowledgeUpdateSettings() [2/3]

madara::knowledge::KnowledgeUpdateSettings::KnowledgeUpdateSettings ( bool  t_treat_globals_as_locals,
bool  t_signal_changes = true,
bool  t_always_overwrite = false,
bool  t_always_expand = true,
bool  t_track_local_changes = true,
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_treat_globals_as_localstrue if global variables should be marked as not to be sent to the transport
t_signal_changesindicates 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_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 60 of file KnowledgeUpdateSettings.h.

◆ KnowledgeUpdateSettings() [3/3]

madara::knowledge::KnowledgeUpdateSettings::KnowledgeUpdateSettings ( const KnowledgeUpdateSettings rhs)
default

Constructor.

◆ ~KnowledgeUpdateSettings()

madara::knowledge::KnowledgeUpdateSettings::~KnowledgeUpdateSettings ( )
default

Destructor.

Member Data Documentation

◆ always_overwrite

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

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

Definition at line 114 of file KnowledgeUpdateSettings.h.

◆ clock_increment

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

Default clock increment.

Definition at line 126 of file KnowledgeUpdateSettings.h.

◆ DEFAULT

const KnowledgeUpdateSettings madara::knowledge::KnowledgeUpdateSettings::DEFAULT
static

Definition at line 27 of file KnowledgeUpdateSettings.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_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
static

Definition at line 29 of file KnowledgeUpdateSettings.h.

◆ GLOBAL_AS_LOCAL_NO_EXPAND

const KnowledgeUpdateSettings madara::knowledge::KnowledgeUpdateSettings::GLOBAL_AS_LOCAL_NO_EXPAND
static

Definition at line 30 of file KnowledgeUpdateSettings.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 KnowledgeUpdateSettings madara::knowledge::KnowledgeUpdateSettings::NO_EXPAND
static

Definition at line 28 of file KnowledgeUpdateSettings.h.

◆ signal_changes

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

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

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

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

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

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: