Package org.apache.cassandra.net
Class AsyncOneResponse<T>
java.lang.Object
org.apache.cassandra.utils.concurrent.AbstractFuture<V>
org.apache.cassandra.utils.concurrent.AsyncFuture<V>
org.apache.cassandra.utils.concurrent.AsyncPromise<T>
org.apache.cassandra.net.AsyncOneResponse<T>
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<T>,io.netty.util.concurrent.Future<T>,io.netty.util.concurrent.Promise<T>,Future<T>,RequestCallback<T>,Awaitable,Future<T>,Promise<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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.utils.concurrent.AsyncPromise
AsyncPromise.WithExecutor<V>Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable -
Field Summary
Fields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AsyncOneResponse<T>immediate(T value) voidonResponse(Message<T> response) Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncPromise
addCallback, addCallback, addCallback, addListener, addListeners, await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, isUncancellable, removeListener, removeListeners, setFailure, setSuccess, setUncancellable, setUncancellableExclusive, sync, syncUninterruptibly, tryFailure, trySuccess, uncancellable, uncancellable, uncancellable, withExecutorMethods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
awaitUntil, flatMap, mapMethods inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
addCallback, addCallback, addCallback, addListener, addListener, await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly, cancel, cause, description, flatMap, get, get, getNow, getWhenDone, isCancellable, isCancelled, isDone, isSuccess, map, map, notifyExecutor, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUntil, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptiblyMethods inherited from interface io.netty.util.concurrent.Future
await, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccessMethods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDoneMethods inherited from interface org.apache.cassandra.utils.concurrent.Future
addCallback, addCallback, addCallback, addListener, addListener, await, awaitUninterruptibly, flatMap, flatMap, map, map, notifyExecutor, rethrowIfFailed, syncThrowUncheckedOnInterruptMethods inherited from interface org.apache.cassandra.net.RequestCallback
invokeOnFailure, onFailure, trackLatencyForSnitch
-
Constructor Details
-
AsyncOneResponse
public AsyncOneResponse()
-
-
Method Details
-
onResponse
- Specified by:
onResponsein interfaceRequestCallback<T>- Parameters:
response- response received.
-
immediate
-