本文整理匯總了Java中org.elasticsearch.common.unit.TimeValue.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java TimeValue.equals方法的具體用法?Java TimeValue.equals怎麽用?Java TimeValue.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.elasticsearch.common.unit.TimeValue
的用法示例。
在下文中一共展示了TimeValue.equals方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onRefreshSettings
import org.elasticsearch.common.unit.TimeValue; //導入方法依賴的package包/類
@Override
public void onRefreshSettings(Settings settings) {
final TimeValue currentInterval = IndicesTTLService.this.purgerThread.getInterval();
final TimeValue interval = settings.getAsTime(INDICES_TTL_INTERVAL,
IndicesTTLService.this.settings.getAsTime(INDICES_TTL_INTERVAL, DEFAULT_TTL_INTERVAL));
if (!interval.equals(currentInterval)) {
logger.info("updating indices.ttl.interval from [{}] to [{}]",currentInterval, interval);
IndicesTTLService.this.purgerThread.resetInterval(interval);
}
}
示例2: maybeUpdate
import org.elasticsearch.common.unit.TimeValue; //導入方法依賴的package包/類
private TimeValue maybeUpdate(final TimeValue currentValue, final Settings settings, final String key, TimeValue defaultValue) {
final TimeValue value = settings.getAsTime(key, RecoverySettings.this.settings.getAsTime(key, defaultValue));
if (value.equals(currentValue)) {
return currentValue;
}
logger.info("updating [{}] from [{}] to [{}]", key, currentValue, value);
return value;
}
示例3: onRefreshSettings
import org.elasticsearch.common.unit.TimeValue; //導入方法依賴的package包/類
@Override
public void onRefreshSettings(Settings settings) {
final TimeValue maybeNewDefaultSearchTimeout = settings.getAsTime(SearchService.DEFAULT_SEARCH_TIMEOUT,
SearchService.this.settings.getAsTime(DEFAULT_SEARCH_TIMEOUT, NO_TIMEOUT));
if (!maybeNewDefaultSearchTimeout.equals(SearchService.this.defaultSearchTimeout)) {
logger.info("updating [{}] from [{}] to [{}]", SearchService.DEFAULT_SEARCH_TIMEOUT, SearchService.this.defaultSearchTimeout, maybeNewDefaultSearchTimeout);
SearchService.this.defaultSearchTimeout = maybeNewDefaultSearchTimeout;
}
}
示例4: onRefreshSettings
import org.elasticsearch.common.unit.TimeValue; //導入方法依賴的package包/類
@Override
public void onRefreshSettings(Settings settings) {
int flushThresholdOperations = settings.getAsInt(INDEX_TRANSLOG_FLUSH_THRESHOLD_OPS, TranslogService.this.flushThresholdOperations);
if (flushThresholdOperations != TranslogService.this.flushThresholdOperations) {
logger.info("updating flush_threshold_ops from [{}] to [{}]", TranslogService.this.flushThresholdOperations, flushThresholdOperations);
TranslogService.this.flushThresholdOperations = flushThresholdOperations;
}
ByteSizeValue flushThresholdSize = settings.getAsBytesSize(INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE, TranslogService.this.flushThresholdSize);
if (!flushThresholdSize.equals(TranslogService.this.flushThresholdSize)) {
logger.info("updating flush_threshold_size from [{}] to [{}]", TranslogService.this.flushThresholdSize, flushThresholdSize);
TranslogService.this.flushThresholdSize = flushThresholdSize;
}
TimeValue flushThresholdPeriod = settings.getAsTime(INDEX_TRANSLOG_FLUSH_THRESHOLD_PERIOD, TranslogService.this.flushThresholdPeriod);
if (!flushThresholdPeriod.equals(TranslogService.this.flushThresholdPeriod)) {
logger.info("updating flush_threshold_period from [{}] to [{}]", TranslogService.this.flushThresholdPeriod, flushThresholdPeriod);
TranslogService.this.flushThresholdPeriod = flushThresholdPeriod;
}
TimeValue interval = settings.getAsTime(INDEX_TRANSLOG_FLUSH_INTERVAL, TranslogService.this.interval);
if (!interval.equals(TranslogService.this.interval)) {
logger.info("updating interval from [{}] to [{}]", TranslogService.this.interval, interval);
TranslogService.this.interval = interval;
}
boolean disableFlush = settings.getAsBoolean(INDEX_TRANSLOG_DISABLE_FLUSH, TranslogService.this.disableFlush);
if (disableFlush != TranslogService.this.disableFlush) {
logger.info("updating disable_flush from [{}] to [{}]", TranslogService.this.disableFlush, disableFlush);
TranslogService.this.disableFlush = disableFlush;
}
}
示例5: onRefreshSettings
import org.elasticsearch.common.unit.TimeValue; //導入方法依賴的package包/類
@Override
public void onRefreshSettings(Settings settings) {
TimeValue current = MappingUpdatedAction.this.dynamicMappingUpdateTimeout;
TimeValue newValue = settings.getAsTime(
INDICES_MAPPING_DYNAMIC_TIMEOUT,
MappingUpdatedAction.this.settings.getAsTime(
INDICES_MAPPING_DYNAMIC_TIMEOUT,
DEFAULT_ADDITIONAL_MAPPING_CHANGE_TIME));
if (!current.equals(newValue)) {
logger.info("updating " + INDICES_MAPPING_DYNAMIC_TIMEOUT + " from [{}] to [{}]", current, newValue);
MappingUpdatedAction.this.dynamicMappingUpdateTimeout = newValue;
}
}