Class LongSchema

java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<Long>
org.apache.pulsar.client.impl.schema.LongSchema
All Implemented Interfaces:
Cloneable, Schema<Long>

public class LongSchema extends AbstractSchema<Long>
A schema for `Long`.
  • Constructor Details

    • LongSchema

      public LongSchema()
  • Method Details

    • of

      public static LongSchema of()
    • validate

      public void validate(byte[] message)
    • validate

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

      public byte[] encode(Long data)
    • decode

      public Long decode(byte[] bytes)
    • decode

      public 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<Long>
      Parameters:
      byteBuf - the byte buffer to decode
      Returns:
      the deserialized object
    • getSchemaInfo

      public SchemaInfo getSchemaInfo()