Interface CommitLogReadHandler
- All Known Implementing Classes:
CommitLogReplayer
public interface CommitLogReadHandler
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic class -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleMutation(Mutation m, int size, int entryLocation, CommitLogDescriptor desc) Process a deserialized mutationvoidIn instances where we cannot recover from a specific error and don't care what the reader thinksbooleanHandle an error during segment read, signaling whether or not you want the reader to skip the remainder of the current segment on error.
-
Method Details
-
shouldSkipSegmentOnError
boolean shouldSkipSegmentOnError(CommitLogReadHandler.CommitLogReadException exception) throws IOException Handle an error during segment read, signaling whether or not you want the reader to skip the remainder of the current segment on error.- Parameters:
exception- CommitLogReadException w/details on exception state- Returns:
- boolean indicating whether to stop reading
- Throws:
IOException- In the event the handler wants forceful termination of all processing, throw IOException.
-
handleUnrecoverableError
void handleUnrecoverableError(CommitLogReadHandler.CommitLogReadException exception) throws IOException In instances where we cannot recover from a specific error and don't care what the reader thinks- Parameters:
exception- CommitLogReadException w/details on exception state- Throws:
IOException
-
handleMutation
Process a deserialized mutation- Parameters:
m- deserialized mutationsize- serialized size of the mutationentryLocation- filePointer offset inside the CommitLogSegment for the end of the recorddesc- CommitLogDescriptor for mutation being processed
-