org.codehaus.activemq.journal.impl
Class RecordFooter

java.lang.Object
  extended byorg.codehaus.activemq.journal.impl.RecordFooter

public class RecordFooter
extends Object

Serializes/Deserializes record header information.

Version:
$Revision: 1.1 $

Field Summary
 long checksum
           
static int CRC32_CHECKSUM_ALGORITHIM
           
static byte[] END_OF_RECORD
           
static int HASH_CHECKSUM_ALGORITHIM
           
static int NO_CHECKSUM_ALGORITHIM
           
static int RECORD_FOOTER_SIZE
           
static int SELECTED_CHECKSUM_ALGORITHIM
           
 long sequenceId
           
 
Constructor Summary
RecordFooter()
           
 
Method Summary
static long buildChecksum(byte[] data)
           
 void bulkSet(RecordHeader header, byte[] data)
           
 void invalidate()
           
static boolean isChecksumingEnabled()
           
 boolean matches(byte[] data)
           
 boolean matches(RecordHeader header)
           
(package private)  void readRecordFooter(DataInput in)
           
 ByteBuffer toByteBuffer()
           
(package private)  void writeRecordFooter(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTED_CHECKSUM_ALGORITHIM

public static final int SELECTED_CHECKSUM_ALGORITHIM

NO_CHECKSUM_ALGORITHIM

public static final int NO_CHECKSUM_ALGORITHIM
See Also:
Constant Field Values

HASH_CHECKSUM_ALGORITHIM

public static final int HASH_CHECKSUM_ALGORITHIM
See Also:
Constant Field Values

CRC32_CHECKSUM_ALGORITHIM

public static final int CRC32_CHECKSUM_ALGORITHIM
See Also:
Constant Field Values

RECORD_FOOTER_SIZE

public static final int RECORD_FOOTER_SIZE
See Also:
Constant Field Values

END_OF_RECORD

public static final byte[] END_OF_RECORD

checksum

public long checksum

sequenceId

public long sequenceId
Constructor Detail

RecordFooter

public RecordFooter()
Method Detail

toByteBuffer

public ByteBuffer toByteBuffer()
Returns:

writeRecordFooter

void writeRecordFooter(DataOutput out)
                 throws IOException
Throws:
IOException

readRecordFooter

void readRecordFooter(DataInput in)
                throws IOException
Throws:
IOException

invalidate

public void invalidate()

matches

public boolean matches(RecordHeader header)

isChecksumingEnabled

public static boolean isChecksumingEnabled()

matches

public boolean matches(byte[] data)

buildChecksum

public static long buildChecksum(byte[] data)

bulkSet

public void bulkSet(RecordHeader header,
                    byte[] data)
Parameters:
header -
data -


Copyright © 2004 Protique, Ltd.. All Rights Reserved.