Package io.grpc.xds
Class CdsLoadBalancer2.CdsLbState.ClusterState
- java.lang.Object
-
- io.grpc.xds.CdsLoadBalancer2.CdsLbState.ClusterState
-
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
- Enclosing class:
- CdsLoadBalancer2.CdsLbState
private final class CdsLoadBalancer2.CdsLbState.ClusterState extends java.lang.Object implements XdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,CdsLoadBalancer2.CdsLbState.ClusterState>
childClusterStates
private boolean
discovered
private boolean
isLeaf
private java.lang.String
name
private XdsClusterResource.CdsUpdate
result
private boolean
shutdown
-
Constructor Summary
Constructors Modifier Constructor Description private
ClusterState(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onChanged(XdsClusterResource.CdsUpdate update)
void
onError(io.grpc.Status error)
Called when the resource discovery RPC encounters some transient error.void
onResourceDoesNotExist(java.lang.String resourceName)
Called when the requested resource is not available.(package private) void
shutdown()
private void
start()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
childClusterStates
@Nullable private java.util.Map<java.lang.String,CdsLoadBalancer2.CdsLbState.ClusterState> childClusterStates
-
result
@Nullable private XdsClusterResource.CdsUpdate result
-
isLeaf
private boolean isLeaf
-
discovered
private boolean discovered
-
shutdown
private boolean shutdown
-
-
Method Detail
-
start
private void start()
-
shutdown
void shutdown()
-
onError
public void onError(io.grpc.Status error)
Description copied from interface:XdsClient.ResourceWatcher
Called when the resource discovery RPC encounters some transient error.Note that we expect that the implementer to: - Comply with the guarantee to not generate certain statuses by the library: https://grpc.github.io/grpc/core/md_doc_statuscodes.html. If the code needs to be propagated to the channel, override it with
Status.Code.UNAVAILABLE
. - KeepStatus
description in one form or another, as it contains valuable debugging information.- Specified by:
onError
in interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
onResourceDoesNotExist
public void onResourceDoesNotExist(java.lang.String resourceName)
Description copied from interface:XdsClient.ResourceWatcher
Called when the requested resource is not available.- Specified by:
onResourceDoesNotExist
in interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
- Parameters:
resourceName
- name of the resource requested in discovery request.
-
onChanged
public void onChanged(XdsClusterResource.CdsUpdate update)
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
-