@NotThreadSafe public static class InfluxDBClientOptions.Builder extends Object
InfluxDBClientOptions
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
InfluxDBClientOptions.Builder |
addDefaultTag(String key,
String expression)
Add default tag that will be use for writes by Point and POJO.
|
InfluxDBClientOptions.Builder |
authenticate(String username,
char[] password)
Setup authorization by
InfluxDBClientOptions.AuthScheme.SESSION . |
InfluxDBClientOptions.Builder |
authenticateToken(char[] token)
Setup authorization by
InfluxDBClientOptions.AuthScheme.TOKEN . |
InfluxDBClientOptions.Builder |
bucket(String bucket)
Specify the default destination bucket for writes.
|
InfluxDBClientOptions |
build()
Build an instance of InfluxDBClientOptions.
|
InfluxDBClientOptions.Builder |
connectionString(String connectionString)
Configure Builder via connection string.
|
InfluxDBClientOptions.Builder |
loadProperties()
Configure Builder via
influx2.properties . |
InfluxDBClientOptions.Builder |
logLevel(LogLevel logLevel)
Set the log level for the request and response information.
|
InfluxDBClientOptions.Builder |
okHttpClient(okhttp3.OkHttpClient.Builder okHttpClient)
Set the HTTP client to use for communication with InfluxDB.
|
InfluxDBClientOptions.Builder |
org(String org)
Specify the default destination organization for writes and queries.
|
InfluxDBClientOptions.Builder |
url(String url)
Set the url to connect to InfluxDB.
|
@Nonnull public InfluxDBClientOptions.Builder url(@Nonnull String url)
url
- the url to connect to InfluxDB. It must be defined.this
@Nonnull public InfluxDBClientOptions.Builder okHttpClient(@Nonnull okhttp3.OkHttpClient.Builder okHttpClient)
okHttpClient
- the HTTP client to use.this
@Nonnull public InfluxDBClientOptions.Builder logLevel(@Nonnull LogLevel logLevel)
logLevel
- The log level for the request and response information.this
@Nonnull public InfluxDBClientOptions.Builder authenticate(@Nonnull String username, @Nonnull char[] password)
InfluxDBClientOptions.AuthScheme.SESSION
.username
- the username to use in the basic authpassword
- the password to use in the basic auththis
@Nonnull public InfluxDBClientOptions.Builder authenticateToken(char[] token)
InfluxDBClientOptions.AuthScheme.TOKEN
.token
- the token to use for the authorizationthis
@Nonnull public InfluxDBClientOptions.Builder org(@Nullable String org)
org
- the default destination organization for writes and queriesthis
@Nonnull public InfluxDBClientOptions.Builder bucket(@Nullable String bucket)
bucket
- default destination bucket for writesthis
@Nonnull public InfluxDBClientOptions.Builder addDefaultTag(@Nonnull String key, @Nullable String expression)
The expressions can be:
key
- the tag nameexpression
- the tag value expression@Nonnull public InfluxDBClientOptions.Builder connectionString(@Nonnull String connectionString)
this
@Nonnull public InfluxDBClientOptions.Builder loadProperties()
influx2.properties
.this
@Nonnull public InfluxDBClientOptions build()
InfluxDBClientOptions
Copyright © 2018–2019 InfluxData, Inc.. All rights reserved.