Class BytesSchemaVersion

java.lang.Object
org.apache.pulsar.common.protocol.schema.BytesSchemaVersion
All Implemented Interfaces:
Comparable<BytesSchemaVersion>, SchemaVersion

public class BytesSchemaVersion extends Object implements SchemaVersion, Comparable<BytesSchemaVersion>
Bytes schema version.
  • Field Details

  • Method Details

    • bytes

      public byte[] bytes()
      Specified by:
      bytes in interface SchemaVersion
    • of

      public static BytesSchemaVersion of(byte[] bytes)
    • get

      public byte[] get()
      Get the data from the Bytes.
      Returns:
      The underlying byte array
    • hashCode

      public int hashCode()
      The hashcode is cached except for the case where it is computed as 0, in which case we compute the hashcode on every call.
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(BytesSchemaVersion that)
      Specified by:
      compareTo in interface Comparable<BytesSchemaVersion>
    • toString

      public String toString()
      Overrides:
      toString in class Object