本文整理汇总了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);
}));
}
});
}
}
示例2: addLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
transport.addLifecycleListener(listener);
}
示例3: removeLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
transport.removeLifecycleListener(listener);
}
示例4: addLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
throw new UnsupportedOperationException();
}
示例5: removeLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
throw new UnsupportedOperationException();
}
示例6: addLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
}
示例7: removeLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
}
示例8: addLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void addLifecycleListener(LifecycleListener listener) {
}
示例9: removeLifecycleListener
import org.elasticsearch.common.component.LifecycleListener; //导入依赖的package包/类
@Override
public void removeLifecycleListener(LifecycleListener listener) {
}