Package org.influxdb

Enum InfluxDBFactory

java.lang.Object
java.lang.Enum<InfluxDBFactory>
org.influxdb.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
  • Enum Constant Details

  • Method Details

    • values

      public static InfluxDBFactory[] 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

      public static InfluxDBFactory valueOf​(String name)
      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 name
      NullPointerException - if the argument is null
    • connect

      public static InfluxDB connect​(String url)
      Create a connection to a InfluxDB.
      Parameters:
      url - the url to connect to.
      Returns:
      a InfluxDB adapter suitable to access a InfluxDB.
    • connect

      public static InfluxDB connect​(String url, String username, String password)
      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

      public static InfluxDB connect​(String url, okhttp3.OkHttpClient.Builder client)
      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 use
      responseFormat - The ResponseFormat to use for response from InfluxDB server
      Returns:
      a InfluxDB adapter suitable to access a InfluxDB.