Package org.graylog2.indexer
Interface IndexSetRegistry
- All Known Implementing Classes:
MongoIndexSetRegistry
-
Method Summary
Modifier and TypeMethodDescriptionReturns theIndexSet
for the given ID.getAll()
Returns a list of allIndexSet
instances.Returns theIndexSet
that is marked as default.getForIndex
(String index) Returns theIndexSet
for the given index.getForIndices
(Collection<String> indices) Returns theIndexSet
s for the given indices.String[]
Returns the list of all index wildcards.String[]
Returns a list of all managed indices.String[]
Returns the list of all write index aliases.boolean
isCurrentWriteIndex
(String index) Checks if the given index is a current write index in anyIndexSet
.boolean
isCurrentWriteIndexAlias
(String indexName) Checks if the given index name is a current write index alias in anyIndexSet
.boolean
isManagedIndex
(String index) Checks if the given index is managed by any index set.isManagedIndex
(Collection<String> indices) Checks if the given indices are managed by any index set.boolean
isUp()
Checks if all deflector aliases exist.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getAll
Returns a list of allIndexSet
instances.- Returns:
- list of index sets
-
get
Returns theIndexSet
for the given ID.- Parameters:
indexSetId
- ID of the index set- Returns:
- index set
-
getForIndex
Returns theIndexSet
for the given index.- Parameters:
index
- name of the index- Returns:
- index set that manages the given index
-
getForIndices
Returns theIndexSet
s for the given indices.- Parameters:
indices
- Collection with the name of the indicies- Returns:
- Set of index sets which manages the given indices
-
getDefault
IndexSet getDefault()Returns theIndexSet
that is marked as default. Throws anIllegalStateException
if the default index set does not exist.- Returns:
- the default index set
-
getManagedIndices
String[] getManagedIndices()Returns a list of all managed indices.- Returns:
- list of managed indices
-
isManagedIndex
Checks if the given index is managed by any index set.- Parameters:
index
- the index name to check- Returns:
- true when index is managed by any index set, false otherwise
-
isManagedIndex
Checks if the given indices are managed by any index set.- Parameters:
indices
- the index names to check- Returns:
- true when index is managed by any index set, false otherwise
-
getIndexWildcards
String[] getIndexWildcards()Returns the list of all index wildcards.- Returns:
- list of wildcards
-
getWriteIndexAliases
String[] getWriteIndexAliases()Returns the list of all write index aliases.- Returns:
- list of names
-
isUp
boolean isUp()Checks if all deflector aliases exist.- Returns:
- if all aliases exist
-
isCurrentWriteIndexAlias
Checks if the given index name is a current write index alias in anyIndexSet
.- Parameters:
indexName
- the name of the index to check- Returns:
- true when given index name is a current write index, false otherwise
-
isCurrentWriteIndex
Checks if the given index is a current write index in anyIndexSet
.- Parameters:
index
- the index name to check- Returns:
- true when index is a current write index, false otherwise
- Throws:
TooManyAliasesException
-