public class GridRedisNioListener extends GridNioServerListenerAdapter<GridRedisMessage>
| Modifier and Type | Field and Description |
|---|---|
static int |
CONN_CTX_META_KEY
Connection-related metadata key.
|
protected Map<GridRedisCommand,GridRedisCommandHandler> |
handlers
Redis-specific handlers.
|
| Constructor and Description |
|---|
GridRedisNioListener(IgniteLogger log,
GridRestProtocolHandler hnd,
GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
onConnected(GridNioSession ses)
This method is called whenever a new client is connected and session is created.
|
void |
onDisconnected(GridNioSession ses,
@Nullable Exception e)
This method is called whenever client is disconnected due to correct connection close
or due to
IOException during network operations. |
void |
onMessage(GridNioSession ses,
GridRedisMessage msg)
This method is called whenever a
GridNioParser returns non-null value. |
onFailure, onMessageSent, onSessionIdleTimeout, onSessionWriteTimeoutprotected final Map<GridRedisCommand,GridRedisCommandHandler> handlers
public static final int CONN_CTX_META_KEY
public GridRedisNioListener(IgniteLogger log, GridRestProtocolHandler hnd, GridKernalContext ctx)
log - Logger.hnd - REST protocol handler.ctx - Context.public void onConnected(GridNioSession ses)
ses - Newly created session for remote client.public void onDisconnected(GridNioSession ses, @Nullable @Nullable Exception e)
IOException during network operations.ses - Closed session.e - Exception occurred, if any.public void onMessage(GridNioSession ses, GridRedisMessage msg)
GridNioParser returns non-null value.ses - Session on which message was received.msg - Parsed message.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020