MADARA
3.4.1
|
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< MatchPredicate > | predicates |
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... | |
Holds settings requirements for knowledge, usually in copying.
Definition at line 25 of file KnowledgeRequirements.h.
|
inline |
Constructor.
Definition at line 42 of file KnowledgeRequirements.h.
|
inline |
Constructor.
t_clear_knowledge | if true, target clears knowledge first |
t_clock_threshold | the minimum source knowledge clock value |
t_predicates | a vector of predicates to match |
t_quality_threshold | the minimum source knowledge quality |
t_use_source_clock | if true, target uses source clock value |
Definition at line 59 of file KnowledgeRequirements.h.
|
inline |
Copy constructor.
rhs | settings instance to copy |
Definition at line 74 of file KnowledgeRequirements.h.
bool madara::knowledge::KnowledgeRequirements::clear_knowledge |
If true, during loads, clear the KnowledgeBase first.
Definition at line 86 of file KnowledgeRequirements.h.
uint64_t madara::knowledge::KnowledgeRequirements::clock_threshold |
Minimum acceptable clock to accept (0 by default)
Definition at line 91 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 104 of file KnowledgeRequirements.h.
uint64_t madara::knowledge::KnowledgeRequirements::quality_threshold |
Minimum acceptable knowledge qualilty to accept (0 by default)
Definition at line 109 of file KnowledgeRequirements.h.
bool madara::knowledge::KnowledgeRequirements::use_source_clock |
Update to the Lamport Clock of the source.
Definition at line 114 of file KnowledgeRequirements.h.