Class Location

  • All Implemented Interfaces:
    java.lang.Comparable, RecordLocation

    public final class Location
    extends java.lang.Object
    implements RecordLocation
    Defines a where a record can be located in the Journal.
    Version:
    $Revision: 1.1 $
    • Constructor Detail

      • Location

        public Location​(int logFileId,
                        int fileOffset)
    • Method Detail

      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getLogFileId

        public int getLogFileId()
      • getLogFileOffset

        public int getLogFileOffset()
      • writeToPacket

        public void writeToPacket​(Packet packet)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeToDataOutput

        public void writeToDataOutput​(java.io.DataOutput data)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readFromPacket

        public static Location readFromPacket​(Packet packet)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • readFromDataInput

        public static Location readFromDataInput​(java.io.DataInput data)
                                          throws java.io.IOException
        Throws:
        java.io.IOException