类 AbstractMultiVersionReader<T>

java.lang.Object
org.apache.pulsar.client.impl.schema.reader.AbstractMultiVersionReader<T>
所有已实现的接口:
org.apache.pulsar.client.api.schema.SchemaReader<T>
直接已知子类:
AbstractMultiVersionAvroBaseReader, MultiVersionGenericProtobufNativeReader

public abstract class AbstractMultiVersionReader<T> extends Object implements org.apache.pulsar.client.api.schema.SchemaReader<T>
The multi version reader abstract class, implement it will handle the multi version schema.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    protected static final org.slf4j.Logger
     
    protected final org.apache.pulsar.client.api.schema.SchemaReader<T>
     
    protected org.apache.pulsar.client.api.schema.SchemaInfoProvider
     
  • 构造器概要

    构造器
    构造器
    说明
    AbstractMultiVersionReader(org.apache.pulsar.client.api.schema.SchemaReader<T> providerSchemaReader)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    protected org.apache.pulsar.common.schema.SchemaInfo
    getSchemaInfoByVersion(byte[] schemaVersion)
    TODO: think about how to make this async.
    org.apache.pulsar.client.api.schema.SchemaReader<T>
    getSchemaReader(byte[] schemaVersion)
     
    protected abstract org.apache.pulsar.client.api.schema.SchemaReader<T>
    loadReader(org.apache.pulsar.common.protocol.schema.BytesSchemaVersion schemaVersion)
    Load the schema reader for reading messages encoded by the given schema version.
    read(byte[] bytes, byte[] schemaVersion)
     
    read(byte[] bytes, int offset, int length)
     
    read(InputStream inputStream)
     
    read(InputStream inputStream, byte[] schemaVersion)
     
    void
    setSchemaInfoProvider(org.apache.pulsar.client.api.schema.SchemaInfoProvider schemaInfoProvider)
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.apache.pulsar.client.api.schema.SchemaReader

    getNativeSchema, read
  • 字段详细资料

    • providerSchemaReader

      protected final org.apache.pulsar.client.api.schema.SchemaReader<T> providerSchemaReader
    • schemaInfoProvider

      protected org.apache.pulsar.client.api.schema.SchemaInfoProvider schemaInfoProvider
    • LOG

      protected static final org.slf4j.Logger LOG
  • 构造器详细资料

    • AbstractMultiVersionReader

      public AbstractMultiVersionReader(org.apache.pulsar.client.api.schema.SchemaReader<T> providerSchemaReader)
  • 方法详细资料

    • read

      public T read(byte[] bytes, int offset, int length)
      指定者:
      read 在接口中 org.apache.pulsar.client.api.schema.SchemaReader<T>
    • read

      public T read(InputStream inputStream)
      指定者:
      read 在接口中 org.apache.pulsar.client.api.schema.SchemaReader<T>
    • read

      public T read(InputStream inputStream, byte[] schemaVersion)
      指定者:
      read 在接口中 org.apache.pulsar.client.api.schema.SchemaReader<T>
    • getSchemaReader

      public org.apache.pulsar.client.api.schema.SchemaReader<T> getSchemaReader(byte[] schemaVersion) throws ExecutionException
      抛出:
      ExecutionException
    • read

      public T read(byte[] bytes, byte[] schemaVersion)
      指定者:
      read 在接口中 org.apache.pulsar.client.api.schema.SchemaReader<T>
    • setSchemaInfoProvider

      public void setSchemaInfoProvider(org.apache.pulsar.client.api.schema.SchemaInfoProvider schemaInfoProvider)
      指定者:
      setSchemaInfoProvider 在接口中 org.apache.pulsar.client.api.schema.SchemaReader<T>
    • loadReader

      protected abstract org.apache.pulsar.client.api.schema.SchemaReader<T> loadReader(org.apache.pulsar.common.protocol.schema.BytesSchemaVersion schemaVersion)
      Load the schema reader for reading messages encoded by the given schema version.
      参数:
      schemaVersion - the provided schema version
      返回:
      the schema reader for decoding messages encoded by the provided schema version.
    • getSchemaInfoByVersion

      protected org.apache.pulsar.common.schema.SchemaInfo getSchemaInfoByVersion(byte[] schemaVersion)
      TODO: think about how to make this async.