Package io.grpc.internal
Interface ServerTransport
- All Superinterfaces:
InternalInstrumented<InternalChannelz.SocketStats>
,InternalWithLogId
An inbound connection.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an executor for scheduling provided by the transport.void
shutdown()
Initiates an orderly shutdown of the transport.void
shutdownNow
(Status reason) Initiates a forceful shutdown in which preexisting and new calls are closed.Methods inherited from interface io.grpc.InternalInstrumented
getStats
Methods inherited from interface io.grpc.InternalWithLogId
getLogId
-
Method Details
-
shutdown
void shutdown()Initiates an orderly shutdown of the transport. Existing streams continue, but new streams will eventually begin failing. New streams "eventually" begin failing because shutdown may need to be processed on a separate thread. May only be called once. -
shutdownNow
Initiates a forceful shutdown in which preexisting and new calls are closed. Existing calls should be closed with the providedreason
. -
getScheduledExecutorService
ScheduledExecutorService getScheduledExecutorService()Returns an executor for scheduling provided by the transport. The service should be configured to allow cancelled scheduled runnables to be GCed.The executor may not be used after the transport terminates. The caller should ensure any outstanding tasks are cancelled when the transport terminates.
-