com.sleepycat.je.log
Class ChecksumValidator

java.lang.Object
  extended by com.sleepycat.je.log.ChecksumValidator

public class ChecksumValidator
extends Object

Checksum validator is used to check checksums on log entries.


Constructor Summary
ChecksumValidator()
           
 
Method Summary
 void reset()
           
 void update(byte[] buf, int offset, int length)
           
 void update(ByteBuffer buf, int length)
          Add this byte buffer to the checksum.
(package private)  void validate(long expectedChecksum, long lsn)
           
 void validate(long expectedChecksum, long fileNum, long fileOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChecksumValidator

public ChecksumValidator()
Method Detail

reset

public void reset()

update

public void update(ByteBuffer buf,
                   int length)
            throws ChecksumException
Add this byte buffer to the checksum. Assume the byte buffer is already positioned at the data.

Parameters:
buf - target buffer
length - of data
Throws:
ChecksumException

update

public void update(byte[] buf,
                   int offset,
                   int length)

validate

void validate(long expectedChecksum,
              long lsn)
        throws ChecksumException
Throws:
ChecksumException

validate

public void validate(long expectedChecksum,
                     long fileNum,
                     long fileOffset)
              throws ChecksumException
Throws:
ChecksumException


Copyright (c) 2004-2012 Oracle. All rights reserved.