use of com.influxdb.client.domain.Ready in project openhab-addons by openhab.
the class InfluxDBClientFacadeImpl method checkConnectionStatus.
private boolean checkConnectionStatus() {
final InfluxDBClient currentClient = client;
if (currentClient != null) {
Ready ready = currentClient.ready();
boolean isUp = ready != null && ready.getStatus() == Ready.StatusEnum.READY;
if (isUp) {
logger.debug("database status is OK");
} else {
logger.warn("database not ready");
}
return isUp;
} else {
logger.warn("checkConnection: database is not connected");
return false;
}
}
use of com.influxdb.client.domain.Ready in project openhab-addons by openhab.
the class InfluxDB2RepositoryImpl method checkConnectionStatus.
/**
* Check if connection is currently ready
*
* @return True if its ready, otherwise false
*/
@Override
public boolean checkConnectionStatus() {
final InfluxDBClient currentClient = client;
if (currentClient != null) {
Ready ready = currentClient.ready();
boolean isUp = ready != null && ready.getStatus() == Ready.StatusEnum.READY;
if (isUp) {
logger.debug("database status is OK");
} else {
logger.warn("database not ready");
}
return isUp;
} else {
logger.warn("checkConnection: database is not connected");
return false;
}
}
use of com.influxdb.client.domain.Ready in project addons by smarthomej.
the class InfluxDB2RepositoryImpl method checkConnectionStatus.
/**
* Check if connection is currently ready
*
* @return True if its ready, otherwise false
*/
@Override
public boolean checkConnectionStatus() {
final InfluxDBClient currentClient = client;
if (currentClient != null) {
Ready ready = currentClient.ready();
boolean isUp = ready != null && ready.getStatus() == Ready.StatusEnum.READY;
if (isUp) {
logger.debug("database status is OK");
} else {
logger.warn("database not ready");
}
return isUp;
} else {
logger.warn("checkConnection: database is not connected");
return false;
}
}
Aggregations