CommitLogReadHandler (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.commitlog

## Interface CommitLogReadHandler

- All Known Implementing Classes:
    CommitLogReplayer

      public interface CommitLogReadHandler

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `CommitLogReadHandler.CommitLogReadErrorReason`
    `static class` | `CommitLogReadHandler.CommitLogReadException`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleMutation(Mutation m, int size, int entryLocation, CommitLogDescriptor desc)` Process a deserialized mutation
    `void` | `handleUnrecoverableError(CommitLogReadHandler.CommitLogReadException exception)` In instances where we cannot recover from a specific error and don't care what the reader thinks
    `boolean` | `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 mutation
        `size` - serialized size of the mutation
        `entryLocation` - filePointer offset inside the CommitLogSegment for the record
        `desc` - CommitLogDescriptor for mutation being processed

Copyright © 2018 The Apache Software Foundation