Class LongSchema

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

    public class LongSchema
    extends AbstractSchema<java.lang.Long>
    A schema for `Long`.
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      LongSchema()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Long decode​(byte[] bytes)  
      java.lang.Long decode​(io.netty.buffer.ByteBuf byteBuf)
      Decode a byteBuf into an object using the schema definition and deserializer implementation
      byte[] encode​(java.lang.Long data)  
      org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()  
      static LongSchema of()  
      void validate​(byte[] message)  
      void validate​(io.netty.buffer.ByteBuf 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, getNativeSchema, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioning
    • Constructor Detail

      • LongSchema

        public LongSchema()
    • Method Detail

      • validate

        public void validate​(byte[] message)
      • validate

        public void validate​(io.netty.buffer.ByteBuf message)
      • encode

        public byte[] encode​(java.lang.Long data)
      • decode

        public java.lang.Long decode​(byte[] bytes)
      • decode

        public java.lang.Long decode​(io.netty.buffer.ByteBuf byteBuf)
        Description copied from class: AbstractSchema
        Decode a byteBuf into an object using the schema definition and deserializer implementation

        Do not modify reader/writer index of ByteBuf so, it can be reused to access correct data.

        Specified by:
        decode in class AbstractSchema<java.lang.Long>
        Parameters:
        byteBuf - the byte buffer to decode
        Returns:
        the deserialized object
      • getSchemaInfo

        public org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()