类 KeyValue<K,V>
java.lang.Object
org.apache.pulsar.common.schema.KeyValue<K,V>
A simple KeyValue class.
-
构造器详细资料
-
KeyValue
-
-
方法详细资料
-
getKey
-
getValue
-
hashCode
public int hashCode() -
equals
-
toString
-
encode
Encode a key and value pair into a bytes array.- 参数:
key- key object to encodekeyWriter- a writer to encode key objectvalue- value object to encodevalueWriter- a writer to encode value object- 返回:
- the encoded bytes array
-
decode
Decode the value into a key/value pair.- 参数:
data- the encoded bytesdecoder- the decoder to decode encoded key/value bytes- 返回:
- the decoded key/value pair
-