Package org.graylog2.indexer.fieldtypes
Class IndexFieldTypePoller
java.lang.Object
org.graylog2.indexer.fieldtypes.IndexFieldTypePoller
This class can be used to poll index field type information for indices in an
IndexSet
.-
Constructor Summary
ConstructorDescriptionIndexFieldTypePoller
(Indices indices, com.codahale.metrics.MetricRegistry metricRegistry, IndexFieldTypePollerAdapter indexFieldTypePollerAdapter) -
Method Summary
Modifier and TypeMethodDescriptionpoll
(IndexSet indexSet, Set<IndexFieldTypesDTO> existingIndexTypes) Returns the index field types for the given index set.Returns the index field types for the given index.
-
Constructor Details
-
IndexFieldTypePoller
@Inject public IndexFieldTypePoller(Indices indices, com.codahale.metrics.MetricRegistry metricRegistry, IndexFieldTypePollerAdapter indexFieldTypePollerAdapter)
-
-
Method Details
-
poll
Returns the index field types for the given index set.Indices present in
existingIndexTypes
(except for the current write index) will not be polled again to avoid Elasticsearch requests.- Parameters:
indexSet
- index set to pollexistingIndexTypes
- existing index field type data- Returns:
- the polled index field type data for the given index set
-
pollIndex
Returns the index field types for the given index.- Parameters:
indexName
- index name to poll types forindexSetId
- index set ID of the given index- Returns:
- the polled index field type data for the given index
-