public class Deflector extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFLECTOR_SUFFIX |
static String |
SEPARATOR |
| Constructor and Description |
|---|
Deflector(SystemJobManager systemJobManager,
Configuration configuration,
ActivityWriter activityWriter,
RebuildIndexRangesJob.Factory rebuildIndexRangesJobFactory,
OptimizeIndexJob.Factory optimizeIndexJobFactory) |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildIndexName(String prefix,
int number) |
static String |
buildName(String prefix) |
void |
cycle(Indexer indexer) |
static int |
extractIndexNumber(String indexName) |
String[] |
getAllDeflectorIndexNames(Indexer indexer) |
Map<String,org.elasticsearch.action.admin.indices.stats.IndexStats> |
getAllDeflectorIndices(Indexer indexer) |
String |
getCurrentActualTargetIndex(Indexer indexer) |
String |
getName() |
String |
getNewestTargetName(Indexer indexer) |
int |
getNewestTargetNumber(Indexer indexer) |
boolean |
isDeflectorAlias(String indexName) |
boolean |
isGraylog2Index(String indexName) |
boolean |
isUp(Indexer indexer) |
void |
pointTo(Indexer indexer,
String newIndex) |
void |
pointTo(Indexer indexer,
String newIndex,
String oldIndex) |
void |
setUp(Indexer indexer) |
public static final String DEFLECTOR_SUFFIX
public static final String SEPARATOR
@Inject public Deflector(SystemJobManager systemJobManager, Configuration configuration, ActivityWriter activityWriter, RebuildIndexRangesJob.Factory rebuildIndexRangesJobFactory, OptimizeIndexJob.Factory optimizeIndexJobFactory)
public boolean isUp(Indexer indexer)
public void setUp(Indexer indexer)
public void cycle(Indexer indexer)
public int getNewestTargetNumber(Indexer indexer) throws NoTargetIndexException
NoTargetIndexExceptionpublic Map<String,org.elasticsearch.action.admin.indices.stats.IndexStats> getAllDeflectorIndices(Indexer indexer)
public String getNewestTargetName(Indexer indexer) throws NoTargetIndexException
NoTargetIndexExceptionpublic static int extractIndexNumber(String indexName) throws NumberFormatException
NumberFormatExceptionpublic String getName()
public boolean isDeflectorAlias(String indexName)
public boolean isGraylog2Index(String indexName)
Copyright © 2012–2014 TORCH GmbH. All rights reserved.