remove redundant getters in MetaData
This commit is contained in:
parent
35f7cfb6c0
commit
3daa83b2d2
|
@ -79,7 +79,7 @@ public final class ClusterStateHealth implements Iterable<ClusterIndexHealth>, S
|
|||
* @param clusterState The current cluster state. Must not be null.
|
||||
*/
|
||||
public ClusterStateHealth(ClusterState clusterState) {
|
||||
this(clusterState, clusterState.metaData().concreteAllIndices());
|
||||
this(clusterState, clusterState.metaData().getConcreteAllIndices());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -432,7 +432,7 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|||
if (routing != null) {
|
||||
Set<String> r = Strings.splitStringByCommaToSet(routing);
|
||||
Map<String, Set<String>> routings = new HashMap<>();
|
||||
String[] concreteIndices = metaData.concreteAllIndices();
|
||||
String[] concreteIndices = metaData.getConcreteAllIndices();
|
||||
for (String index : concreteIndices) {
|
||||
routings.put(index, r);
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|||
*/
|
||||
boolean isPatternMatchingAllIndices(MetaData metaData, String[] indicesOrAliases, String[] concreteIndices) {
|
||||
// if we end up matching on all indices, check, if its a wildcard parameter, or a "-something" structure
|
||||
if (concreteIndices.length == metaData.concreteAllIndices().length && indicesOrAliases.length > 0) {
|
||||
if (concreteIndices.length == metaData.getConcreteAllIndices().length && indicesOrAliases.length > 0) {
|
||||
|
||||
//we might have something like /-test1,+test1 that would identify all indices
|
||||
//or something like /-test1 with test1 index missing and IndicesOptions.lenient()
|
||||
|
@ -728,11 +728,11 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|||
|
||||
private List<String> resolveEmptyOrTrivialWildcard(IndicesOptions options, MetaData metaData, boolean assertEmpty) {
|
||||
if (options.expandWildcardsOpen() && options.expandWildcardsClosed()) {
|
||||
return Arrays.asList(metaData.concreteAllIndices());
|
||||
return Arrays.asList(metaData.getConcreteAllIndices());
|
||||
} else if (options.expandWildcardsOpen()) {
|
||||
return Arrays.asList(metaData.concreteAllOpenIndices());
|
||||
return Arrays.asList(metaData.getConcreteAllOpenIndices());
|
||||
} else if (options.expandWildcardsClosed()) {
|
||||
return Arrays.asList(metaData.concreteAllClosedIndices());
|
||||
return Arrays.asList(metaData.getConcreteAllClosedIndices());
|
||||
} else {
|
||||
assert assertEmpty : "Shouldn't end up here";
|
||||
return Collections.emptyList();
|
||||
|
|
|
@ -370,26 +370,14 @@ public class MetaData implements Iterable<IndexMetaData>, Diffable<MetaData>, Fr
|
|||
/**
|
||||
* Returns all the concrete indices.
|
||||
*/
|
||||
public String[] concreteAllIndices() {
|
||||
return allIndices;
|
||||
}
|
||||
|
||||
public String[] getConcreteAllIndices() {
|
||||
return concreteAllIndices();
|
||||
}
|
||||
|
||||
public String[] concreteAllOpenIndices() {
|
||||
return allOpenIndices;
|
||||
return allIndices;
|
||||
}
|
||||
|
||||
public String[] getConcreteAllOpenIndices() {
|
||||
return allOpenIndices;
|
||||
}
|
||||
|
||||
public String[] concreteAllClosedIndices() {
|
||||
return allClosedIndices;
|
||||
}
|
||||
|
||||
public String[] getConcreteAllClosedIndices() {
|
||||
return allClosedIndices;
|
||||
}
|
||||
|
@ -795,9 +783,9 @@ public class MetaData implements Iterable<IndexMetaData>, Diffable<MetaData>, Fr
|
|||
metaData.getIndices(),
|
||||
metaData.getTemplates(),
|
||||
metaData.getCustoms(),
|
||||
metaData.concreteAllIndices(),
|
||||
metaData.concreteAllOpenIndices(),
|
||||
metaData.concreteAllClosedIndices(),
|
||||
metaData.getConcreteAllIndices(),
|
||||
metaData.getConcreteAllOpenIndices(),
|
||||
metaData.getConcreteAllClosedIndices(),
|
||||
metaData.getAliasAndIndexLookup());
|
||||
} else {
|
||||
// No changes:
|
||||
|
|
Loading…
Reference in New Issue