@Stability.Internal public class ErrorMapLoadingHandler extends com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandler
We are trying to grab a KV error map from kv_engine, but if the server does not respond with a successful message and the configuration we keep moving on without it. The client has reasonable defaults in place and can operate without it. Note that there will still be a warning event generated if this is the case, since it is definitely not expected.
Constructor and Description |
---|
ErrorMapLoadingHandler(EndpointContext endpointContext)
Creates a new
ErrorMapLoadingHandler . |
Modifier and Type | Method and Description |
---|---|
void |
channelActive(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
connect(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise)
Intercepts the connect process inside the pipeline to only propagate either
success or failure if the error map loading process is completed either way.
|
bind, close, deregister, disconnect, flush, read, write
channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public ErrorMapLoadingHandler(EndpointContext endpointContext)
ErrorMapLoadingHandler
.endpointContext
- the core context used to refer to values like the core id.public void connect(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise)
connect
in interface com.couchbase.client.core.deps.io.netty.channel.ChannelOutboundHandler
connect
in class com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandler
ctx
- the ChannelHandlerContext
for which the connect operation is made.remoteAddress
- the SocketAddress
to which it should connect.localAddress
- the SocketAddress
which is used as source on connect.promise
- the ChannelPromise
to notify once the operation completes.public void channelActive(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx)
channelActive
in interface com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandler
channelActive
in class com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerAdapter
public void channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx, Object msg)
channelRead
in interface com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandler
channelRead
in class com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerAdapter
Copyright © 2020 Couchbase, Inc.. All rights reserved.