类 KeyValueSchemaInfo
java.lang.Object
org.apache.pulsar.client.impl.schema.KeyValueSchemaInfo
Util class for processing key/value schema info.
-
方法概要
修饰符和类型方法说明static KeyValueEncodingTypedecodeKeyValueEncodingType(SchemaInfo schemaInfo) Decode the kv encoding type from the schema info.static KeyValue<SchemaInfo,SchemaInfo> decodeKeyValueSchemaInfo(SchemaInfo schemaInfo) Decode the key/value schema info to get key schema info and value schema info.static <K,V> SchemaInfo encodeKeyValueSchemaInfo(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.static SchemaInfoencodeKeyValueSchemaInfo(String schemaName, SchemaInfo keySchemaInfo, SchemaInfo valueSchemaInfo, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.static <K,V> SchemaInfo encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.
-
方法详细资料
-
decodeKeyValueEncodingType
Decode the kv encoding type from the schema info.- 参数:
schemaInfo- the schema info- 返回:
- the kv encoding type
-
encodeKeyValueSchemaInfo
public static <K,V> SchemaInfo encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.- 参数:
keySchema- the key schemavalueSchema- the value schemakeyValueEncodingType- the encoding type to encode and decode key value pair- 返回:
- the final schema info
-
encodeKeyValueSchemaInfo
public static <K,V> SchemaInfo encodeKeyValueSchemaInfo(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.- 参数:
schemaName- the final schema namekeySchema- the key schemavalueSchema- the value schemakeyValueEncodingType- the encoding type to encode and decode key value pair- 返回:
- the final schema info
-
encodeKeyValueSchemaInfo
public static SchemaInfo encodeKeyValueSchemaInfo(String schemaName, SchemaInfo keySchemaInfo, SchemaInfo valueSchemaInfo, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.- 参数:
schemaName- the final schema namekeySchemaInfo- the key schema infovalueSchemaInfo- the value schema infokeyValueEncodingType- the encoding type to encode and decode key value pair- 返回:
- the final schema info
-
decodeKeyValueSchemaInfo
Decode the key/value schema info to get key schema info and value schema info.- 参数:
schemaInfo- key/value schema info.- 返回:
- the pair of key schema info and value schema info
-