use of org.graylog2.plugin.indexer.rotation.RotationStrategy in project graylog2-server by Graylog2.
the class RotationStrategyResource method isEnabledRotationStrategy.
// Limit available rotation strategies to those specified by configuration parameter enabled_index_rotation_strategies
private boolean isEnabledRotationStrategy(String strategyName) {
final Provider<RotationStrategy> provider = rotationStrategies.get(strategyName);
if (provider == null) {
throw new NotFoundException("Couldn't find rotation strategy for given type " + strategyName);
}
final RotationStrategy rotationStrategy = provider.get();
return elasticsearchConfiguration.getEnabledRotationStrategies().contains(rotationStrategy.getStrategyName());
}
Aggregations