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 onCRC32
class 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 long
getValueAndReset()
static boolean
isSupported()
void
update(byte[] buffer, int offset, int len)
void
update(io.netty.buffer.ByteBuf buf, int index, int length)
-
-
-
Method Detail
-
isSupported
public static boolean isSupported()
-
getValueAndReset
public long getValueAndReset()
- Specified by:
getValueAndReset
in interfaceCRC32DigestManager.CRC32Digest
-
update
public void update(io.netty.buffer.ByteBuf buf, int index, int length)
- Specified by:
update
in interfaceCRC32DigestManager.CRC32Digest
-
update
public void update(byte[] buffer, int offset, int len)
- Specified by:
update
in interfaceCRC32DigestManager.CRC32Digest
-
-