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.StringedsServiceNameprivate java.util.Map<Locality,java.lang.String>localityPriorityNames(package private) intpriorityNameGenId-
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 privateEdsClusterState(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)voidonChanged(XdsEndpointResource.EdsUpdate 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.protected voidshutdown()(package private) voidstart()
-
-
-
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:
startin classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
shutdown
protected void shutdown()
- Overrides:
shutdownin classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
onChanged
public void onChanged(XdsEndpointResource.EdsUpdate update)
- Specified by:
onChangedin 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.ResourceWatcherCalled when the requested resource is not available.- Specified by:
onResourceDoesNotExistin 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.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<XdsEndpointResource.EdsUpdate>
-
-