@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.
During a recovery procedure, ChronicleHashCorruption.Listener.onCorruption(ChronicleHashCorruption)
might
be called concurrently from multiple threads. If the implementation of this method calls some
methods on some objects, that are not safe for concurrent use from multiple threads, the
implementation must care about synchronization itself.
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 © 2021. All rights reserved.