org.apache.cassandra.net

## Class AsyncOneResponse<T>

- java.lang.Object
- - org.apache.cassandra.net.AsyncOneResponse<T>

All Implemented Interfaces:
  IAsyncCallback<T>

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

A callback specialized for returning a value from a single target; that is, this is for messages that we only send to one recipient.

### Field Summary

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

`isAlive`

### Constructor Summary

Constructors
Constructor and Description
`AsyncOneResponse()`

### Method Summary

All Methods Instance Methods Concrete Methods
`T` `get(long timeout, java.util.concurrent.TimeUnit tu)`
`boolean` `isLatencyForSnitch()`
`void` `response(MessageIn<T> response)`

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

`supportsBackPressure`

### Constructor Detail

#### AsyncOneResponse

    public AsyncOneResponse()

### Method Detail

#### get

    public T get(long timeout,
                 java.util.concurrent.TimeUnit tu)
          throws java.util.concurrent.TimeoutException

Throws:
  `java.util.concurrent.TimeoutException`

#### response

    public void response(MessageIn<T> response)

Specified by:
  `response` in interface `IAsyncCallback<T>`
Parameters:
  `response` - response received.

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