MADARA  3.1.8
madara::filters Namespace Reference

Provides filtering for the MADARA transport layer. More...

Namespaces

 java
 Provides java filters.
 
 ssl
 Provides ssl filters.
 

Classes

class  AggregateFilter
 Abstract base class for implementing aggregate record filters via a functor interface. More...
 
class  BufferFilter
 Abstract base class for implementing buffer filters via a functor interface. More...
 
class  ClearRecords
 Filter for clearing records from a filter. More...
 
class  CounterFilter
 Filter for discovering neighboring peers. More...
 
class  EndpointClear
 Filter for deleting endpoints, usually when new endpoints have been discovered. More...
 
class  EndpointDiscovery
 Filter for discovering remote hosts that have sent messages. More...
 
class  PeerDiscovery
 Filter for discovering neighboring peers. More...
 
class  RecordFilter
 Abstract base class for implementing individual record filters via a functor interface. More...
 

Typedefs

typedef std::list< BufferFilter * > BufferFilters
 

Enumerations

enum  {
  RECORD = 0, RECORD_NAME = 1, OPERATION_TYPE = 2, SEND_BANDWIDTH = 3,
  RECEIVED_BANDWIDTH = 4, UPDATE_TIME = 5, CURRENT_TIME = 6, KNOWLEDGE_DOMAIN = 7,
  ORIGINATOR = 8, TOTAL_ARGUMENTS = 9
}
 

Functions

MADARA_Export knowledge::KnowledgeRecord discard (knowledge::FunctionArguments &args, knowledge::Variables &vars)
 Filter for discarding a record. More...
 
MADARA_Export knowledge::KnowledgeRecord discard_nonfiles (knowledge::FunctionArguments &args, knowledge::Variables &vars)
 Filter for discarding a non-file record. More...
 
MADARA_Export knowledge::KnowledgeRecord discard_nonprimitives (knowledge::FunctionArguments &args, knowledge::Variables &vars)
 Filter for discarding a non-primitive record. More...
 
MADARA_Export void log_aggregate (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context, knowledge::Variables &vars)
 Filter for logging aggregate update and context. More...
 
MADARA_Export knowledge::KnowledgeRecord log_args (knowledge::FunctionArguments &args, knowledge::Variables &vars)
 Filter for logging args. More...
 

Detailed Description

Provides filtering for the MADARA transport layer.

Typedef Documentation

Definition at line 56 of file BufferFilter.h.

Enumeration Type Documentation

anonymous enum
Enumerator
RECORD 
RECORD_NAME 
OPERATION_TYPE 
SEND_BANDWIDTH 
RECEIVED_BANDWIDTH 
UPDATE_TIME 
CURRENT_TIME 
KNOWLEDGE_DOMAIN 
ORIGINATOR 
TOTAL_ARGUMENTS 

Definition at line 16 of file Arguments.h.

Function Documentation

Filter for discarding a record.

Resulting record will have a status of UNCREATED.

Parameters
argsarguments to the filter (unused)
varsvariable context (unused)
Returns
record with status set to UNCREATED

Definition at line 16 of file GenericFilters.cpp.

madara::knowledge::KnowledgeRecord madara::filters::discard_nonfiles ( knowledge::FunctionArguments args,
knowledge::Variables vars 
)

Filter for discarding a non-file record.

Resulting record will have a status of UNCREATED. Files are IMAGE_JPEG, TEXT, XML, and UNKNOWN_FILE_TYPE.

Parameters
argsfilter arguments (only first argument is used)
varsvariable context
Returns
record with status set to UNCREATED if arg is non-file

Alternatively, we could check type () for each defined type, but this will check that we are a file type

At the transport layer, we should check for stripped types and remove them from the list of knowledge records

Definition at line 51 of file GenericFilters.cpp.

madara::knowledge::KnowledgeRecord madara::filters::discard_nonprimitives ( knowledge::FunctionArguments args,
knowledge::Variables vars 
)

Filter for discarding a non-primitive record.

Resulting record will have a status of UNCREATED. Primitives are INTEGER, DOUBLE, STRING, INTEGER_ARRAY, and DOUBLE_ARRAY.

Parameters
argsfilter arguments (only first argument is used)
varsvariable context (unused)
Returns
record with status set to UNCREATED if arg is non-primitive

Alternatively, we could check type () for each defined type, but this will check that we are not a file type

At the transport layer, we should check for stripped types and remove them from the list of knowledge records

Definition at line 24 of file GenericFilters.cpp.

void madara::filters::log_aggregate ( knowledge::KnowledgeMap records,
const transport::TransportContext transport_context,
knowledge::Variables vars 
)

Filter for logging aggregate update and context.

Parameters
recordsaggregate update
transport_contextthe transport context
varsvariable context

Definition at line 142 of file GenericFilters.cpp.

madara::knowledge::KnowledgeRecord madara::filters::log_args ( knowledge::FunctionArguments args,
knowledge::Variables vars 
)

Filter for logging args.

Parameters
argsfilter arguments (only first argument is used)
varsvariable context
Returns
record with status set to UNCREATED if arg is non-file

Definition at line 77 of file GenericFilters.cpp.