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 SystemIndexDescriptor
s.-
Constructor Summary
Constructors Constructor Description SystemIndices(java.util.Map<java.lang.String,java.util.Collection<SystemIndexDescriptor>> pluginAndModulesDescriptors)
-
Method Summary
Modifier and Type Method Description SystemIndexDescriptor
findMatchingDescriptor(java.lang.String name)
Finds a single matchingSystemIndexDescriptor
, if any, for the given index name.boolean
isSystemIndex(java.lang.String indexName)
Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptor
sboolean
isSystemIndex(Index index)
Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptor
s
-
Constructor Details
-
SystemIndices
public SystemIndices(java.util.Map<java.lang.String,java.util.Collection<SystemIndexDescriptor>> pluginAndModulesDescriptors)
-
-
Method Details
-
isSystemIndex
Determines whether a given index is a system index by comparing its name to the collection of loadedSystemIndexDescriptor
s- Parameters:
index
- theIndex
object to check against loadedSystemIndexDescriptor
s- 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 loadedSystemIndexDescriptor
s- Parameters:
indexName
- the index name to check against loadedSystemIndexDescriptor
s- 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
SystemIndexDescriptor
ornull
if no descriptor is found - Throws:
java.lang.IllegalStateException
- if multiple descriptors match the name
-