public abstract class AbstractSchema<T> extends Object implements Schema<T>
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP| Constructor and Description |
|---|
AbstractSchema() |
| Modifier and Type | Method and Description |
|---|---|
Schema<?> |
atSchemaVersion(byte[] schemaVersion)
Return an instance of this schema at the given version.
|
Schema<T> |
clone() |
abstract T |
decode(io.netty.buffer.ByteBuf byteBuf)
Decode a byteBuf into an object using the schema definition and deserializer implementation
|
T |
decode(io.netty.buffer.ByteBuf byteBuf,
byte[] schemaVersion)
Decode a byteBuf into an object using a given version.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitAUTO_CONSUME, AUTO_PRODUCE_BYTES, AUTO_PRODUCE_BYTES, AUTO, AVRO, AVRO, configureSchemaInfo, decode, decode, decode, encode, generic, getNativeSchema, getSchema, getSchemaInfo, JSON, JSON, KeyValue, KeyValue, KeyValue, KeyValue, KV_BYTES, NATIVE_AVRO, PROTOBUF_NATIVE, PROTOBUF_NATIVE, PROTOBUF, PROTOBUF, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioning, validatepublic abstract T decode(io.netty.buffer.ByteBuf byteBuf)
Do not modify reader/writer index of ByteBuf so, it can be reused to access correct data.
byteBuf - the byte buffer to decodepublic T decode(io.netty.buffer.ByteBuf byteBuf, byte[] schemaVersion)
byteBuf - the byte array to decodeschemaVersion - the schema version to decode the object. null indicates using latest version.public Schema<?> atSchemaVersion(byte[] schemaVersion) throws SchemaSerializationException
schemaVersion - the versionSchemaSerializationException - in case of unknown schema versionNullPointerException - in case of null schemaVersion and supportSchemaVersioning is trueCopyright © 2017–2022 Apache Software Foundation. All rights reserved.