public class RequestCallbacks
extends java.lang.Object
RequestCallback
s, or, if said responses
don't arrive in a timely manner (within verb's timeout), to expire the callbacks.
Since we reuse the same request id for multiple messages now, the map is keyed by (id, peer) tuples
rather than just id as it used to before 4.0.Modifier and Type | Class and Description |
---|---|
static class |
RequestCallbacks.CallbackInfo |
Modifier and Type | Method and Description |
---|---|
void |
addWithExpiration(AbstractWriteResponseHandler<?> cb,
Message<?> message,
Replica to,
ConsistencyLevel consistencyLevel,
boolean allowHints) |
static long |
defaultExpirationInterval() |
void |
onDiscardOnClose(Message<?> message,
InetAddressAndPort peer)
A message was not sent because the connection was forcibly closed
|
void |
onExpired(Message<?> message,
InetAddressAndPort peer)
A message was not serialized to a frame because it had expired
|
void |
onFailedSerialize(Message<?> message,
InetAddressAndPort peer,
int messagingVersion,
int bytesWrittenToNetwork,
java.lang.Throwable failure)
A message was not fully or successfully serialized to a frame because an exception was thrown
|
void |
onOverloaded(Message<?> message,
InetAddressAndPort peer)
A message was not enqueued to the link because too many messages are already waiting to send
|
RequestCallbacks.CallbackInfo |
remove(long id,
InetAddressAndPort peer)
Remove and return the
RequestCallbacks.CallbackInfo associated with given id and peer, if known. |
void |
removeAndRespond(long id,
InetAddressAndPort peer,
Message message) |
void |
unsafeClear() |
@Nullable public RequestCallbacks.CallbackInfo remove(long id, InetAddressAndPort peer)
RequestCallbacks.CallbackInfo
associated with given id and peer, if known.public void addWithExpiration(AbstractWriteResponseHandler<?> cb, Message<?> message, Replica to, ConsistencyLevel consistencyLevel, boolean allowHints)
public void removeAndRespond(long id, InetAddressAndPort peer, Message message)
public void unsafeClear()
public void onOverloaded(Message<?> message, InetAddressAndPort peer)
public void onExpired(Message<?> message, InetAddressAndPort peer)
public void onFailedSerialize(Message<?> message, InetAddressAndPort peer, int messagingVersion, int bytesWrittenToNetwork, java.lang.Throwable failure)
public void onDiscardOnClose(Message<?> message, InetAddressAndPort peer)
public static long defaultExpirationInterval()
Copyright © 2009-2022 The Apache Software Foundation