Interface CommitLogReadHandler
-
- All Known Implementing Classes:
CommitLogReplayer
public interface CommitLogReadHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommitLogReadHandler.CommitLogReadErrorReason
static class
CommitLogReadHandler.CommitLogReadException
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleMutation(Mutation m, int size, int entryLocation, CommitLogDescriptor desc)
Process a deserialized mutationvoid
handleUnrecoverableError(CommitLogReadHandler.CommitLogReadException exception)
In instances where we cannot recover from a specific error and don't care what the reader thinksboolean
shouldSkipSegmentOnError(CommitLogReadHandler.CommitLogReadException exception)
Handle an error during segment read, signaling whether or not you want the reader to skip the remainder of the current segment on error.
-
-
-
Method Detail
-
shouldSkipSegmentOnError
boolean shouldSkipSegmentOnError(CommitLogReadHandler.CommitLogReadException exception) throws java.io.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:
java.io.IOException
- In the event the handler wants forceful termination of all processing, throw IOException.
-
handleUnrecoverableError
void handleUnrecoverableError(CommitLogReadHandler.CommitLogReadException exception) throws java.io.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:
java.io.IOException
-
handleMutation
void handleMutation(Mutation m, int size, int entryLocation, CommitLogDescriptor desc)
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
-
-