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


Java LifecycleListener类代码示例

本文整理汇总了Java中org.elasticsearch.common.component.LifecycleListener的典型用法代码示例。如果您正苦于以下问题:Java LifecycleListener类的具体用法?Java LifecycleListener怎么用?Java LifecycleListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LifecycleListener类属于org.elasticsearch.common.component包,在下文中一共展示了LifecycleListener类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doStart

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
protected void doStart() {
    if (logger.isDebugEnabled()) {
        logger.debug("Starting ConfigSyncService");
    }

    if (fileUpdaterEnabled) {
        clusterService.addLifecycleListener(new LifecycleListener() {
            @Override
            public void afterStart() {
                client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute(wrap(res -> {
                    if (res.isTimedOut()) {
                        logger.warn("Cluster service was timeouted.");
                    }
                    checkIfIndexExists(wrap(response -> {
                        final TimeValue time = startUpdater();
                        if (time.millis() >= 0) {
                            logger.info("ConfigFileUpdater is started at {} intervals.", time);
                        }
                    }, e -> {
                        logger.error("Failed to start ConfigFileUpdater.", e);
                    }));
                }, e -> {
                    logger.error("Failed to start ConfigFileUpdater.", e);
                }));
            }
        });
    }
}
 
开发者ID:codelibs,项目名称:elasticsearch-configsync,代码行数:30,代码来源:ConfigSyncService.java

示例2: addLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
    transport.addLifecycleListener(listener);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:MockTransportService.java

示例3: removeLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
    transport.removeLifecycleListener(listener);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:MockTransportService.java

示例4: addLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
    throw new UnsupportedOperationException();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:FailAndRetryMockTransport.java

示例5: removeLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
    throw new UnsupportedOperationException();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:FailAndRetryMockTransport.java

示例6: addLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {            
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:4,代码来源:SearchGuardPlugin.java

示例7: removeLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {            
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:4,代码来源:SearchGuardPlugin.java

示例8: addLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {

}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:CapturingTransport.java

示例9: removeLifecycleListener

import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {

}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:CapturingTransport.java


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