AbstractPaxosCallback (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.service.paxos

## Class AbstractPaxosCallback<T>

- java.lang.Object
- - org.apache.cassandra.service.paxos.AbstractPaxosCallback<T>

- All Implemented Interfaces:
    IAsyncCallback<T>
  Direct Known Subclasses:
    PrepareCallback, ProposeCallback

      public abstract class AbstractPaxosCallback<T>
      extends java.lang.Object
      implements IAsyncCallback<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.concurrent.CountDownLatch` | `latch`
    `protected int` | `targets`

    - ### Fields inherited from interface org.apache.cassandra.net.IAsyncCallback

      `isAlive`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractPaxosCallback(int targets, ConsistencyLevel consistency)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `await()`
    `int` | `getResponseCount()`
    `boolean` | `isLatencyForSnitch()`

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

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

    - ### Methods inherited from interface org.apache.cassandra.net.IAsyncCallback

      `response`

- - ### Field Detail

    - #### latch

          protected final java.util.concurrent.CountDownLatch latch

    - #### targets

          protected final int targets

  - ### Constructor Detail

    - #### AbstractPaxosCallback

          public AbstractPaxosCallback(int targets,
                               ConsistencyLevel consistency)

  - ### Method Detail

    - #### isLatencyForSnitch

          public boolean isLatencyForSnitch()

      Specified by:
        `isLatencyForSnitch` in interface `IAsyncCallback<T>`
      Returns:
        true if this callback is on the read path and its latency should be given as input to the dynamic snitch.

    - #### getResponseCount

          public int getResponseCount()

    - #### await

          public void await()
                     throws WriteTimeoutException

      Throws:
        `WriteTimeoutException`

Copyright © 2014 The Apache Software Foundation