pulsar-client-cpp
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
pulsar::KeyValue Class Reference

#include <KeyValue.h>

Public Member Functions

 KeyValue (std::string &&key, std::string &&value)
 
std::string getKey () const
 
const void * getValue () const
 
size_t getValueLength () const
 
std::string getValueAsString () const
 

Friends

class Message
 
class MessageBuilder
 

Detailed Description

Use to when the user uses key value schema.

Constructor & Destructor Documentation

◆ KeyValue()

pulsar::KeyValue::KeyValue ( std::string &&  key,
std::string &&  value 
)

Constructor key value, according to keyValueEncodingType, whether key and value be encoded together.

Parameters
keykey data.
valuevalue data.
keyValueEncodingTypekey value encoding type.

Member Function Documentation

◆ getKey()

std::string pulsar::KeyValue::getKey ( ) const

Get the key of KeyValue.

Returns
character stream for key

◆ getValue()

const void * pulsar::KeyValue::getValue ( ) const

Get the value of the KeyValue.

Returns
the pointer to the KeyValue value

◆ getValueAsString()

std::string pulsar::KeyValue::getValueAsString ( ) const

Get string representation of the KeyValue value.

Returns
the string representation of the KeyValue value

◆ getValueLength()

size_t pulsar::KeyValue::getValueLength ( ) const

Get the value length of the keyValue.

Returns
the length of the KeyValue value

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