Class IndexFieldTypePoller

java.lang.Object
org.graylog2.indexer.fieldtypes.IndexFieldTypePoller

public class IndexFieldTypePoller extends Object
This class can be used to poll index field type information for indices in an IndexSet.
  • Constructor Details

    • IndexFieldTypePoller

      @Inject public IndexFieldTypePoller(Indices indices, com.codahale.metrics.MetricRegistry metricRegistry, IndexFieldTypePollerAdapter indexFieldTypePollerAdapter)
  • Method Details

    • poll

      public Set<IndexFieldTypesDTO> poll(IndexSet indexSet, Set<IndexFieldTypesDTO> existingIndexTypes)
      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 poll
      existingIndexTypes - existing index field type data
      Returns:
      the polled index field type data for the given index set
    • pollIndex

      public Optional<IndexFieldTypesDTO> pollIndex(String indexName, String indexSetId)
      Returns the index field types for the given index.
      Parameters:
      indexName - index name to poll types for
      indexSetId - index set ID of the given index
      Returns:
      the polled index field type data for the given index