Package io.grpc.internal
Class KeepAliveEnforcer
java.lang.Object
io.grpc.internal.KeepAliveEnforcer
Monitors the client's PING usage to make sure the rate is permitted.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
There are outstanding RPCs on the transport.void
There are no outstanding RPCs on the transport.boolean
Returnsfalse
when client is misbehaving and should be disconnected.void
Reset any counters because PINGs are allowed in response to something sent.
-
Field Details
-
MAX_PING_STRIKES
public static final int MAX_PING_STRIKES- See Also:
-
IMPLICIT_PERMIT_TIME_NANOS
public static final long IMPLICIT_PERMIT_TIME_NANOS
-
-
Constructor Details
-
KeepAliveEnforcer
-
-
Method Details
-
pingAcceptable
@CheckReturnValue public boolean pingAcceptable()Returnsfalse
when client is misbehaving and should be disconnected. -
resetCounters
public void resetCounters()Reset any counters because PINGs are allowed in response to something sent. Typically called when sending HEADERS and DATA frames. -
onTransportActive
public void onTransportActive()There are outstanding RPCs on the transport. -
onTransportIdle
public void onTransportIdle()There are no outstanding RPCs on the transport.
-