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

org.apache.cassandra.net

## Interface IAsyncCallback<T>

- All Known Subinterfaces:
    IAsyncCallbackWithFailure<T>
  All Known Implementing Classes:
    AbstractPaxosCallback, AbstractWriteResponseHandler, AsyncOneResponse, AsyncRepairCallback, DatacenterSyncWriteResponseHandler, DatacenterWriteResponseHandler, PrepareCallback, ProposeCallback, ReadCallback, TruncateResponseHandler, WriteResponseHandler

      public interface IAsyncCallback<T>

  implementors of IAsyncCallback need to make sure that any public methods are threadsafe with respect to response() being called from the message service. In particular, if any shared state is referenced, making response alone synchronized will not suffice.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static com.google.common.base.Predicate<java.net.InetAddress>` | `isAlive`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isLatencyForSnitch()`
    `void` | `response(MessageIn<T> msg)`

- - ### Field Detail

    - #### isAlive

          static final com.google.common.base.Predicate<java.net.InetAddress> isAlive

  - ### Method Detail

    - #### response

          void response(MessageIn<T> msg)

      Parameters:
        `msg` - response received.

    - #### isLatencyForSnitch

          boolean isLatencyForSnitch()

      Returns:
        true if this callback is on the read path and its latency should be given as input to the dynamic snitch.

Copyright © 2014 The Apache Software Foundation