Package org.elasticsearch.indices
Class SystemIndices
java.lang.Object
org.elasticsearch.indices.SystemIndices
public class SystemIndices
extends java.lang.Object
This class holds the
SystemIndexDescriptor objects that represent system indices the
node knows about. Methods for determining if an index should be a system index are also provided
to reduce the locations within the code that need to deal with SystemIndexDescriptors.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSystemIndices.Feature -
Constructor Summary
Constructors Constructor Description SystemIndices(java.util.Map<java.lang.String,SystemIndices.Feature> pluginAndModulesDescriptors) -
Method Summary
Modifier and Type Method Description SystemIndexDescriptorfindMatchingDescriptor(java.lang.String name)Finds a single matchingSystemIndexDescriptor, if any, for the given index name.java.util.Map<java.lang.String,SystemIndices.Feature>getFeatures()booleanisSystemIndex(java.lang.String indexName)Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptorsbooleanisSystemIndex(Index index)Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptorsstatic voidvalidateFeatureName(java.lang.String name, java.lang.String plugin)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SystemIndices
public SystemIndices(java.util.Map<java.lang.String,SystemIndices.Feature> pluginAndModulesDescriptors)
-
-
Method Details
-
isSystemIndex
Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptors- Parameters:
index- theIndexobject to check against loadedSystemIndexDescriptors- Returns:
- true if the
Index's name matches a pattern from aSystemIndexDescriptor
-
isSystemIndex
public boolean isSystemIndex(java.lang.String indexName)Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptors- Parameters:
indexName- the index name to check against loadedSystemIndexDescriptors- Returns:
- true if the index name matches a pattern from a
SystemIndexDescriptor
-
findMatchingDescriptor
Finds a single matchingSystemIndexDescriptor, if any, for the given index name.- Parameters:
name- the name of the index- Returns:
- The matching
SystemIndexDescriptorornullif no descriptor is found - Throws:
java.lang.IllegalStateException- if multiple descriptors match the name
-
getFeatures
-
validateFeatureName
public static void validateFeatureName(java.lang.String name, java.lang.String plugin)
-