public interface ChecksumEntry
ChronicleHashBuilder
s
with ChronicleHashBuilder.checksumEntries(boolean)
configured to true
. There is
no method that returns ChecksumEntry
, MapEntry
or SetEntry
could be
casted to ChecksumEntry
to access it's methods.
See Entry checksums section in the Chronicle Map tutorial for usage examples of this interface.
Modifier and Type | Method and Description |
---|---|
boolean |
checkSum()
Computes checksum from the entry bytes and checks whether it is equal to the stored checksum.
|
void |
updateChecksum()
Re-computes and stores checksum for the entry.
|
void updateChecksum()
MapAbsentEntry.doInsert(Data)
, MapEntry.doReplaceValue(Data)
: it is performed automatically underneath. Call this method,
only when value bytes was updated directly, for example though flyweight implementation of
a value
interface.UnsupportedOperationException
- if checksums are not stored in the containing Chronicle
HashRuntimeException
- if the context of this entry is locked improperly, e. g. on the
read level, that is not upgradable to the
update level. Calling updateChecksum()
method is enabled when at least update lock is held.boolean checkSum()
true
if stored checksum equals to checksum computed from the entry bytesUnsupportedOperationException
- if checksums are not stored in the containing Chronicle
HashRuntimeException
- if the context of this entry is locked improperly, e. g. on the
read level, that is not upgradable to the
update level. Calling checkSum()
method is
enabled when at least update lock is held.Copyright © 2020. All rights reserved.