Class DirectMemoryCRC32Digest
- java.lang.Object
-
- org.apache.bookkeeper.proto.checksum.DirectMemoryCRC32Digest
-
- All Implemented Interfaces:
CRC32DigestManager.CRC32Digest
class DirectMemoryCRC32Digest extends java.lang.Object implements CRC32DigestManager.CRC32Digest
Specialized implementation of CRC32 digest that uses reflection onCRC32class to get access to "updateByteBuffer" method and pass a direct memory pointer.
-
-
Constructor Summary
Constructors Constructor Description DirectMemoryCRC32Digest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetValueAndReset()static booleanisSupported()voidupdate(byte[] buffer, int offset, int len)voidupdate(io.netty.buffer.ByteBuf buf, int index, int length)
-
-
-
Method Detail
-
isSupported
public static boolean isSupported()
-
getValueAndReset
public long getValueAndReset()
- Specified by:
getValueAndResetin interfaceCRC32DigestManager.CRC32Digest
-
update
public void update(io.netty.buffer.ByteBuf buf, int index, int length)- Specified by:
updatein interfaceCRC32DigestManager.CRC32Digest
-
update
public void update(byte[] buffer, int offset, int len)- Specified by:
updatein interfaceCRC32DigestManager.CRC32Digest
-
-