shutdownGracefully
Gracefully shuts down this gRPC Server, waiting up to maxWaitTime for in-flight RPCs to complete.
Extension function on Server. Delegates to shutdownGracefully with millisecond conversion.
Parameters
the maximum duration to wait before forcing shutdown
Throws
if the current thread is interrupted while waiting
Gracefully shuts down this gRPC Server, waiting up to the specified timeout for termination.
Extension function on Server. Calls Server.shutdown, then Server.awaitTermination, with Server.shutdownNow in a finally block so the server is stopped however those calls end. On a server that has already terminated, Server.shutdown simply returns, so calling this again is harmless.
Parameters
the maximum time to wait for graceful termination
the time unit of the timeout argument
Throws
if the current thread is interrupted while waiting