Package org.graylog2.indexer
Class MongoIndexSetRegistry
java.lang.Object
org.graylog2.indexer.MongoIndexSetRegistry
- All Implemented Interfaces:
Iterable<IndexSet>,IndexSetRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionMongoIndexSetRegistry(IndexSetService indexSetService, MongoIndexSet.Factory mongoIndexSetFactory, org.graylog2.indexer.MongoIndexSetRegistry.IndexSetsCache indexSetsCache) -
Method Summary
Modifier and TypeMethodDescriptionReturns theIndexSetfor the given ID.getAll()Returns a list of allIndexSetinstances.Returns theIndexSetthat is marked as default.getForIndex(String indexName) Returns theIndexSetfor the given index.getForIndices(Collection<String> indices) Returns theIndexSets 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.booleanisCurrentWriteIndex(String indexName) Checks if the given index is a current write index in anyIndexSet.booleanisCurrentWriteIndexAlias(String indexName) Checks if the given index name is a current write index alias in anyIndexSet.booleanisManagedIndex(String indexName) 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.booleanisUp()Checks if all deflector aliases exist.iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MongoIndexSetRegistry
@Inject public MongoIndexSetRegistry(IndexSetService indexSetService, MongoIndexSet.Factory mongoIndexSetFactory, org.graylog2.indexer.MongoIndexSetRegistry.IndexSetsCache indexSetsCache)
-
-
Method Details
-
getAll
Description copied from interface:IndexSetRegistryReturns a list of allIndexSetinstances.- Specified by:
getAllin interfaceIndexSetRegistry- Returns:
- list of index sets
-
get
Description copied from interface:IndexSetRegistryReturns theIndexSetfor the given ID.- Specified by:
getin interfaceIndexSetRegistry- Parameters:
indexSetId- ID of the index set- Returns:
- index set
-
getForIndex
Description copied from interface:IndexSetRegistryReturns theIndexSetfor the given index.- Specified by:
getForIndexin interfaceIndexSetRegistry- Parameters:
indexName- name of the index- Returns:
- index set that manages the given index
-
getForIndices
Description copied from interface:IndexSetRegistryReturns theIndexSets for the given indices.- Specified by:
getForIndicesin interfaceIndexSetRegistry- Parameters:
indices- Collection with the name of the indicies- Returns:
- Set of index sets which manages the given indices
-
getDefault
Description copied from interface:IndexSetRegistryReturns theIndexSetthat is marked as default. Throws anIllegalStateExceptionif the default index set does not exist.- Specified by:
getDefaultin interfaceIndexSetRegistry- Returns:
- the default index set
-
getManagedIndices
Description copied from interface:IndexSetRegistryReturns a list of all managed indices.- Specified by:
getManagedIndicesin interfaceIndexSetRegistry- Returns:
- list of managed indices
-
isManagedIndex
Description copied from interface:IndexSetRegistryChecks if the given index is managed by any index set.- Specified by:
isManagedIndexin interfaceIndexSetRegistry- Parameters:
indexName- the index name to check- Returns:
- true when index is managed by any index set, false otherwise
-
isManagedIndex
Description copied from interface:IndexSetRegistryChecks if the given indices are managed by any index set.- Specified by:
isManagedIndexin interfaceIndexSetRegistry- Parameters:
indices- the index names to check- Returns:
- true when index is managed by any index set, false otherwise
-
getIndexWildcards
Description copied from interface:IndexSetRegistryReturns the list of all index wildcards.- Specified by:
getIndexWildcardsin interfaceIndexSetRegistry- Returns:
- list of wildcards
-
getWriteIndexAliases
Description copied from interface:IndexSetRegistryReturns the list of all write index aliases.- Specified by:
getWriteIndexAliasesin interfaceIndexSetRegistry- Returns:
- list of names
-
isUp
public boolean isUp()Description copied from interface:IndexSetRegistryChecks if all deflector aliases exist.- Specified by:
isUpin interfaceIndexSetRegistry- Returns:
- if all aliases exist
-
isCurrentWriteIndexAlias
Description copied from interface:IndexSetRegistryChecks if the given index name is a current write index alias in anyIndexSet.- Specified by:
isCurrentWriteIndexAliasin interfaceIndexSetRegistry- Parameters:
indexName- the name of the index to check- Returns:
- true when given index name is a current write index, false otherwise
-
isCurrentWriteIndex
Description copied from interface:IndexSetRegistryChecks if the given index is a current write index in anyIndexSet.- Specified by:
isCurrentWriteIndexin interfaceIndexSetRegistry- Parameters:
indexName- the index name to check- Returns:
- true when index is a current write index, false otherwise
- Throws:
TooManyAliasesException
-
iterator
-