Package io.grpc.xds
Class CdsLoadBalancer2.CdsLbState
java.lang.Object
io.grpc.xds.CdsLoadBalancer2.CdsLbState
- Enclosing class:
CdsLoadBalancer2
The state of a CDS working session of
CdsLoadBalancer2
. Created and started when
receiving the CDS LB policy config with the top-level cluster name.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.grpc.LoadBalancer
private final Map
<String, CdsLoadBalancer2.CdsLbState.ClusterState> private final CdsLoadBalancer2.CdsLbState.ClusterState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAncestors
(Set<String> ancestors, CdsLoadBalancer2.CdsLbState.ClusterState clusterState, Map<CdsLoadBalancer2.CdsLbState.ClusterState, List<CdsLoadBalancer2.CdsLbState.ClusterState>> parentClusters) Recursively add all parents to the ancestors list.private void
private void
handleClusterDiscoveryError
(io.grpc.Status error) identifyLoops
(CdsLoadBalancer2.CdsLbState.ClusterState clusterState, Map<CdsLoadBalancer2.CdsLbState.ClusterState, List<CdsLoadBalancer2.CdsLbState.ClusterState>> parentClusters) Returns children that would cause loops and builds up the parentClusters map.private void
shutdown()
private void
start()
-
Field Details
-
root
-
clusterStates
-
childLb
private io.grpc.LoadBalancer childLb
-
-
Constructor Details
-
CdsLbState
-
-
Method Details
-
start
private void start() -
shutdown
private void shutdown() -
handleClusterDiscovered
private void handleClusterDiscovered() -
identifyLoops
private List<String> identifyLoops(CdsLoadBalancer2.CdsLbState.ClusterState clusterState, Map<CdsLoadBalancer2.CdsLbState.ClusterState, List<CdsLoadBalancer2.CdsLbState.ClusterState>> parentClusters) Returns children that would cause loops and builds up the parentClusters map. -
addAncestors
private void addAncestors(Set<String> ancestors, CdsLoadBalancer2.CdsLbState.ClusterState clusterState, Map<CdsLoadBalancer2.CdsLbState.ClusterState, List<CdsLoadBalancer2.CdsLbState.ClusterState>> parentClusters) Recursively add all parents to the ancestors list. -
handleClusterDiscoveryError
private void handleClusterDiscoveryError(io.grpc.Status error)
-