@Singleton public class Indices extends Object
| Constructor and Description |
|---|
Indices(org.elasticsearch.client.Client client,
ElasticsearchConfiguration configuration,
IndexMapping indexMapping,
Messages messages) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
aliasExists(String alias) |
String |
aliasTarget(String alias) |
String |
allIndicesAlias() |
Map<String,Boolean> |
areReopened(Collection<String> indices) |
protected Boolean |
checkForReopened(org.elasticsearch.cluster.metadata.IndexMetaData metaData) |
void |
close(String indexName) |
boolean |
create(String indexName) |
boolean |
create(String indexName,
int numShards,
int numReplicas,
org.elasticsearch.common.settings.Settings customSettings) |
boolean |
cycleAlias(String aliasName,
String targetIndex) |
boolean |
cycleAlias(String aliasName,
String targetIndex,
String oldIndex) |
void |
delete(String indexName) |
boolean |
exists(String index) |
void |
flush(String index) |
Map<String,org.elasticsearch.action.admin.indices.stats.IndexStats> |
getAll() |
Map<String,org.elasticsearch.action.admin.indices.stats.IndexStats> |
getAllDocCounts() |
Set<String> |
getAllMessageFields() |
Set<String> |
getClosedIndices() |
Map<String,Set<String>> |
getIndexNamesAndAliases(String indexPattern) |
IndexStatistics |
getIndexStats(String index) |
Set<IndexStatistics> |
getIndicesStats() |
Set<String> |
getReopenedIndices() |
org.joda.time.DateTime |
indexCreationDate(String index) |
org.elasticsearch.action.admin.indices.stats.IndexStats |
indexStats(String indexName) |
boolean |
isReopened(String indexName) |
void |
move(String source,
String target) |
long |
numberOfMessages(String indexName) |
void |
optimizeIndex(String index) |
void |
reopenIndex(String index) |
org.elasticsearch.common.settings.Settings |
reopenIndexSettings() |
void |
setReadOnly(String index) |
TimestampStats |
timestampStatsOfIndex(String index)
Calculate min and max message timestamps in the given index.
|
org.elasticsearch.cluster.health.ClusterHealthStatus |
waitForRecovery(String index) |
org.elasticsearch.cluster.health.ClusterHealthStatus |
waitForStatus(String index,
org.elasticsearch.cluster.health.ClusterHealthStatus clusterHealthStatus) |
@Inject
public Indices(org.elasticsearch.client.Client client,
ElasticsearchConfiguration configuration,
IndexMapping indexMapping,
Messages messages)
public void delete(String indexName)
public void close(String indexName)
public long numberOfMessages(String indexName) throws IndexNotFoundException
IndexNotFoundExceptionpublic Map<String,org.elasticsearch.action.admin.indices.stats.IndexStats> getAllDocCounts()
@Nullable public org.elasticsearch.action.admin.indices.stats.IndexStats indexStats(String indexName)
public String allIndicesAlias()
public boolean exists(String index)
public boolean aliasExists(String alias)
@NotNull public Map<String,Set<String>> getIndexNamesAndAliases(String indexPattern)
public boolean create(String indexName)
public boolean create(String indexName, int numShards, int numReplicas, org.elasticsearch.common.settings.Settings customSettings)
public void setReadOnly(String index)
public void flush(String index)
public org.elasticsearch.common.settings.Settings reopenIndexSettings()
public void reopenIndex(String index)
public boolean isReopened(String indexName)
public Map<String,Boolean> areReopened(Collection<String> indices)
protected Boolean checkForReopened(org.elasticsearch.cluster.metadata.IndexMetaData metaData)
@Nullable public IndexStatistics getIndexStats(String index)
public Set<IndexStatistics> getIndicesStats()
public void optimizeIndex(String index)
public org.elasticsearch.cluster.health.ClusterHealthStatus waitForRecovery(String index)
public org.elasticsearch.cluster.health.ClusterHealthStatus waitForStatus(String index, org.elasticsearch.cluster.health.ClusterHealthStatus clusterHealthStatus)
public TimestampStats timestampStatsOfIndex(String index)
index - Name of the index to query.null if they couldn't be calculated.StatsCopyright © 2012-2016 Graylog, Inc.. All Rights Reserved.