public abstract class AbstractMultiVersionReader<T> extends Object implements SchemaReader<T>
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
protected SchemaReader<T> |
providerSchemaReader |
protected SchemaInfoProvider |
schemaInfoProvider |
| Constructor and Description |
|---|
AbstractMultiVersionReader(SchemaReader<T> providerSchemaReader) |
| Modifier and Type | Method and Description |
|---|---|
protected SchemaInfo |
getSchemaInfoByVersion(byte[] schemaVersion)
TODO: think about how to make this async
|
SchemaReader<T> |
getSchemaReader(byte[] schemaVersion) |
protected abstract SchemaReader<T> |
loadReader(BytesSchemaVersion schemaVersion)
Load the schema reader for reading messages encoded by the given schema version.
|
T |
read(byte[] bytes,
byte[] schemaVersion) |
T |
read(byte[] bytes,
int offset,
int length) |
T |
read(InputStream inputStream) |
T |
read(InputStream inputStream,
byte[] schemaVersion) |
void |
setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNativeSchema, readprotected final SchemaReader<T> providerSchemaReader
protected SchemaInfoProvider schemaInfoProvider
protected static final org.slf4j.Logger LOG
public AbstractMultiVersionReader(SchemaReader<T> providerSchemaReader)
public T read(byte[] bytes, int offset, int length)
read in interface SchemaReader<T>public T read(InputStream inputStream)
read in interface SchemaReader<T>public T read(InputStream inputStream, byte[] schemaVersion)
read in interface SchemaReader<T>public SchemaReader<T> getSchemaReader(byte[] schemaVersion) throws ExecutionException
ExecutionExceptionpublic T read(byte[] bytes, byte[] schemaVersion)
read in interface SchemaReader<T>public void setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider)
setSchemaInfoProvider in interface SchemaReader<T>protected abstract SchemaReader<T> loadReader(BytesSchemaVersion schemaVersion)
schemaVersion - the provided schema versionprotected SchemaInfo getSchemaInfoByVersion(byte[] schemaVersion)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.