Class PureJavaCrc32
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaCrc32
-
@Deprecated public class PureJavaCrc32 extends Object
Deprecated.UseFastCrcinstead.This class was taken from Hadoop org.apache.hadoop.util.PureJavaCrc32 A pure-java implementation of the CRC32 checksum that uses the same polynomial as the built-in native CRC32. This is to avoid the JNI overhead for certain uses of Checksumming where many small pieces of data are checksummed in succession. The current version is ~10x to 1.8x as fast as Sun's native java.util.zip.CRC32 in Java 1.6
-
-
Constructor Summary
Constructors Constructor Description PureJavaCrc32()Deprecated.Create a new PureJavaCrc32 object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intcalcCrc32(ByteBuffer b, int len)Deprecated.Calculates CRC32 checksum.intgetValue()Deprecated.return crc32 valuevoidreset()Deprecated.preparation for further calculationsvoidupdate(int b)Deprecated.voidupdate(ByteBuffer b, int len)Deprecated.
-
-
-
Method Detail
-
getValue
public int getValue()
Deprecated.return crc32 value
-
reset
public void reset()
Deprecated.preparation for further calculations
-
update
public void update(ByteBuffer b, int len)
Deprecated.- Parameters:
b- B.len- Length.
-
update
public final void update(int b)
Deprecated.- Parameters:
b- B.
-
calcCrc32
public static int calcCrc32(ByteBuffer b, int len)
Deprecated.Calculates CRC32 checksum. This method will move buffer's position tolenbytes forward.- Parameters:
b- B.len- Length.
-
-