本文整理了Java中org.influxdb.InfluxDB.close()
方法的一些代码示例,展示了InfluxDB.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。InfluxDB.close()
方法的具体详情如下:
包路径:org.influxdb.InfluxDB
类名称:InfluxDB
方法名:close
[英]close thread for asynchronous batch write and UDP socket to release resources if need.
[中]如果需要,关闭异步批写入线程和UDP套接字以释放资源。
代码示例来源:origin: apache/nifi
@OnStopped
public void close() {
if (getLogger().isDebugEnabled()) {
getLogger().info("Closing connection");
}
if ( influxDB.get() != null ) {
influxDB.get().close();
influxDB.set(null);;
}
}
}
代码示例来源:origin: archerfeel/awacs
@Override
public void release() {
influx.close();
}
}
代码示例来源:origin: org.apereo.cas/cas-server-support-influxdb-core
@Override
public void close() {
this.influxDb.close();
}
}
代码示例来源:origin: Scrin/RuuviCollector
@Override
public void close() {
influxDB.close();
}
}
代码示例来源:origin: Scrin/RuuviCollector
@Override
public void close() {
influxDB.close();
}
}
代码示例来源:origin: org.mycontroller.standalone/mycontroller-core
@Override
public void disconnect() {
if (_client != null) {
_client.close();
_logger.debug("Influxdb client connection closed.");
}
}
}
代码示例来源:origin: mycontroller-org/mycontroller
@Override
public void disconnect() {
if (_client != null) {
_client.close();
_logger.debug("Influxdb client connection closed.");
}
}
}
代码示例来源:origin: mycontroller-org/mycontroller
@Override
public void close() {
if (_client != null) {
_client.close();
_logger.debug("Influxdb client connection closed.");
}
}
}
代码示例来源:origin: org.mycontroller.standalone/mycontroller-core
@Override
public void close() {
if (_client != null) {
_client.close();
_logger.debug("Influxdb client connection closed.");
}
}
}
代码示例来源:origin: apache/bahir-flink
@Override
public void close() {
if (influxDBClient.isBatchEnabled()) {
influxDBClient.disableBatch();
}
influxDBClient.close();
}
}
代码示例来源:origin: org.apache.nifi/nifi-influxdb-processors
@OnStopped
public void close() {
if (getLogger().isDebugEnabled()) {
getLogger().info("Closing connection");
}
if ( influxDB.get() != null ) {
influxDB.get().close();
influxDB.set(null);;
}
}
}
代码示例来源:origin: io.hekate/hekate-metrics-influxdb
log.info("Stopped InfluxDB metrics publisher.");
db.close();
代码示例来源:origin: org.wso2.testgrid/org.wso2.testgrid.common
/**
* This method will create a DB in influxDB and add a new Data source to grafana
*/
public void initDashboard() {
// create influxDB database according to tp_id
InfluxDB influxDB = null;
try {
influxDB = InfluxDBFactory.connect(TestGridConstants.HTTP + restUrl, username, password);
String dbName = testplanID;
influxDB.createDatabase(dbName);
logger.info(StringUtil.concatStrings("database created for testplan: ", testplanID,
"and DB name: ", dbName));
} catch (AssertionError e) {
logger.error(StringUtil.concatStrings("Cannot create a new Database: \n", e));
} catch (IllegalArgumentException e) {
logger.error(StringUtil.concatStrings("INFLUXDB_USER and INFLUXDB_PASS cannot be empty: \n", e));
} finally {
if (influxDB != null) {
try {
influxDB.close();
} catch (Exception e) {
logger.error("Couldn't close the influxDB connection");
}
}
}
// add a new data source to grafana
addGrafanaDataSource();
configureTelegrafHost();
}
代码示例来源:origin: Scrin/RuuviCollector
LOG.info("Finished migration! " + counter + " measurements migrated, took " + duration / 1000d + " seconds (" + (counter / (duration / 1000d)) + " measurements per second)");
queues.keySet().stream().sorted().forEach(k -> LOG.info(k + " discarded: " + (pendingMeasurements.get(k).size() + discardedMeasurements.get(k).get())));
influx1.close();
influx2.close();
db.close();
内容来源于网络,如有侵权,请联系作者删除!