Package io.grpc.xds
Class XdsServerWrapper.DiscoveryState.RouteDiscoveryState
java.lang.Object
io.grpc.xds.XdsServerWrapper.DiscoveryState.RouteDiscoveryState
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
- Enclosing class:
XdsServerWrapper.DiscoveryState
private final class XdsServerWrapper.DiscoveryState.RouteDiscoveryState
extends Object
implements XdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private final String
private com.google.common.collect.ImmutableList
<VirtualHost> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
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.private void
-
Field Details
-
resourceName
-
savedVirtualHosts
-
isPending
private boolean isPending
-
-
Constructor Details
-
RouteDiscoveryState
-
-
Method Details
-
onChanged
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcher
Called when the requested resource is not available.- Specified by:
onResourceDoesNotExist
in interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
- 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<XdsRouteConfigureResource.RdsUpdate>
-
updateRdsRoutingConfig
private void updateRdsRoutingConfig() -
maybeUpdateSelector
private void maybeUpdateSelector()
-