Class GrpclbClientLoadRecorder


  • @ThreadSafe
    final class GrpclbClientLoadRecorder
    extends ClientStreamTracer.Factory
    Record and aggregate client-side load data for GRPCLB. This records load occurred during the span of an LB stream with the remote load-balancer.
    • Field Detail

      • callsStartedUpdater

        private static final java.util.concurrent.atomic.AtomicLongFieldUpdater<GrpclbClientLoadRecorder> callsStartedUpdater
      • callsFinishedUpdater

        private static final java.util.concurrent.atomic.AtomicLongFieldUpdater<GrpclbClientLoadRecorder> callsFinishedUpdater
      • callsFailedToSendUpdater

        private static final java.util.concurrent.atomic.AtomicLongFieldUpdater<GrpclbClientLoadRecorder> callsFailedToSendUpdater
      • callsFinishedKnownReceivedUpdater

        private static final java.util.concurrent.atomic.AtomicLongFieldUpdater<GrpclbClientLoadRecorder> callsFinishedKnownReceivedUpdater
      • callsStarted

        private volatile long callsStarted
      • callsFinished

        private volatile long callsFinished
      • callsFailedToSend

        private volatile long callsFailedToSend
      • callsFinishedKnownReceived

        private volatile long callsFinishedKnownReceived
    • Constructor Detail

      • GrpclbClientLoadRecorder

        GrpclbClientLoadRecorder​(TimeProvider time)
    • Method Detail

      • recordDroppedRequest

        void recordDroppedRequest​(java.lang.String token)
        Records that a request has been dropped as instructed by the remote balancer.
      • generateLoadReport

        ClientStats generateLoadReport()
        Generate the report with the data recorded this LB stream since the last report.