Package io.grpc.netty

Class NettyServerHandler.GracefulShutdown

  • Enclosing class:
    NettyServerHandler

    private final class NettyServerHandler.GracefulShutdown
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String goAwayMessage  
      (package private) java.lang.Long graceTimeInNanos
      The grace time between starting graceful shutdown and closing the netty channel, null is unspecified.
      (package private) boolean pingAckedOrTimeout
      True if ping is Acked or ping is timeout.
      (package private) java.util.concurrent.Future<?> pingFuture  
    • Constructor Summary

      Constructors 
      Constructor Description
      GracefulShutdown​(java.lang.String goAwayMessage, java.lang.Long graceTimeInNanos)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private long graceTimeOverrideMillis​(long originalMillis)  
      (package private) void secondGoAwayAndClose​(io.netty.channel.ChannelHandlerContext ctx)  
      (package private) void start​(io.netty.channel.ChannelHandlerContext ctx)
      Sends out first GOAWAY and ping, and schedules second GOAWAY and close.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • goAwayMessage

        java.lang.String goAwayMessage
      • graceTimeInNanos

        @CheckForNull
        java.lang.Long graceTimeInNanos
        The grace time between starting graceful shutdown and closing the netty channel, null is unspecified.
      • pingAckedOrTimeout

        boolean pingAckedOrTimeout
        True if ping is Acked or ping is timeout.
      • pingFuture

        java.util.concurrent.Future<?> pingFuture
    • Constructor Detail

      • GracefulShutdown

        GracefulShutdown​(java.lang.String goAwayMessage,
                         @Nullable
                         java.lang.Long graceTimeInNanos)
    • Method Detail

      • start

        void start​(io.netty.channel.ChannelHandlerContext ctx)
        Sends out first GOAWAY and ping, and schedules second GOAWAY and close.
      • secondGoAwayAndClose

        void secondGoAwayAndClose​(io.netty.channel.ChannelHandlerContext ctx)
      • graceTimeOverrideMillis

        private long graceTimeOverrideMillis​(long originalMillis)