| Modifier and Type | Field and Description |
|---|---|
protected SchemaInfoProvider |
schemaInfoProvider |
| Modifier and Type | Method and Description |
|---|---|
void |
configureSchemaInfo(String topicName,
String componentName,
SchemaInfo schemaInfo) |
KeyValue<K,V> |
decode(byte[] bytes) |
KeyValue<K,V> |
decode(byte[] bytes,
byte[] schemaVersion) |
KeyValue<K,V> |
decode(byte[] keyBytes,
byte[] valueBytes,
byte[] schemaVersion) |
byte[] |
encode(KeyValue<K,V> message) |
SchemaInfo |
getSchemaInfo() |
static Schema<KeyValue<byte[],byte[]>> |
kvBytes() |
static <K,V> Schema<KeyValue<K,V>> |
of(Class<K> key,
Class<V> value,
SchemaType type)
Key Value Schema using passed in schema type, support JSON and AVRO currently.
|
static <K,V> Schema<KeyValue<K,V>> |
of(Schema<K> keySchema,
Schema<V> valueSchema) |
static <K,V> Schema<KeyValue<K,V>> |
of(Schema<K> keySchema,
Schema<V> valueSchema,
KeyValueEncodingType keyValueEncodingType) |
boolean |
requireFetchingSchemaInfo() |
void |
setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider) |
boolean |
supportSchemaVersioning() |
protected SchemaInfoProvider schemaInfoProvider
public static <K,V> Schema<KeyValue<K,V>> of(Class<K> key, Class<V> value, SchemaType type)
public static <K,V> Schema<KeyValue<K,V>> of(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
public boolean supportSchemaVersioning()
supportSchemaVersioning in interface Schema<KeyValue<K,V>>public SchemaInfo getSchemaInfo()
getSchemaInfo in interface Schema<KeyValue<K,V>>public void setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider)
setSchemaInfoProvider in interface Schema<KeyValue<K,V>>public boolean requireFetchingSchemaInfo()
requireFetchingSchemaInfo in interface Schema<KeyValue<K,V>>public void configureSchemaInfo(String topicName, String componentName, SchemaInfo schemaInfo)
configureSchemaInfo in interface Schema<KeyValue<K,V>>Copyright © 2017–2020 Apache Software Foundation. All rights reserved.