org.apache.cassandra.service

## Class ResponseResolver

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

- Direct Known Subclasses:
    DataResolver, DigestResolver

      public abstract class ResponseResolver
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ReadCommand` | `command`
    `protected ConsistencyLevel` | `consistency`
    `protected Keyspace` | `keyspace`
    `protected static org.slf4j.Logger` | `logger`
    `protected Accumulator<MessageIn<ReadResponse>>` | `responses`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `compareResponses()` Compares received responses, potentially triggering a digest mismatch (for a digest resolver) and read-repairs (for a data resolver).
    `abstract PartitionIterator` | `getData()`
    `java.lang.Iterable<MessageIn<ReadResponse>>` | `getMessages()`
    `abstract boolean` | `isDataPresent()`
    `void` | `preprocess(MessageIn<ReadResponse> message)`
    `abstract PartitionIterator` | `resolve()`

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

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

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

    - #### keyspace

          protected final Keyspace keyspace

    - #### command

          protected final ReadCommand command

    - #### consistency

          protected final ConsistencyLevel consistency

    - #### responses

          protected final Accumulator<MessageIn<ReadResponse>> responses

  - ### Constructor Detail

    - #### ResponseResolver

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

  - ### Method Detail

    - #### getData

          public abstract PartitionIterator getData()

    - #### resolve

          public abstract PartitionIterator resolve()
                                             throws DigestMismatchException

      Throws:
        `DigestMismatchException`

    - #### compareResponses

          public abstract void compareResponses()
                                         throws DigestMismatchException

      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 `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.

      Throws:
        `DigestMismatchException` - if it's a digest resolver and the responses don't match.

    - #### isDataPresent

          public abstract boolean isDataPresent()

    - #### preprocess

          public void preprocess(MessageIn<ReadResponse> message)

    - #### getMessages

          public java.lang.Iterable<MessageIn<ReadResponse>> getMessages()

Copyright © 2018 The Apache Software Foundation