Class Record
java.lang.Object
org.apache.activeio.journal.active.Record
Serializes/Deserializes data records.
- Version:
- $Revision: 1.1 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final byte[]static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()longgetMark()intintbytebooleanstatic booleanvoidvoidreadFooter(DataInput in) booleanreadFromPacket(Packet packet) voidreadHeader(DataInput in) voidsetLocation(Location location)
-
Field Details
-
RECORD_HEADER_SIZE
public static final int RECORD_HEADER_SIZE- See Also:
-
RECORD_FOOTER_SIZE
public static final int RECORD_FOOTER_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
-
Record
public Record() -
Record
- Throws:
IOException
-
Record
- Throws:
IOException
-
-
Method Details
-
isChecksumingEnabled
public static boolean isChecksumingEnabled() -
setLocation
- Throws:
IOException
-
readHeader
- Throws:
IOException
-
checksum
- Parameters:
randomAccessFile-- Throws:
IOException
-
readFromPacket
- 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
- Returns:
- Returns the location.
-
getMark
- Returns:
- Returns the mark.
-
getPayload
- Returns:
- Returns the payload.
-
getRecordType
public byte getRecordType()- Returns:
- Returns the recordType.
-
hasRemaining
public boolean hasRemaining() -
read
-
dispose
public void dispose()
-