Package io.grpc.internal
Class TransportTracer
java.lang.Object
io.grpc.internal.TransportTracer
A class for gathering statistics about a transport. This is an experimental feature.
Can only be called from the transport thread unless otherwise noted.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static interface
An interface for reading the local and remote flow control windows of the transport.static final class
A container that holds the local and remote flow control window sizes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TransportTracer.Factory
getStats()
Returns a read only set of current stats.void
Reports that a keep alive message was sent.void
Called by the client to report a stream has started.void
Reports that a message was successfully received.void
reportMessageSent
(int numMessages) Reports that some messages were successfully sent.void
Called by the server to report a stream has started.void
reportStreamClosed
(boolean success) Reports that a stream closed with the specified Status.void
setFlowControlWindowReader
(TransportTracer.FlowControlReader flowControlWindowReader) Registers aTransportTracer.FlowControlReader
that can be used to read the local and remote flow control window sizes.
-
Constructor Details
-
TransportTracer
public TransportTracer()
-
-
Method Details
-
getStats
Returns a read only set of current stats. -
reportLocalStreamStarted
public void reportLocalStreamStarted()Called by the client to report a stream has started. -
reportRemoteStreamStarted
public void reportRemoteStreamStarted()Called by the server to report a stream has started. -
reportStreamClosed
public void reportStreamClosed(boolean success) Reports that a stream closed with the specified Status. -
reportMessageSent
public void reportMessageSent(int numMessages) Reports that some messages were successfully sent.numMessages
must be at least 0. -
reportMessageReceived
public void reportMessageReceived()Reports that a message was successfully received. This method is thread safe. -
reportKeepAliveSent
public void reportKeepAliveSent()Reports that a keep alive message was sent. -
setFlowControlWindowReader
Registers aTransportTracer.FlowControlReader
that can be used to read the local and remote flow control window sizes. -
getDefaultFactory
-