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>childClusterStatesprivate booleandiscoveredprivate booleanisLeafprivate java.lang.Stringnameprivate XdsClusterResource.CdsUpdateresultprivate booleanshutdown
-
Constructor Summary
Constructors Modifier Constructor Description privateClusterState(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonChanged(XdsClusterResource.CdsUpdate update)voidonError(io.grpc.Status error)Called when the resource discovery RPC encounters some transient error.voidonResourceDoesNotExist(java.lang.String resourceName)Called when the requested resource is not available.(package private) voidshutdown()private voidstart()
-
-
-
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.ResourceWatcherCalled 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. - KeepStatusdescription in one form or another, as it contains valuable debugging information.- Specified by:
onErrorin interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
onResourceDoesNotExist
public void onResourceDoesNotExist(java.lang.String resourceName)
Description copied from interface:XdsClient.ResourceWatcherCalled when the requested resource is not available.- Specified by:
onResourceDoesNotExistin interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>- Parameters:
resourceName- name of the resource requested in discovery request.
-
onChanged
public void onChanged(XdsClusterResource.CdsUpdate update)
- Specified by:
onChangedin interfaceXdsClient.ResourceWatcher<XdsClusterResource.CdsUpdate>
-
-