Class KeepAliveManager

java.lang.Object
io.grpc.internal.KeepAliveManager

public class KeepAliveManager extends Object
Manages keepalive pings.
  • Constructor Details

  • Method Details

    • onTransportStarted

      public void onTransportStarted()
      Start keepalive monitoring.
    • onDataReceived

      public void onDataReceived()
      Transport has received some data so that we can delay sending keepalives.
    • onTransportActive

      public void onTransportActive()
      Transport has active streams. Start sending keepalives if necessary.
    • onTransportIdle

      public void onTransportIdle()
      Transport has finished all streams.
    • onTransportTermination

      public void onTransportTermination()
      Transport is being terminated. We no longer need to do keepalives.
    • clampKeepAliveTimeInNanos

      public static long clampKeepAliveTimeInNanos(long keepAliveTimeInNanos)
      Bumps keepalive time to 10 seconds if the specified value was smaller than that.
    • clampKeepAliveTimeoutInNanos

      public static long clampKeepAliveTimeoutInNanos(long keepAliveTimeoutInNanos)
      Bumps keepalive timeout to 10 milliseconds if the specified value was smaller than that.