Interface CommitLogReadHandler

  • All Known Implementing Classes:
    CommitLogReplayer

    public interface CommitLogReadHandler
    • 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 mutation
        size - serialized size of the mutation
        entryLocation - filePointer offset inside the CommitLogSegment for the end of the record
        desc - CommitLogDescriptor for mutation being processed