Class Record

java.lang.Object
org.apache.activeio.journal.active.Record

public final class Record extends Object
Serializes/Deserializes data records.
Version:
$Revision: 1.1 $
  • Field Details

    • RECORD_HEADER_SIZE

      public static final int RECORD_HEADER_SIZE
      See Also:
    • RECORD_BASE_SIZE

      public static final int RECORD_BASE_SIZE
      See Also:
    • START_OF_RECORD

      public static final byte[] START_OF_RECORD
    • END_OF_RECORD

      public static final byte[] END_OF_RECORD
    • SELECTED_CHECKSUM_ALGORITHIM

      public static final int SELECTED_CHECKSUM_ALGORITHIM
    • NO_CHECKSUM_ALGORITHIM

      public static final int NO_CHECKSUM_ALGORITHIM
      See Also:
    • HASH_CHECKSUM_ALGORITHIM

      public static final int HASH_CHECKSUM_ALGORITHIM
      See Also:
    • CRC32_CHECKSUM_ALGORITHIM

      public static final int CRC32_CHECKSUM_ALGORITHIM
      See Also:
  • Constructor Details

  • Method Details

    • isChecksumingEnabled

      public static boolean isChecksumingEnabled()
    • setLocation

      public void setLocation(Location location) throws IOException
      Throws:
      IOException
    • readHeader

      public void readHeader(DataInput in) throws IOException
      Throws:
      IOException
    • readFooter

      public void readFooter(DataInput in) throws IOException
      Throws:
      IOException
    • checksum

      public void checksum(DataInput in) throws IOException
      Parameters:
      randomAccessFile -
      Throws:
      IOException
    • readFromPacket

      public boolean readFromPacket(Packet packet) throws IOException
      Throws:
      IOException
    • getChecksum

      public long getChecksum()
      Returns:
      Returns the checksum.
    • getPayloadLength

      public int getPayloadLength()
      Returns:
      Returns the length.
    • getRecordLength

      public int getRecordLength()
      Returns:
      Returns the length of the record .
    • getLocation

      public Location getLocation()
      Returns:
      Returns the location.
    • getMark

      public Location getMark()
      Returns:
      Returns the mark.
    • getPayload

      public Packet getPayload()
      Returns:
      Returns the payload.
    • getRecordType

      public byte getRecordType()
      Returns:
      Returns the recordType.
    • hasRemaining

      public boolean hasRemaining()
    • read

      public void read(Packet packet)
    • dispose

      public void dispose()