MADARA
3.2.3
|
Filter for deleting endpoints, usually when new endpoints have been discovered. More...
#include <EndpointClear.h>
Public Member Functions | |
EndpointClear (const std::string &prefix=".endpoints") | |
Constructor. More... | |
virtual | ~EndpointClear () |
Destructor. More... | |
void | add_trusted_originator (const std::vector< std::string > &originators) |
Adds trusted originators who will be able to prompt deleting. More... | |
void | add_trusted_originator (const std::string &originator) |
Adds trusted originator who will be able to prompt deleting. More... | |
void | clear_trusted_originators (void) |
Clears all trusted originators who can prompt deleting. More... | |
virtual void | filter (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context, knowledge::Variables &vars) |
Calls the main logic of the filter. More... | |
void | set_prefix (const std::string &prefix) |
Sets the prefix to use. More... | |
Protected Attributes | |
knowledge::containers::Map | endpoints_ |
A map of discovered peers. More... | |
bool | initialized_ |
Tracks if the peers_ map has been initialized. More... | |
std::string | prefix_ |
The context. More... | |
std::map< std::string, bool > | trusted_originators_ |
originators that are trusted to prompt a clear of endpoints More... | |
Filter for deleting endpoints, usually when new endpoints have been discovered.
Definition at line 37 of file EndpointClear.h.
madara::filters::EndpointClear::EndpointClear | ( | const std::string & | prefix = ".endpoints" | ) |
Constructor.
prefix | the prefix where the endpoint map can be found |
Definition at line 8 of file EndpointClear.cpp.
|
virtual |
Destructor.
Definition at line 14 of file EndpointClear.cpp.
void madara::filters::EndpointClear::add_trusted_originator | ( | const std::vector< std::string > & | originators | ) |
Adds trusted originators who will be able to prompt deleting.
originators | the trusted originators to add |
Definition at line 105 of file EndpointClear.cpp.
void madara::filters::EndpointClear::add_trusted_originator | ( | const std::string & | originator | ) |
Adds trusted originator who will be able to prompt deleting.
originator | the trusted originator to add |
Definition at line 116 of file EndpointClear.cpp.
void madara::filters::EndpointClear::clear_trusted_originators | ( | void | ) |
Clears all trusted originators who can prompt deleting.
A cleared list means all originators who write to the prefix will prompt deletion
Definition at line 123 of file EndpointClear.cpp.
|
virtual |
Calls the main logic of the filter.
records | the aggregate records vector |
transport_context | context for querying transport state |
vars | context for querying current program state |
Implements madara::filters::AggregateFilter.
Definition at line 20 of file EndpointClear.cpp.
void madara::filters::EndpointClear::set_prefix | ( | const std::string & | prefix | ) |
Sets the prefix to use.
prefix | the prefix where the endpoint map can be found |
Definition at line 129 of file EndpointClear.cpp.
|
protected |
A map of discovered peers.
Definition at line 108 of file EndpointClear.h.
|
protected |
Tracks if the peers_ map has been initialized.
Definition at line 93 of file EndpointClear.h.
|
protected |
The context.
Definition at line 98 of file EndpointClear.h.
|
protected |
originators that are trusted to prompt a clear of endpoints
Definition at line 103 of file EndpointClear.h.