Package io.grpc.netty
Class NettyServerHandler.GracefulShutdown
- java.lang.Object
-
- io.grpc.netty.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.
-
-
-
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
-
-
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)
-
-