MADARA
3.4.1
|
Receives fragments and saves them to files. More...
#include <FragmentsToFilesFilter.h>
Public Member Functions | |
FragmentsToFilesFilter () | |
Constructor. More... | |
virtual | ~FragmentsToFilesFilter ()=default |
Destructor. More... | |
void | disable_clear_fragments (void) |
Disables the clear fragments flag. More... | |
void | enable_clear_fragments (void) |
Enables the clear fragments flag. More... | |
virtual MADARA_EXPORT void | filter (knowledge::KnowledgeMap &records, const transport::TransportContext &, knowledge::Variables &) |
Filters the fragments and converts them to files. More... | |
std::string | get_dir_mapping (const std::string &variable_prefix) |
Gets the directory associated with the variable prefix. More... | |
void | set_dir_mapping (const std::string &variable_prefix, const std::string &directory) |
Sets a mapping between a variable prefix and a directory. More... | |
Public Attributes | |
bool | clear_fragments_ |
if true, clear fragments after sent to file More... | |
std::map< std::string, std::string > | map_ |
map of variable prefixes to directories More... | |
Receives fragments and saves them to files.
This filter is intended to be paired with the FileFragmenter class, e.g., with the Madara File Service (mfs)
Definition at line 29 of file FragmentsToFilesFilter.h.
|
inline |
Constructor.
Definition at line 35 of file FragmentsToFilesFilter.h.
|
virtualdefault |
Destructor.
|
inline |
Disables the clear fragments flag.
Fragments are saved to disk and saved to the local knowledge base
Definition at line 102 of file FragmentsToFilesFilter.h.
|
inline |
Enables the clear fragments flag.
Whenever a fragment is saved to disk, it will not also be applied to the local knowledge base
Definition at line 93 of file FragmentsToFilesFilter.h.
|
virtual |
Filters the fragments and converts them to files.
records | the aggregate records vector |
Implements madara::filters::AggregateFilter.
Definition at line 18 of file FragmentsToFilesFilter.cpp.
|
inline |
Gets the directory associated with the variable prefix.
variable_prefix | the prefix that must match in a list of filtered records |
Definition at line 75 of file FragmentsToFilesFilter.h.
|
inline |
Sets a mapping between a variable prefix and a directory.
variable_prefix | the prefix that must match in a list of filtered records |
directory | the directory to save fragments to |
Definition at line 55 of file FragmentsToFilesFilter.h.
bool madara::filters::FragmentsToFilesFilter::clear_fragments_ |
if true, clear fragments after sent to file
Definition at line 108 of file FragmentsToFilesFilter.h.
std::map<std::string, std::string> madara::filters::FragmentsToFilesFilter::map_ |
map of variable prefixes to directories
Definition at line 111 of file FragmentsToFilesFilter.h.