mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Refactor overrides of old Plugin.createComponents method to new services method (#101381)
This commit is contained in:
parent
d52f74ff22
commit
22381fd6a7
51 changed files with 291 additions and 1565 deletions
|
@ -9,28 +9,17 @@
|
|||
package org.elasticsearch.plugin.repository.url;
|
||||
|
||||
import org.apache.lucene.util.SetOnce;
|
||||
import org.elasticsearch.client.internal.Client;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocationService;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.blobstore.url.http.URLHttpClient;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.core.IOUtils;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.RepositoryPlugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.repositories.Repository;
|
||||
import org.elasticsearch.repositories.url.URLRepository;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.telemetry.TelemetryProvider;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.elasticsearch.xcontent.NamedXContentRegistry;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -39,7 +28,6 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class URLRepositoryPlugin extends Plugin implements RepositoryPlugin {
|
||||
private final SetOnce<URLHttpClient.Factory> httpClientFactory = new SetOnce<>();
|
||||
|
@ -76,22 +64,7 @@ public class URLRepositoryPlugin extends Plugin implements RepositoryPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> createComponents(
|
||||
Client client,
|
||||
ClusterService clusterService,
|
||||
ThreadPool threadPool,
|
||||
ResourceWatcherService resourceWatcherService,
|
||||
ScriptService scriptService,
|
||||
NamedXContentRegistry xContentRegistry,
|
||||
Environment environment,
|
||||
NodeEnvironment nodeEnvironment,
|
||||
NamedWriteableRegistry namedWriteableRegistry,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
Supplier<RepositoriesService> repositoriesServiceSupplier,
|
||||
TelemetryProvider telemetryProvider,
|
||||
AllocationService allocationService,
|
||||
IndicesService indicesService
|
||||
) {
|
||||
public Collection<?> createComponents(PluginServices services) {
|
||||
|
||||
final URLHttpClient.Factory apacheURLHttpClientFactory = new URLHttpClient.Factory();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue