Class LeaderRetrievalHandler<T extends RestfulGateway>

  • Type Parameters:
    T - type of the leader to retrieve
    All Implemented Interfaces:
    org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler, org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler
    Direct Known Subclasses:
    AbstractHandler, StaticFileServerHandler

    @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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler

        org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void channelRead0​(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, RoutedRequest routedRequest)  
      protected Duration getTimeout()  
      protected abstract void respondAsLeader​(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, RoutedRequest request, T gateway)  
      • Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead
      • Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Constructor Detail

    • Method Detail

      • getTimeout

        protected Duration getTimeout()
      • channelRead0

        protected void channelRead0​(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
                                    RoutedRequest routedRequest)
        Specified by:
        channelRead0 in class org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<RoutedRequest>
      • respondAsLeader

        protected abstract void respondAsLeader​(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
                                                RoutedRequest request,
                                                T gateway)
                                         throws Exception
        Throws:
        Exception