@Beta public interface ChronicleHashCorruption
Recovery procedure doesn't guarantee accuracy of the corruption events. Only two things are guaranteed:
ChronicleHashCorruption.Listener
didn't receive any corruption events, the recovered Chronicle Map
was not corrupted;
ChronicleHashCorruption.Listener
received some corruption events, the recovered Chronicle Map was
corrupted.ChronicleHashCorruption
objects, passed to ChronicleHashCorruption.Listener
, shouldn't be saved and
used outside of the ChronicleHashCorruption.Listener.onCorruption(ChronicleHashCorruption)
method body, because
ChronicleHashCorruption
objects could be reused during the recovery procedure.
ChronicleHashBuilder#recoverPersistedTo(File, boolean, Listener)
,
ChronicleHashBuilder#createOrRecoverPersistedTo(File, boolean, Listener)
Modifier and Type | Interface and Description |
---|---|
static interface |
ChronicleHashCorruption.Listener
Listener of
ChronicleHashCorruption events. |
Modifier and Type | Method and Description |
---|---|
Throwable |
exception()
Returns the exception, associated with this corruption, if any, or
null if there is
no exception. |
String |
message()
Returns the message, explaining this corruption.
|
int |
segmentIndex()
Returns the index of the segment, with which this corruption is associated, or -1, if not
applicable.
|
String message()
@Nullable Throwable exception()
null
if there is
no exception.int segmentIndex()
Copyright © 2017. All rights reserved.