public final class ChunkedPipelineConnection.ResponseHandler extends Object implements Runnable, Connection.Listener
Runnable
.
TODD: Needs to have a more regulated operating cycle. Right now its just infinite loop until something goes boom. Not good.
Constructor and Description |
---|
ResponseHandler()
Adds self to the listeners of the enclosing
Connection instance. |
Modifier and Type | Method and Description |
---|---|
void |
onEvent(Connection.Event event) |
void |
run()
Keeps processing the
PendingRequest s in the pending Queue
until a QUIT is encountered in the pending queue. |
public ResponseHandler()
Connection
instance.public void run()
PendingRequest
s in the pending Queue
until a QUIT is encountered in the pending queue. Thread will stop after
processing the QUIT response (which is expected to be a VirtualResponse
.
TODO: not entirely clear what is the best way to handle exceptions.
TODO: socket Reconnect in the context of pipelining is non-trivial, and maybe not even practically possible. (e.g. request n is sent but pipe breaks on some m (m!=n) response. non trivial. Perhaps its best to assume broken connection means faulted server, specially given the fact that a pipeline has a heartbeat so the issue can not be timeout.
public void onEvent(Connection.Event event)
onEvent
in interface Connection.Listener
Connection.Listener.onEvent(org.jredis.connector.Connection.Event)
Copyright © 2009–2017. All rights reserved.