Modern C++ Kafka API: KAFKA_API::Properties Class Reference (original) (raw)

The properties for Kafka clients. More...

#include <[Properties.h](Properties%5F8h%5Fsource.html)>

Public Types
using PropertiesMap = std::map< std::string, ValueType >
Public Member Functions
Properties (const Properties &)=default
Properties (PropertiesMap kvMap)
bool operator== (const Properties &rhs) const
template
Properties & put (const std::string &key, const T &value)
Set a property. More...
void remove (const std::string &key)
Remove the property (if one exists).
bool contains (const std::string &key) const
Check whether the map contains a property.
template
T & get (const std::string &key) const
Get a property reference. More...
Optional< std::string > getProperty (const std::string &key) const
Get a property.
void eraseProperty (const std::string &key)
Remove a property.
std::string toString () const
const PropertiesMap & map () const
Get all properties with a map.

The properties for Kafka clients.

get()

template

T& KAFKA_API::Properties::get ( const std::string & key) const inline

Get a property reference.

If the property doesn't exist, an execption would be thrown.

put()

template

Properties& KAFKA_API::Properties::put ( const std::string & key, const T & value ) inline

Set a property.

If the map previously contained a mapping for the key, the old value is replaced by the specified value.


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