Class AutoProduceBytesSchema<T>

  • All Implemented Interfaces:
    java.lang.Cloneable, org.apache.pulsar.client.api.Schema<byte[]>

    public class AutoProduceBytesSchema<T>
    extends java.lang.Object
    implements org.apache.pulsar.client.api.Schema<byte[]>
    Auto detect schema.
    • Field Summary

      • Fields inherited from interface org.apache.pulsar.client.api.Schema

        BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.pulsar.client.api.Schema<byte[]> clone()  
      byte[] decode​(byte[] bytes, byte[] schemaVersion)  
      byte[] encode​(byte[] message)  
      java.util.Optional<java.lang.Object> getNativeSchema()  
      org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()  
      boolean schemaInitialized()  
      void setSchema​(org.apache.pulsar.client.api.Schema<T> schema)  
      void validate​(byte[] message)  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.client.api.Schema

        configureSchemaInfo, decode, decode, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioning
    • Constructor Detail

      • AutoProduceBytesSchema

        public AutoProduceBytesSchema()
      • AutoProduceBytesSchema

        public AutoProduceBytesSchema​(org.apache.pulsar.client.api.Schema<T> schema)
    • Method Detail

      • setSchema

        public void setSchema​(org.apache.pulsar.client.api.Schema<T> schema)
      • schemaInitialized

        public boolean schemaInitialized()
      • validate

        public void validate​(byte[] message)
        Specified by:
        validate in interface org.apache.pulsar.client.api.Schema<T>
      • encode

        public byte[] encode​(byte[] message)
        Specified by:
        encode in interface org.apache.pulsar.client.api.Schema<T>
      • decode

        public byte[] decode​(byte[] bytes,
                             byte[] schemaVersion)
        Specified by:
        decode in interface org.apache.pulsar.client.api.Schema<T>
      • getSchemaInfo

        public org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()
        Specified by:
        getSchemaInfo in interface org.apache.pulsar.client.api.Schema<T>
      • getNativeSchema

        public java.util.Optional<java.lang.Object> getNativeSchema()
        Specified by:
        getNativeSchema in interface org.apache.pulsar.client.api.Schema<T>
      • clone

        public org.apache.pulsar.client.api.Schema<byte[]> clone()
        Specified by:
        clone in interface org.apache.pulsar.client.api.Schema<T>
        Overrides:
        clone in class java.lang.Object