Class ConsistencyToken


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

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Check whether this object is equal to another object.
      byte[] getBytes()
      Get the byte array representation of the consistency token.
      int hashCode()
      Calculate the hash code.
      java.lang.String toString()
      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 Detail

      • bytes

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

        private int hash
        Cached hash code.
    • Constructor Detail

      • ConsistencyToken

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

      • getBytes

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

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

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

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