|
Modern C++ Kafka API
|
The properties for Kafka clients. More...
#include <Properties.h>
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<class T > | |
| 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<class T > | |
| 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.
|
inline |
Get a property reference.
If the property doesn't exist, an execption would be thrown.
|
inline |
Set a property.
If the map previously contained a mapping for the key, the old value is replaced by the specified value.