@Singleton public class MongoIndexSetRegistry extends Object implements IndexSetRegistry
| Constructor and Description |
|---|
MongoIndexSetRegistry(IndexSetService indexSetService,
MongoIndexSet.Factory mongoIndexSetFactory,
org.graylog2.indexer.MongoIndexSetRegistry.IndexSetsCache indexSetsCache) |
| Modifier and Type | Method and Description |
|---|---|
Optional<IndexSet> |
get(String indexSetId)
Returns the
IndexSet for the given ID. |
Set<IndexSet> |
getAll()
Returns a list of all
IndexSet instances. |
IndexSet |
getDefault()
Returns the
IndexSet that is marked as default. |
Optional<IndexSet> |
getForIndex(String indexName)
Returns the
IndexSet for the given index. |
Set<IndexSet> |
getForIndices(Collection<String> indices)
Returns the
IndexSets for the given indices. |
String[] |
getIndexWildcards()
Returns the list of all index wildcards.
|
String[] |
getManagedIndices()
Returns a list of all managed indices.
|
String[] |
getWriteIndexAliases()
Returns the list of all write index aliases.
|
boolean |
isCurrentWriteIndex(String indexName)
Checks if the given index is a current write index in any
IndexSet. |
boolean |
isCurrentWriteIndexAlias(String indexName)
Checks if the given index name is a current write index alias in any
IndexSet. |
Map<String,Boolean> |
isManagedIndex(Collection<String> indices)
Checks if the given indices are managed by any index set.
|
boolean |
isManagedIndex(String indexName)
Checks if the given index is managed by any index set.
|
boolean |
isUp()
Checks if all deflector aliases exist.
|
Iterator<IndexSet> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliterator@Inject public MongoIndexSetRegistry(IndexSetService indexSetService, MongoIndexSet.Factory mongoIndexSetFactory, org.graylog2.indexer.MongoIndexSetRegistry.IndexSetsCache indexSetsCache)
public Set<IndexSet> getAll()
IndexSetRegistryIndexSet instances.getAll in interface IndexSetRegistrypublic Optional<IndexSet> get(String indexSetId)
IndexSetRegistryIndexSet for the given ID.get in interface IndexSetRegistryindexSetId - ID of the index setpublic Optional<IndexSet> getForIndex(String indexName)
IndexSetRegistryIndexSet for the given index.getForIndex in interface IndexSetRegistryindexName - name of the indexpublic Set<IndexSet> getForIndices(Collection<String> indices)
IndexSetRegistryIndexSets for the given indices.getForIndices in interface IndexSetRegistryindices - Collection with the name of the indiciespublic IndexSet getDefault()
IndexSetRegistryIndexSet that is marked as default.
Throws an IllegalStateException if the default index set does not exist.getDefault in interface IndexSetRegistrypublic String[] getManagedIndices()
IndexSetRegistrygetManagedIndices in interface IndexSetRegistrypublic boolean isManagedIndex(String indexName)
IndexSetRegistryisManagedIndex in interface IndexSetRegistryindexName - the index name to checkpublic Map<String,Boolean> isManagedIndex(Collection<String> indices)
IndexSetRegistryisManagedIndex in interface IndexSetRegistryindices - the index names to checkpublic String[] getIndexWildcards()
IndexSetRegistrygetIndexWildcards in interface IndexSetRegistrypublic String[] getWriteIndexAliases()
IndexSetRegistrygetWriteIndexAliases in interface IndexSetRegistrypublic boolean isUp()
IndexSetRegistryisUp in interface IndexSetRegistrypublic boolean isCurrentWriteIndexAlias(String indexName)
IndexSetRegistryIndexSet.isCurrentWriteIndexAlias in interface IndexSetRegistryindexName - the name of the index to checkpublic boolean isCurrentWriteIndex(String indexName) throws TooManyAliasesException
IndexSetRegistryIndexSet.isCurrentWriteIndex in interface IndexSetRegistryindexName - the index name to checkTooManyAliasesExceptionCopyright © 2012–2021 Graylog, Inc.. All rights reserved.