Rename AbstractXdsClient to ControlPlaneClient (#9934)

AbstractXdsClient is not abstract.
This commit is contained in:
Terry Wilson 2023-03-06 10:35:32 -08:00 committed by GitHub
parent b55ecd5c35
commit 56e4ce49bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@ import javax.annotation.Nullable;
* Common base type for XdsClient implementations, which encapsulates the layer abstraction of
* the xDS RPC stream.
*/
final class AbstractXdsClient {
final class ControlPlaneClient {
public static final String CLOSED_BY_SERVER = "Closed by server";
private final SynchronizationContext syncContext;
@ -92,7 +92,7 @@ final class AbstractXdsClient {
/** An entity that manages ADS RPCs over a single channel. */
// TODO: rename to XdsChannel
AbstractXdsClient(
ControlPlaneClient(
XdsChannelFactory xdsChannelFactory,
ServerInfo serverInfo,
Node bootstrapNode,
@ -388,7 +388,7 @@ final class AbstractXdsClient {
@Override
public void beforeStart(ClientCallStreamObserver<DiscoveryRequest> requestStream) {
requestStream.setOnReadyHandler(AbstractXdsClient.this::readyHandler);
requestStream.setOnReadyHandler(ControlPlaneClient.this::readyHandler);
}
@Override

View File

@ -93,7 +93,7 @@ final class XdsClientImpl extends XdsClient
private final FilterRegistry filterRegistry = FilterRegistry.getDefaultRegistry();
private final LoadBalancerRegistry loadBalancerRegistry
= LoadBalancerRegistry.getDefaultRegistry();
private final Map<ServerInfo, AbstractXdsClient> serverChannelMap = new HashMap<>();
private final Map<ServerInfo, ControlPlaneClient> serverChannelMap = new HashMap<>();
private final Map<XdsResourceType<? extends ResourceUpdate>,
Map<String, ResourceSubscriber<? extends ResourceUpdate>>>
resourceSubscribers = new HashMap<>();
@ -144,7 +144,7 @@ final class XdsClientImpl extends XdsClient
if (serverChannelMap.containsKey(serverInfo)) {
return;
}
AbstractXdsClient xdsChannel = new AbstractXdsClient(
ControlPlaneClient xdsChannel = new ControlPlaneClient(
xdsChannelFactory,
serverInfo,
bootstrapInfo.node(),
@ -218,7 +218,7 @@ final class XdsClientImpl extends XdsClient
return;
}
isShutdown = true;
for (AbstractXdsClient xdsChannel : serverChannelMap.values()) {
for (ControlPlaneClient xdsChannel : serverChannelMap.values()) {
xdsChannel.shutdown();
}
if (reportingLoad) {
@ -490,7 +490,7 @@ final class XdsClientImpl extends XdsClient
*/
private final class ResourceSubscriber<T extends ResourceUpdate> {
@Nullable private final ServerInfo serverInfo;
@Nullable private final AbstractXdsClient xdsChannel;
@Nullable private final ControlPlaneClient xdsChannel;
private final XdsResourceType<T> type;
private final String resource;
private final Set<ResourceWatcher<T>> watchers = new HashSet<>();
@ -518,7 +518,7 @@ final class XdsClientImpl extends XdsClient
// is created but not yet requested because the client is in backoff.
this.metadata = ResourceMetadata.newResourceMetadataUnknown();
AbstractXdsClient xdsChannelTemp = null;
ControlPlaneClient xdsChannelTemp = null;
try {
maybeCreateXdsChannelWithLrs(serverInfo);
xdsChannelTemp = serverChannelMap.get(serverInfo);

View File

@ -158,7 +158,7 @@ public abstract class XdsClientImplTestBase {
new FakeClock.TaskFilter() {
@Override
public boolean shouldAccept(Runnable command) {
return command.toString().contains(AbstractXdsClient.RpcRetryTask.class.getSimpleName());
return command.toString().contains(ControlPlaneClient.RpcRetryTask.class.getSimpleName());
}
};