org.apache.cassandra.service

## Class DigestResolver

- java.lang.Object
- - org.apache.cassandra.service.ResponseResolver
  - - org.apache.cassandra.service.DigestResolver

-     public class DigestResolver
      extends ResponseResolver

- - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.service.ResponseResolver

      `command, consistency, keyspace, logger, responses`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DigestResolver(Keyspace keyspace, ReadCommand command, ConsistencyLevel consistency, int maxResponseCount)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `compareResponses()` Compares received responses, potentially triggering a digest mismatch (for a digest resolver) and read-repairs (for a data resolver).
    `PartitionIterator` | `getData()` Special case of resolve() so that CL.ONE reads never throw DigestMismatchException in the foreground
    `boolean` | `isDataPresent()`
    `void` | `preprocess(MessageIn<ReadResponse> message)`
    `PartitionIterator` | `resolve()`

    - ### Methods inherited from class org.apache.cassandra.service.ResponseResolver

      `getMessages`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DigestResolver

          public DigestResolver(Keyspace keyspace,
                                ReadCommand command,
                                ConsistencyLevel consistency,
                                int maxResponseCount)

  - ### Method Detail

    - #### preprocess

          public void preprocess(MessageIn<ReadResponse> message)

      Overrides:
        `preprocess` in class `ResponseResolver`

    - #### getData

          public PartitionIterator getData()

      Special case of resolve() so that CL.ONE reads never throw DigestMismatchException in the foreground
      Specified by:
        `getData` in class `ResponseResolver`

    - #### resolve

          public PartitionIterator resolve()
                                    throws DigestMismatchException

      Specified by:
        `resolve` in class `ResponseResolver`
      Throws:
        `DigestMismatchException`

    - #### compareResponses

          public void compareResponses()
                                throws DigestMismatchException

      Description copied from class: `ResponseResolver`
      Compares received responses, potentially triggering a digest mismatch (for a digest resolver) and read-repairs (for a data resolver).

      This is functionally equivalent to calling `ResponseResolver.resolve()` and consuming the result, but can be slightly more efficient in some case due to the fact that we don't care about the result itself. This is used when doing asynchronous read-repairs.

      Specified by:
        `compareResponses` in class `ResponseResolver`
      Throws:
        `DigestMismatchException` - if it's a digest resolver and the responses don't match.

    - #### isDataPresent

          public boolean isDataPresent()

      Specified by:
        `isDataPresent` in class `ResponseResolver`

Copyright © 2018 The Apache Software Foundation