Package org.influxdb
Enum InfluxDBFactory
- All Implemented Interfaces:
Serializable
,Comparable<InfluxDBFactory>
,java.lang.constant.Constable
public enum InfluxDBFactory extends Enum<InfluxDBFactory>
A Factory to create a instance of a InfluxDB Database adapter.
- Author:
- stefan.majer [at] gmail.com
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
Modifier and Type Method Description static InfluxDB
connect(String url)
Create a connection to a InfluxDB.static InfluxDB
connect(String url, String username, String password)
Create a connection to a InfluxDB.static InfluxDB
connect(String url, String username, String password, okhttp3.OkHttpClient.Builder client)
Create a connection to a InfluxDB.static InfluxDB
connect(String url, String username, String password, okhttp3.OkHttpClient.Builder client, InfluxDB.ResponseFormat responseFormat)
Create a connection to a InfluxDB.static InfluxDB
connect(String url, okhttp3.OkHttpClient.Builder client)
Create a connection to a InfluxDB.static InfluxDBFactory
valueOf(String name)
Returns the enum constant of this type with the specified name.static InfluxDBFactory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
connect
Create a connection to a InfluxDB.- Parameters:
url
- the url to connect to.- Returns:
- a InfluxDB adapter suitable to access a InfluxDB.
-
connect
Create a connection to a InfluxDB.- Parameters:
url
- the url to connect to.username
- the username which is used to authorize against the influxDB instance.password
- the password for the username which is used to authorize against the influxDB instance.- Returns:
- a InfluxDB adapter suitable to access a InfluxDB.
-
connect
Create a connection to a InfluxDB.- Parameters:
url
- the url to connect to.client
- the HTTP client to use- Returns:
- a InfluxDB adapter suitable to access a InfluxDB.
-
connect
public static InfluxDB connect(String url, String username, String password, okhttp3.OkHttpClient.Builder client)Create a connection to a InfluxDB.- Parameters:
url
- the url to connect to.username
- the username which is used to authorize against the influxDB instance.password
- the password for the username which is used to authorize against the influxDB instance.client
- the HTTP client to use- Returns:
- a InfluxDB adapter suitable to access a InfluxDB.
-
connect
public static InfluxDB connect(String url, String username, String password, okhttp3.OkHttpClient.Builder client, InfluxDB.ResponseFormat responseFormat)Create a connection to a InfluxDB.- Parameters:
url
- the url to connect to.username
- the username which is used to authorize against the influxDB instance.password
- the password for the username which is used to authorize against the influxDB instance.client
- the HTTP client to useresponseFormat
- TheResponseFormat
to use for response from InfluxDB server- Returns:
- a InfluxDB adapter suitable to access a InfluxDB.
-