org.elasticsearch.common.component.Lifecycle.moveToClosed()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.elasticsearch.common.component.Lifecycle.moveToClosed()方法的一些代码示例,展示了Lifecycle.moveToClosed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lifecycle.moveToClosed()方法的具体详情如下:
包路径:org.elasticsearch.common.component.Lifecycle
类名称:Lifecycle
方法名:moveToClosed

Lifecycle.moveToClosed介绍

暂无

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public void close() {
  lifecycle.moveToStopped();
  lifecycle.moveToClosed();
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public void close() {
  if (lifecycle.started()) {
    stop();
  }
  if (!lifecycle.canMoveToClosed()) {
    return;
  }
  for (LifecycleListener listener : listeners) {
    listener.beforeClose();
  }
  lifecycle.moveToClosed();
  try {
    doClose();
  } catch (IOException e) {
    // TODO: we need to separate out closing (ie shutting down) services, vs releasing runtime transient
    // structures. Shutting down services should use IOUtils.close
    logger.warn("failed to close " + getClass().getName(), e);
  }
  for (LifecycleListener listener : listeners) {
    listener.afterClose();
  }
}

代码示例来源:origin: org.elasticsearch/elasticsearch

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

lifecycle.moveToClosed();

代码示例来源:origin: apache/servicemix-bundles

lifecycle.moveToClosed();

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public void close() {
  if (lifecycle.started()) {
    stop();
  }
  if (!lifecycle.canMoveToClosed()) {
    return;
  }
  for (LifecycleListener listener : listeners) {
    listener.beforeClose();
  }
  lifecycle.moveToClosed();
  try {
    doClose();
  } catch (IOException e) {
    // TODO: we need to separate out closing (ie shutting down) services, vs releasing runtime transient
    // structures. Shutting down services should use IOUtils.close
    logger.warn("failed to close " + getClass().getName(), e);
  }
  for (LifecycleListener listener : listeners) {
    listener.afterClose();
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void close() {
  if (lifecycle.started()) {
    stop();
  }
  if (!lifecycle.canMoveToClosed()) {
    return;
  }
  for (LifecycleListener listener : listeners) {
    listener.beforeClose();
  }
  lifecycle.moveToClosed();
  try {
    doClose();
  } catch (IOException e) {
    // TODO: we need to separate out closing (ie shutting down) services, vs releasing runtime transient
    // structures. Shutting down services should use IOUtils.close
    logger.warn("failed to close " + getClass().getName(), e);
  }
  for (LifecycleListener listener : listeners) {
    listener.afterClose();
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public void close() {
  if (lifecycle.started()) {
    stop();
  }
  if (!lifecycle.canMoveToClosed()) {
    return;
  }
  for (LifecycleListener listener : listeners) {
    listener.beforeClose();
  }
  lifecycle.moveToClosed();
  try {
    doClose();
  } catch (IOException e) {
    // TODO: we need to separate out closing (ie shutting down) services, vs releasing runtime transient
    // structures. Shutting down services should use IOUtils.close
    logger.warn("failed to close " + getClass().getName(), e);
  }
  for (LifecycleListener listener : listeners) {
    listener.afterClose();
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: harbby/presto-connectors

@Override
public void close() {
  if (lifecycle.started()) {
    stop();
  }
  if (!lifecycle.canMoveToClosed()) {
    return;
  }
  for (LifecycleListener listener : listeners) {
    listener.beforeClose();
  }
  lifecycle.moveToClosed();
  doClose();
  for (LifecycleListener listener : listeners) {
    listener.afterClose();
  }
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: apache/servicemix-bundles

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: org.fusesource.insight/insight-elasticsearch

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: harbby/presto-connectors

stop();
if (!lifecycle.moveToClosed()) {
  return;

代码示例来源:origin: io.fabric8.insight/insight-elasticsearch

stop();
if (!lifecycle.moveToClosed()) {
  return;

相关文章