| Modifier and Type | Field and Description |
|---|---|
protected SchemaInfoProvider |
schemaInfoProvider |
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP| Modifier and Type | Method and Description |
|---|---|
Schema<KeyValue<K,V>> |
clone() |
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() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitAUTO_CONSUME, AUTO_PRODUCE_BYTES, AUTO_PRODUCE_BYTES, AUTO, AVRO, AVRO, generic, getSchema, JSON, JSON, KeyValue, KeyValue, KeyValue, KeyValue, KV_BYTES, PROTOBUF_NATIVE, PROTOBUF_NATIVE, PROTOBUF, PROTOBUF, validateprotected 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.