org.apache.cassandra.net

## Interface IAsyncCallback<T>

- All Known Subinterfaces:
    IAsyncCallbackWithFailure<T>
  All Known Implementing Classes:
    AbstractPaxosCallback, AbstractWriteResponseHandler, AnticompactionTask.AnticompactionCallback, AsyncOneResponse, AsyncRepairCallback, BatchlogResponseHandler, 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

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isLatencyForSnitch()`
    `void` | `response(MessageIn<T> msg)`
    `default boolean` | `supportsBackPressure()`

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

    - #### supportsBackPressure

          default boolean supportsBackPressure()

Copyright © 2018 The Apache Software Foundation