T - type of the leader to retrieve@ChannelHandler.Sharable public abstract class LeaderRetrievalHandler<T extends RestfulGateway> extends org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<RoutedRequest>
SimpleChannelInboundHandler which encapsulates the leader retrieval logic for the
REST endpoints.| Modifier and Type | Field and Description |
|---|---|
protected GatewayRetriever<? extends T> |
leaderRetriever |
protected org.slf4j.Logger |
logger |
protected Map<String,String> |
responseHeaders |
protected org.apache.flink.api.common.time.Time |
timeout |
| Modifier | Constructor and Description |
|---|---|
protected |
LeaderRetrievalHandler(GatewayRetriever<? extends T> leaderRetriever,
org.apache.flink.api.common.time.Time timeout,
Map<String,String> responseHeaders) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
RoutedRequest routedRequest) |
protected abstract void |
respondAsLeader(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
RoutedRequest request,
T gateway) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final org.slf4j.Logger logger
protected final GatewayRetriever<? extends T extends RestfulGateway> leaderRetriever
protected final org.apache.flink.api.common.time.Time timeout
protected void channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
RoutedRequest routedRequest)
channelRead0 in class org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<RoutedRequest>protected abstract void respondAsLeader(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
RoutedRequest request,
T gateway)
throws Exception
ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.