MADARA  3.2.3
madara::knowledge::KnowledgeRequirements Class Reference

Holds settings requirements for knowledge, usually in copying. More...

#include <KnowledgeRequirements.h>

Classes

struct  MatchPredicate
 A helper class for matching prefixes and suffixes. More...
 

Public Member Functions

 KnowledgeRequirements ()
 Constructor. More...
 
 KnowledgeRequirements (bool t_clear_knowledge, uint64_t t_clock_threshold=0, std::vector< MatchPredicate > t_predicates={}, uint64_t t_quality_threshold=0, bool t_use_source_clock=false)
 Constructor. More...
 
 KnowledgeRequirements (const KnowledgeRequirements &rhs)
 Copy constructor. More...
 

Public Attributes

bool clear_knowledge
 If true, during loads, clear the KnowledgeBase first. More...
 
uint64_t clock_threshold
 Minimum acceptable clock to accept (0 by default) More...
 
std::vector< MatchPredicatepredicates
 A vector of acceptable predicates to match (prefix and suffix). More...
 
uint64_t quality_threshold
 Minimum acceptable knowledge qualilty to accept (0 by default) More...
 
bool use_source_clock
 Update to the Lamport Clock of the source. More...
 

Detailed Description

Holds settings requirements for knowledge, usually in copying.

Definition at line 27 of file KnowledgeRequirements.h.

Constructor & Destructor Documentation

madara::knowledge::KnowledgeRequirements::KnowledgeRequirements ( )
inline

Constructor.

Definition at line 44 of file KnowledgeRequirements.h.

madara::knowledge::KnowledgeRequirements::KnowledgeRequirements ( bool  t_clear_knowledge,
uint64_t  t_clock_threshold = 0,
std::vector< MatchPredicate t_predicates = {},
uint64_t  t_quality_threshold = 0,
bool  t_use_source_clock = false 
)
inline

Constructor.

Parameters
t_clear_knowledgeif true, target clears knowledge first
t_clock_thresholdthe minimum source knowledge clock value
t_predicatesa vector of predicates to match
t_quality_thresholdthe minimum source knowledge quality
t_use_source_clockif true, target uses source clock value

Definition at line 60 of file KnowledgeRequirements.h.

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

Copy constructor.

Parameters
rhssettings instance to copy

Definition at line 77 of file KnowledgeRequirements.h.

Member Data Documentation

bool madara::knowledge::KnowledgeRequirements::clear_knowledge

If true, during loads, clear the KnowledgeBase first.

Definition at line 89 of file KnowledgeRequirements.h.

uint64_t madara::knowledge::KnowledgeRequirements::clock_threshold

Minimum acceptable clock to accept (0 by default)

Definition at line 94 of file KnowledgeRequirements.h.

std::vector<MatchPredicate> madara::knowledge::KnowledgeRequirements::predicates

A vector of acceptable predicates to match (prefix and suffix).

Empty elements mean "match all". Consequently, if you have a a predicate with a prefix of "" and a suffix of "", this would simply mean match all records. If you have a prefix of "agent", and an empty suffix, then all variables that start with "agent" will be accepted in the operation. Matching suffixes is more computationally expensive, as it forces all variables to be evaluated. If at all possible, use prefixes. Only use suffixes to filter out prefix results.

Definition at line 107 of file KnowledgeRequirements.h.

uint64_t madara::knowledge::KnowledgeRequirements::quality_threshold

Minimum acceptable knowledge qualilty to accept (0 by default)

Definition at line 112 of file KnowledgeRequirements.h.

bool madara::knowledge::KnowledgeRequirements::use_source_clock

Update to the Lamport Clock of the source.

Definition at line 117 of file KnowledgeRequirements.h.


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