Package io.grpc.xds.client
Class LoadReportClient.LrsStream
java.lang.Object
io.grpc.xds.client.LoadReportClient.LrsStream
- All Implemented Interfaces:
XdsTransportFactory.EventHandler<LoadStatsResponse>
- Enclosing class:
LoadReportClient
private final class LoadReportClient.LrsStream
extends Object
implements XdsTransportFactory.EventHandler<LoadStatsResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final XdsTransportFactory.StreamingCall
<LoadStatsRequest, LoadStatsResponse> (package private) boolean
(package private) boolean
(package private) long
(package private) io.grpc.SynchronizationContext.ScheduledHandle
(package private) boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ClusterStats
private void
cleanUp()
private void
(package private) void
handleRpcResponse
(List<String> clusters, boolean sendAllClusters, long loadReportIntervalNano) private void
handleStreamClosed
(io.grpc.Status status) void
onReady()
Called when the stream is ready to send additional messages.void
onRecvMessage
(LoadStatsResponse response) Called when a message is received on the stream.void
onStatusReceived
(io.grpc.Status status) Called when status is received on the stream.private void
private void
(package private) void
sendLoadStatsRequest
(List<Stats.ClusterStats> clusterStatsList)
-
Field Details
-
initialResponseReceived
boolean initialResponseReceived -
closed
boolean closed -
intervalNano
long intervalNano -
reportAllClusters
boolean reportAllClusters -
clusterNames
-
loadReportTimer
io.grpc.SynchronizationContext.ScheduledHandle loadReportTimer -
call
-
-
Constructor Details
-
LrsStream
LrsStream()
-
-
Method Details
-
onReady
public void onReady()Description copied from interface:XdsTransportFactory.EventHandler
Called when the stream is ready to send additional messages. If called the library use this handler to trigger resource arrival timeout, also seeXdsTransportFactory.StreamingCall.isReady()
. Application is free to ignore it.- Specified by:
onReady
in interfaceXdsTransportFactory.EventHandler<LoadStatsResponse>
-
onRecvMessage
Description copied from interface:XdsTransportFactory.EventHandler
Called when a message is received on the stream.- Specified by:
onRecvMessage
in interfaceXdsTransportFactory.EventHandler<LoadStatsResponse>
-
onStatusReceived
public void onStatusReceived(io.grpc.Status status) Description copied from interface:XdsTransportFactory.EventHandler
Called when status is received on the stream.- Specified by:
onStatusReceived
in interfaceXdsTransportFactory.EventHandler<LoadStatsResponse>
-
sendLoadStatsRequest
-
handleRpcResponse
-
sendLoadReport
private void sendLoadReport() -
scheduleNextLoadReport
private void scheduleNextLoadReport() -
handleStreamClosed
private void handleStreamClosed(io.grpc.Status status) -
close
-
cleanUp
private void cleanUp() -
buildClusterStats
-