public class AsyncInboundResponseHandler extends Object implements PacketHandler, MetricsProvider
AsyncInboundResponseHandler
is a PacketHandler that asynchronously process operation-response packets. The
actual processing is done by the InboundResponseHandler
.
So when a response is received from a remote system, it is put in the responseQueue of the ResponseThread.
Then the ResponseThread takes it from this responseQueue and calls the PacketHandler
for the
actual processing.
The reason that the IO thread doesn't immediately deals with the response is that deserializing the
Response
and let the invocation-future
deal with the response can be rather expensive.Modifier and Type | Field and Description |
---|---|
static HazelcastProperty |
IDLE_STRATEGY |
Modifier and Type | Method and Description |
---|---|
static IdleStrategy |
getIdleStrategy(HazelcastProperties properties,
HazelcastProperty property) |
int |
getQueueSize() |
void |
handle(Packet packet)
Signals the PacketHandler that there is a packet to be handled.
|
void |
provideMetrics(MetricsRegistry registry) |
void |
shutdown() |
void |
start() |
public static final HazelcastProperty IDLE_STRATEGY
public int getQueueSize()
public void handle(Packet packet)
PacketHandler
handle
in interface PacketHandler
packet
- the response packet to handlepublic void provideMetrics(MetricsRegistry registry)
provideMetrics
in interface MetricsProvider
public void start()
public void shutdown()
public static IdleStrategy getIdleStrategy(HazelcastProperties properties, HazelcastProperty property)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.