Interface InfluxDBClientKotlin
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public interface InfluxDBClientKotlin implements Closeable
The reference Kotlin client that allows query and write for the InfluxDB 2.x by Kotlin Channel coroutines.
Jakub Bednar (bednar@github) (07/02/2019 13:11)
-
-
Method Summary
Modifier and Type Method Description abstract QueryKotlinApigetQueryKotlinApi()Create a new Query client. abstract WriteKotlinApigetWriteKotlinApi()Create a new Write client. abstract HealthCheckhealth()Get the health of an instance. abstract Booleanping()Check the status of InfluxDB Server. abstract Stringversion()Returns the version of the connected InfluxDB Server. abstract LogLevelgetLogLevel()Gets the LogLevel that is used for logging requests and responses. abstract InfluxDBClientKotlinsetLogLevel(LogLevel logLevel)Sets the log level for the request and response information. abstract InfluxDBClientKotlinenableGzip()Enable Gzip compress for http requests. abstract InfluxDBClientKotlindisableGzip()Disable Gzip compress for http request body. abstract BooleanisGzipEnabled()Returns whether Gzip compress for http request body is enabled. abstract Unitclose()Shutdown and close the client. -
-
Method Detail
-
getQueryKotlinApi
abstract QueryKotlinApi getQueryKotlinApi()
Create a new Query client.
- Returns:
the new client instance for the Query API
-
getWriteKotlinApi
abstract WriteKotlinApi getWriteKotlinApi()
Create a new Write client.
- Returns:
the new client instance for the Write API
-
health
@Deprecated(message = "This method is obsolete. Use `ping()` or `version()`", replaceWith = @ReplaceWith(imports = {}, expression = "ping()")) abstract HealthCheck health()
Get the health of an instance.
- Returns:
health of an instance
-
ping
@Nonnull() abstract Boolean ping()
Check the status of InfluxDB Server.
- Returns:
trueif server is healthy otherwise returnfalse
-
version
@Nonnull() abstract String version()
Returns the version of the connected InfluxDB Server.
- Returns:
the version String, otherwise unknown.
-
getLogLevel
abstract LogLevel getLogLevel()
Gets the LogLevel that is used for logging requests and responses.
- Returns:
the LogLevel that is used for logging requests and responses
-
setLogLevel
abstract InfluxDBClientKotlin setLogLevel(LogLevel logLevel)
Sets the log level for the request and response information.
- Parameters:
logLevel- the log level to set.- Returns:
the InfluxDBClientKotlin instance to be able to use it in a fluent manner.
-
enableGzip
abstract InfluxDBClientKotlin enableGzip()
Enable Gzip compress for http requests.
Currently only the "Write" and "Query" endpoints supports the Gzip compression.
- Returns:
the InfluxDBClientKotlin instance to be able to use it in a fluent manner.
-
disableGzip
abstract InfluxDBClientKotlin disableGzip()
Disable Gzip compress for http request body.
- Returns:
the InfluxDBClientKotlin instance to be able to use it in a fluent manner.
-
isGzipEnabled
abstract Boolean isGzipEnabled()
Returns whether Gzip compress for http request body is enabled.
- Returns:
true if gzip is enabled.
-
-
-
-