Package io.grpc.xds
Class ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState
- java.lang.Object
-
- io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
- io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState
-
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
- Enclosing class:
- ClusterResolverLoadBalancer.ClusterResolverLbState
private final class ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState extends ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState implements XdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
edsServiceName
private java.util.Map<Locality,java.lang.String>
localityPriorityNames
(package private) int
priorityNameGenId
-
Fields inherited from class io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
filterMetadata, lrsServerInfo, maxConcurrentRequests, name, outlierDetection, resolved, result, shutdown, status, tlsContext
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EdsClusterState(java.lang.String name, java.lang.String edsServiceName, Bootstrapper.ServerInfo lrsServerInfo, java.lang.Long maxConcurrentRequests, EnvoyServerProtoData.UpstreamTlsContext tlsContext, java.util.Map<java.lang.String,com.google.protobuf.Struct> filterMetadata, EnvoyServerProtoData.OutlierDetection outlierDetection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List<java.lang.String>
generatePriorityNames(java.lang.String name, java.util.Map<Locality,Endpoints.LocalityLbEndpoints> localityLbEndpoints)
void
onChanged(XdsEndpointResource.EdsUpdate 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.protected void
shutdown()
(package private) void
start()
-
-
-
Field Detail
-
edsServiceName
@Nullable private final java.lang.String edsServiceName
-
localityPriorityNames
private java.util.Map<Locality,java.lang.String> localityPriorityNames
-
priorityNameGenId
int priorityNameGenId
-
-
Constructor Detail
-
EdsClusterState
private EdsClusterState(java.lang.String name, @Nullable java.lang.String edsServiceName, @Nullable Bootstrapper.ServerInfo lrsServerInfo, @Nullable java.lang.Long maxConcurrentRequests, @Nullable EnvoyServerProtoData.UpstreamTlsContext tlsContext, java.util.Map<java.lang.String,com.google.protobuf.Struct> filterMetadata, @Nullable EnvoyServerProtoData.OutlierDetection outlierDetection)
-
-
Method Detail
-
start
void start()
- Specified by:
start
in classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
shutdown
protected void shutdown()
- Overrides:
shutdown
in classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
onChanged
public void onChanged(XdsEndpointResource.EdsUpdate update)
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
-
generatePriorityNames
private java.util.List<java.lang.String> generatePriorityNames(java.lang.String name, java.util.Map<Locality,Endpoints.LocalityLbEndpoints> localityLbEndpoints)
-
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<XdsEndpointResource.EdsUpdate>
- Parameters:
resourceName
- name of the resource requested in discovery request.
-
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<XdsEndpointResource.EdsUpdate>
-
-