public class Deflector extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFLECTOR_SUFFIX |
static String |
RESTORED_ARCHIVE_SUFFIX |
static String |
SEPARATOR |
| Constructor and Description |
|---|
Deflector(SystemJobManager systemJobManager,
String indexPrefix,
ActivityWriter activityWriter,
Indices indices,
IndexRangeService indexRangeService,
SetIndexReadOnlyAndCalculateRangeJob.Factory setIndexReadOnlyAndCalculateRangeJobFactory) |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildIndexName(String prefix,
int number) |
static String |
buildName(String prefix) |
void |
cycle() |
static int |
extractIndexNumber(String indexName) |
Map<String,Set<String>> |
getAllGraylogDeflectorIndices()
Returns all Graylog deflector indices.
|
String[] |
getAllGraylogIndexNames()
Returns a list of all Graylog managed indices.
|
String |
getCurrentActualTargetIndex() |
String |
getDeflectorWildcard() |
String |
getName() |
String |
getNewestTargetName() |
int |
getNewestTargetNumber() |
boolean |
isDeflectorAlias(String indexName) |
boolean |
isGraylogDeflectorIndex(String indexName) |
boolean |
isGraylogIndex(String indexName) |
boolean |
isUp() |
void |
pointTo(String newIndex) |
void |
pointTo(String newIndex,
String oldIndex) |
void |
setUp() |
public static final String DEFLECTOR_SUFFIX
public static final String SEPARATOR
public static final String RESTORED_ARCHIVE_SUFFIX
@Inject public Deflector(SystemJobManager systemJobManager, @Named(value="elasticsearch_index_prefix") String indexPrefix, ActivityWriter activityWriter, Indices indices, IndexRangeService indexRangeService, SetIndexReadOnlyAndCalculateRangeJob.Factory setIndexReadOnlyAndCalculateRangeJobFactory)
public boolean isUp()
public void setUp()
public void cycle()
public int getNewestTargetNumber()
throws NoTargetIndexException
NoTargetIndexExceptionpublic String[] getAllGraylogIndexNames()
public Map<String,Set<String>> getAllGraylogDeflectorIndices()
public String getNewestTargetName() throws NoTargetIndexException
NoTargetIndexExceptionpublic static int extractIndexNumber(String indexName) throws NumberFormatException
NumberFormatExceptionpublic void pointTo(String newIndex)
public String getName()
public String getDeflectorWildcard()
public boolean isDeflectorAlias(String indexName)
public boolean isGraylogDeflectorIndex(String indexName)
public boolean isGraylogIndex(String indexName)
Copyright © 2012-2016 Graylog, Inc.. All Rights Reserved.