io.fabric8.kubernetes.client.Watch.close()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(167)

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

Watch.close介绍

[英]Close the Watch.
[中]关上手表。

代码示例

代码示例来源:origin: spring-cloud/spring-cloud-kubernetes

public void stop() {
  if (watch != null) {
    synchronized (lock) {
      if (watch != null) {
        LOGGER.debug("Stopping leader record watcher");
        watch.close();
        watch = null;
      }
    }
  }
}

代码示例来源:origin: spring-cloud/spring-cloud-kubernetes

public void stop() {
  if (watch != null) {
    synchronized (lock) {
      if (watch != null) {
        LOGGER.debug("Stopping pod readiness watcher for '{}'", podName);
        watch.close();
        watch = null;
      }
    }
  }
}

代码示例来源:origin: spring-cloud/spring-cloud-kubernetes

@PreDestroy
public void unwatch() {
  if (this.watches != null) {
    for (Map.Entry<String, Watch> entry : this.watches.entrySet()) {
      try {
        log.debug("Closing the watch " + entry.getKey());
        entry.getValue().close();
      }
      catch (Exception e) {
        log.error("Error while closing the watch connection", e);
      }
    }
  }
}

代码示例来源:origin: fabric8io/spring-cloud-kubernetes

@Override
public void close() throws IOException {
  started.set(false);
  if (watch != null) {
    watch.close();
  }
  executorService.shutdown();
}

代码示例来源:origin: fabric8io/spring-cloud-kubernetes

@PreDestroy
public void unwatch() {
  if (this.watches != null) {
    for (Map.Entry<String, Watch> entry : this.watches.entrySet()) {
      try {
        log.debug("Closing the watch {}", entry.getKey());
        entry.getValue().close();
      } catch (Exception e) {
        log.error("Error while closing the watch connection", e);
      }
    }
  }
}

代码示例来源:origin: io.fabric8.jenkins.plugins/openshift-sync

public void stop() {
 if (buildConfigWatch != null) {
  buildConfigWatch.close();
  buildConfigWatch = null;
 }
}

代码示例来源:origin: EnMasseProject/enmasse

public void shutdown() {
  if (watch != null) {
    watch.close();
  }
}

代码示例来源:origin: nbogojevic/kafka-operator

@Override
public void close() {
 if (watch != null) {
  watch.close();
 }
}

代码示例来源:origin: nbogojevic/kafka-operator

public void close() {
 if (watch != null) {
  watch.close();
 }
}

代码示例来源:origin: io.fabric8.jenkins.plugins/openshift-sync

public void stop() {
 if (buildsWatch != null) {
  buildsWatch.close();
  buildsWatch = null;
 }
}

代码示例来源:origin: io.fabric8.jenkins.plugins/openshift-sync

public void stop() {
 if (buildsWatch != null) {
  buildsWatch.close();
  buildsWatch = null;
 }
}

代码示例来源:origin: EnMasseProject/enmasse

public void stop() {
  if (watch != null) {
    watch.close();
  }
}

代码示例来源:origin: io.fabric8/fabric8-karaf-cm

@Deactivate
void deactivate() {
  if (watch != null) {
    watch.close();
  }
}

代码示例来源:origin: spotify/styx

@Override
public void close() throws IOException {
 if (watch != null) {
  watch.close();
 }
 closer.close();
}

代码示例来源:origin: io.fabric8/spring-cloud-kubernetes-archaius

@Override
public void close() throws IOException {
  started.set(false);
  if (watch != null) {
    watch.close();
  }
  executorService.shutdown();
}

代码示例来源:origin: org.springframework.cloud/spring-cloud-kubernetes-archaius

@Override
public void close() throws IOException {
  started.set(false);
  if (watch != null) {
    watch.close();
  }
  executorService.shutdown();
}

代码示例来源:origin: fabric8io/fabric8-maven-plugin

@Override
  public void close() throws IOException {
    try {
      watch.close();
    } catch (Exception e) {}
    try {
      forwarderThread.interrupt();
      forwarderThread.join(15000);
    } catch (Exception e) {}
  }
};

代码示例来源:origin: EnMasseProject/enmasse

@Override
  public void close() throws Exception {
    watch.close();
    executorService.shutdown();
    synchronized (logWatches) {
      for (LogWatch watch : logWatches.values()) {
        watch.close();
      }
    }
  }
}

代码示例来源:origin: strimzi/strimzi-kafka-operator

@Override
public void stop(Future<Void> stop) {
  log.info("Stopping ClusterOperator for namespace {}", namespace);
  vertx.cancelTimer(reconcileTimer);
  for (Watch watch : watchByKind.values()) {
    if (watch != null) {
      watch.close();
    }
    // TODO remove the watch from the watchByKind
  }
  client.close();
  stop.complete();
}

代码示例来源:origin: strimzi/strimzi-kafka-operator

@Override
public void stop(Future<Void> stop) {
  log.info("Stopping UserOperator for namespace {}", namespace);
  vertx.cancelTimer(reconcileTimer);
  if (watch != null) {
    watch.close();
  }
  client.close();
  stop.complete();
}

相关文章