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 Object
implements XdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private final String
private XdsClusterResource.CdsUpdate
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
onError
(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.void
onResourceDoesNotExist
(String resourceName) Called when the requested resource is not available.(package private) void
shutdown()
private void
start()
-
Field Details
-
name
-
childClusterStates
-
result
-
isLeaf
private boolean isLeaf -
discovered
private boolean discovered -
shutdown
private boolean shutdown
-
-
Constructor Details
-
ClusterState
-
-
Method Details
-
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
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
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-