2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.persistence.influxdb.internal;
15 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * Manages InfluxDB server interaction maintaining client connection
23 * @author Joan Pujol Espinar - Initial contribution
26 public interface InfluxDBRepository {
28 * Returns if the client is successfully connected to server
30 * @return True if it's connected, otherwise false
32 boolean isConnected();
35 * Connect to InfluxDB server
37 * @return True if successful, otherwise false
42 * Disconnect from InfluxDB server
47 * Check if connection is currently ready
49 * @return True if its ready, otherwise false
51 boolean checkConnectionStatus();
54 * Return all stored item names with it's count of stored points
56 * @return Map with <ItemName,ItemCount> entries
58 Map<String, Integer> getStoredItemsCount();
64 * @return Query results
66 List<InfluxRow> query(String query);
69 * Write point to database
71 * @param influxPoint Point to write
73 void write(InfluxPoint influxPoint);