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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
This interface helps to compare byte arrays. -
Field Summary
Modifier and TypeFieldDescriptionstatic final BytesSchemaVersion.ByteArrayComparator
A byte array comparator based on lexicograpic ordering.Fields inherited from interface org.apache.pulsar.common.protocol.schema.SchemaVersion
Empty, Latest
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
bytes()
int
compareTo
(BytesSchemaVersion that) boolean
byte[]
get()
Get the data from the Bytes.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.static BytesSchemaVersion
of
(byte[] bytes) toString()
-
Field Details
-
BYTES_LEXICO_COMPARATOR
A byte array comparator based on lexicograpic ordering.
-
-
Method Details
-
bytes
public byte[] bytes()- Specified by:
bytes
in interfaceSchemaVersion
-
of
-
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. -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BytesSchemaVersion>
-
toString
-