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 booleanprivate final Stringprivate com.google.common.collect.ImmutableList<VirtualHost> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidvoidonError(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.voidonResourceDoesNotExist(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:
onChangedin interfaceXdsClient.ResourceWatcher<XdsRouteConfigureResource.RdsUpdate>
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcherCalled when the requested resource is not available.- Specified by:
onResourceDoesNotExistin 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.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<XdsRouteConfigureResource.RdsUpdate>
-
updateRdsRoutingConfig
private void updateRdsRoutingConfig() -
maybeUpdateSelector
private void maybeUpdateSelector()
-