Class MaxConnectionIdleManager
java.lang.Object
io.grpc.internal.MaxConnectionIdleManager
Monitors connection idle time; shutdowns the connection if the max connection idle is reached.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMaxConnectionIdleManager(long maxConnectionIdleInNanos) MaxConnectionIdleManager(long maxConnectionIdleInNanos, MaxConnectionIdleManager.Ticker ticker) -
Method Summary
Modifier and TypeMethodDescriptionvoidThere are outstanding RPCs on the transport.voidThere are no outstanding RPCs on the transport.voidTransport is being terminated.voidstart(Runnable closeJob, ScheduledExecutorService scheduler) Start the initial scheduled shutdown given the transport status reaches max connection idle.
-
Constructor Details
-
MaxConnectionIdleManager
public MaxConnectionIdleManager(long maxConnectionIdleInNanos) -
MaxConnectionIdleManager
public MaxConnectionIdleManager(long maxConnectionIdleInNanos, MaxConnectionIdleManager.Ticker ticker)
-
-
Method Details
-
start
Start the initial scheduled shutdown given the transport status reaches max connection idle.- Parameters:
closeJob- Closes the connection by sending GO_AWAY with status code NO_ERROR and ASCII debug data max_idle and then doing the graceful connection termination.
-
onTransportActive
public void onTransportActive()There are outstanding RPCs on the transport. -
onTransportIdle
public void onTransportIdle()There are no outstanding RPCs on the transport. -
onTransportTermination
public void onTransportTermination()Transport is being terminated.
-