@Singleton public class EsIndexRangeService extends Object implements IndexRangeService
| Constructor and Description |
|---|
EsIndexRangeService(org.elasticsearch.client.Client client,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Indices indices,
Deflector deflector,
com.google.common.eventbus.EventBus eventBus,
com.google.common.eventbus.EventBus clusterEventBus,
com.codahale.metrics.MetricRegistry metricRegistry) |
| Modifier and Type | Method and Description |
|---|---|
IndexRange |
calculateRange(String index) |
SortedSet<IndexRange> |
find(org.joda.time.DateTime begin,
org.joda.time.DateTime end) |
SortedSet<IndexRange> |
findAll() |
IndexRange |
get(String index) |
void |
handleIndexDeletion(IndicesDeletedEvent event) |
void |
handleIndexRangeUpdate(IndexRangeUpdatedEvent event) |
void |
save(IndexRange indexRange) |
protected TimestampStats |
timestampStatsOfIndex(String index)
Calculate stats (min, max, avg) about the message timestamps in the given index.
|
@Inject
public EsIndexRangeService(org.elasticsearch.client.Client client,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Indices indices,
Deflector deflector,
com.google.common.eventbus.EventBus eventBus,
com.google.common.eventbus.EventBus clusterEventBus,
com.codahale.metrics.MetricRegistry metricRegistry)
public IndexRange get(String index) throws NotFoundException
get in interface IndexRangeServiceNotFoundExceptionpublic SortedSet<IndexRange> find(org.joda.time.DateTime begin, org.joda.time.DateTime end)
find in interface IndexRangeServicepublic SortedSet<IndexRange> findAll()
findAll in interface IndexRangeServicepublic IndexRange calculateRange(String index)
calculateRange in interface IndexRangeServiceprotected TimestampStats timestampStatsOfIndex(String index)
index - Name of the index to query.null if they couldn't be calculated.Statspublic void save(IndexRange indexRange)
save in interface IndexRangeServicepublic void handleIndexDeletion(IndicesDeletedEvent event)
public void handleIndexRangeUpdate(IndexRangeUpdatedEvent event)
Copyright © 2012-2015 Graylog, Inc.. All Rights Reserved.