Class ConsistencyToken

java.lang.Object
org.apache.derby.impl.drda.ConsistencyToken

final class ConsistencyToken extends Object
Class which represents an RDB Package Consistency Token.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    Byte array representation of the token.
    private int
    Cached hash code.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConsistencyToken(byte[] bytes)
    Create a new ConsistencyToken instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check whether this object is equal to another object.
    byte[]
    Get the byte array representation of the consistency token.
    int
    Calculate the hash code.
    Return a string representation of the consistency token by converting it to a BigInteger value.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • bytes

      private final byte[] bytes
      Byte array representation of the token.
    • hash

      private int hash
      Cached hash code.
  • Constructor Details

    • ConsistencyToken

      ConsistencyToken(byte[] bytes)
      Create a new ConsistencyToken instance.
      Parameters:
      bytes - byte array representing the token
  • Method Details

    • getBytes

      public byte[] getBytes()
      Get the byte array representation of the consistency token.
      Returns:
      a byte[] value
    • equals

      public boolean equals(Object o)
      Check whether this object is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      o - another object
      Returns:
      true if the objects are equal
    • hashCode

      public int hashCode()
      Calculate the hash code.
      Overrides:
      hashCode in class Object
      Returns:
      hash code
    • toString

      public String toString()
      Return a string representation of the consistency token by converting it to a BigInteger value. (For debugging only.)
      Overrides:
      toString in class Object
      Returns:
      a String value