Skip to content

Commit

Permalink
Revert "Restore method getMasterService() to return MasterService"
Browse files Browse the repository at this point in the history
This reverts commit 694d876.

Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng committed Jul 14, 2022
1 parent 694d876 commit 1fdd175
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

import java.util.Collections;
import java.util.Map;
import java.util.Objects;

/**
* Main Cluster Service
Expand All @@ -64,8 +63,6 @@
*/
public class ClusterService extends AbstractLifecycleComponent {
private final ClusterManagerService clusterManagerService;
@Deprecated
private MasterService masterService = null;

private final ClusterApplierService clusterApplierService;

Expand Down Expand Up @@ -117,20 +114,6 @@ public ClusterService(
this.clusterApplierService = clusterApplierService;
}

/**
* @deprecated As of 2.2, because supporting inclusive language.
*/
@Deprecated
public ClusterService(
Settings settings,
ClusterSettings clusterSettings,
MasterService masterService,
ClusterApplierService clusterApplierService
) {
this(settings, clusterSettings, (ClusterManagerService) masterService, clusterApplierService);
this.masterService = masterService;
}

public synchronized void setNodeConnectionsService(NodeConnectionsService nodeConnectionsService) {
clusterApplierService.setNodeConnectionsService(nodeConnectionsService);
}
Expand Down Expand Up @@ -235,21 +218,10 @@ public void addLocalNodeMasterListener(LocalNodeClusterManagerListener listener)
clusterApplierService.addLocalNodeMasterListener(listener);
}

public ClusterManagerService getClusterManagerService() {
public ClusterManagerService getMasterService() {
return clusterManagerService;
}

/**
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #getClusterManagerService()}
*/
@Deprecated
public MasterService getMasterService() {
return Objects.requireNonNullElseGet(
masterService,
() -> new MasterService(settings, clusterSettings, clusterManagerService.threadPool)
);
}

/**
* Getter and Setter for IndexingPressureService, This method exposes IndexingPressureService stats to other plugins for usage.
* Although Indexing Pressure instances can be accessed via Node and NodeService class but none of them are
Expand Down

This file was deleted.

0 comments on commit 1fdd175

Please sign in to comment.