Class GrpclbState


  • @NotThreadSafe
    final class GrpclbState
    extends java.lang.Object
    The states of a GRPCLB working session of GrpclbLoadBalancer. Created when GrpclbLoadBalancer switches to GRPCLB mode. Closed and discarded when GrpclbLoadBalancer switches away from GRPCLB mode.
    • Method Detail

      • handleAddresses

        void handleAddresses​(java.util.List<EquivalentAddressGroup> newLbAddressGroups,
                             java.util.List<EquivalentAddressGroup> newBackendServers)
        Handle new addresses of the balancer and backends from the resolver, and create connection if not yet connected.
      • requestConnection

        void requestConnection()
      • maybeUseFallbackBackends

        private void maybeUseFallbackBackends()
      • useFallbackBackends

        private void useFallbackBackends()
        Populate backend servers to be used from the fallback backends.
      • shutdownLbComm

        private void shutdownLbComm()
      • shutdownLbRpc

        private void shutdownLbRpc()
      • startLbRpc

        private void startLbRpc()
      • cancelFallbackTimer

        private void cancelFallbackTimer()
      • cancelLbRpcRetryTimer

        private void cancelLbRpcRetryTimer()
      • shutdown

        void shutdown()
      • propagateError

        void propagateError​(Status status)
      • maybeUpdatePicker

        private void maybeUpdatePicker()
        Make and use a picker out of the current lists and the states of subchannels if they have changed since the last picker created.
      • createSubchannelAttrs

        private static Attributes createSubchannelAttrs()