当前位置: 首页>>代码示例>>Java>>正文


Java TimeValue.equals方法代码示例

本文整理汇总了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);

    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:IndicesTTLService.java

示例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;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:RecoverySettings.java

示例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;
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:SearchService.java

示例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;
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:29,代码来源:TranslogService.java

示例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;
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:MappingUpdatedAction.java


注:本文中的org.elasticsearch.common.unit.TimeValue.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。