Package com.influxdb.client.internal
Class InfluxDBClientImpl
java.lang.Object
com.influxdb.internal.AbstractRestClient
com.influxdb.client.internal.AbstractInfluxDBClient
com.influxdb.client.internal.InfluxDBClientImpl
- All Implemented Interfaces:
InfluxDBClient
,AutoCloseable
- Author:
- Jakub Bednar (bednar@github) (11/10/2018 09:36)
-
Field Summary
Fields inherited from class com.influxdb.client.internal.AbstractInfluxDBClient
autoCloseables, DEFAULT_DIALECT, gzipInterceptor, healthService, loggingInterceptor, options, pingService, retrofit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDisable Gzip compress for http request body.Enable Gzip compress for http requests.Create a newAuthorization
client.Create a newBucket
client.Create a newCheck
client.Create a newDashboard
client.Create a new Delete client.TheInfluxQL
can be used with/query compatibility
endpoint which uses thedatabase
andretention policy
specified in the query request to map the request to an InfluxDB bucket.Create an InvokableScripts API instance.Create a newLabel
client.Create a newNotificationEndpoint
client.Create a newNotificationRules
client.Create a newOrganization
client.Create a new Query client.Create a newScraperTargetResponse
client.<S> S
getService
(Class<S> service) Create an implementation of the API endpoints defined by theservice
interface.Create a newSource
client.Create a newTask
client.Create a newTelegraf
client.Create a newUser
client.Create a newVariable
client.Create a new asynchronous non-blocking Write client.getWriteApi
(WriteOptions writeOptions) Create a new asynchronous non-blocking Write client.Create a new synchronous blocking Write client.health()
Get the health of an instance.boolean
Returns whether Gzip compress for http request body is enabled.Check if database has default user, org, bucket created, returns true if not.Create a new asynchronous non-blocking Write client.makeWriteApi
(WriteOptions writeOptions) Create a new asynchronous non-blocking Write client.onBoarding
(OnboardingRequest onboarding) Post onboarding request, to setup initial user, org and bucket.ping()
Check the status of InfluxDB Server.ready()
The readiness of the InfluxDB 2.x.setLogLevel
(LogLevel logLevel) Set the log level for the request and response information.version()
Returns the version of the connected InfluxDB Server.Methods inherited from class com.influxdb.client.internal.AbstractInfluxDBClient
close, health
Methods inherited from class com.influxdb.internal.AbstractRestClient
execute, getLogLevel, ping, responseToError, setLogLevel, toInfluxException, version
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.influxdb.client.InfluxDBClient
close
-
Constructor Details
-
InfluxDBClientImpl
-
-
Method Details
-
getQueryApi
Description copied from interface:InfluxDBClient
Create a new Query client.- Specified by:
getQueryApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for the Query API
-
getWriteApi
Description copied from interface:InfluxDBClient
Create a new asynchronous non-blocking Write client.The
WriteApi
uses background thread to ingesting data into InfluxDB and is suppose to run as a singleton. Don't create new instance for every write.- Specified by:
getWriteApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for the Write API
-
getWriteApi
Description copied from interface:InfluxDBClient
Create a new asynchronous non-blocking Write client.- Specified by:
getWriteApi
in interfaceInfluxDBClient
- Parameters:
writeOptions
- the writes configuration- Returns:
- the new client instance for the Write API
-
makeWriteApi
Description copied from interface:InfluxDBClient
Create a new asynchronous non-blocking Write client.The
WriteApi
uses background thread to ingesting data into InfluxDB and is suppose to run as a singleton. Don't create new instance for every write.- Specified by:
makeWriteApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for the Write API
-
makeWriteApi
Description copied from interface:InfluxDBClient
Create a new asynchronous non-blocking Write client.The
WriteApi
uses background thread to ingesting data into InfluxDB and is suppose to run as a singleton. Don't create new instance for every write.- Specified by:
makeWriteApi
in interfaceInfluxDBClient
- Parameters:
writeOptions
- the writes configuration- Returns:
- the new client instance for the Write API
-
getWriteApiBlocking
Description copied from interface:InfluxDBClient
Create a new synchronous blocking Write client.- Specified by:
getWriteApiBlocking
in interfaceInfluxDBClient
- Returns:
- the new client instance for the Write API
-
getAuthorizationsApi
Description copied from interface:InfluxDBClient
Create a newAuthorization
client.- Specified by:
getAuthorizationsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Authorization API
-
getBucketsApi
Description copied from interface:InfluxDBClient
Create a newBucket
client.- Specified by:
getBucketsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Bucket API
-
getOrganizationsApi
Description copied from interface:InfluxDBClient
Create a newOrganization
client.- Specified by:
getOrganizationsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Organization API
-
getSourcesApi
Description copied from interface:InfluxDBClient
Create a newSource
client.- Specified by:
getSourcesApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Source API
-
getTasksApi
Description copied from interface:InfluxDBClient
Create a newTask
client.- Specified by:
getTasksApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Task API
-
getUsersApi
Description copied from interface:InfluxDBClient
Create a newUser
client.- Specified by:
getUsersApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for User API
-
getScraperTargetsApi
Description copied from interface:InfluxDBClient
Create a newScraperTargetResponse
client.- Specified by:
getScraperTargetsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Scraper API
-
getTelegrafsApi
Description copied from interface:InfluxDBClient
Create a newTelegraf
client.- Specified by:
getTelegrafsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Telegrafs API
-
getLabelsApi
Description copied from interface:InfluxDBClient
Create a newLabel
client.- Specified by:
getLabelsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Label API
-
getVariablesApi
Description copied from interface:InfluxDBClient
Create a newVariable
client.- Specified by:
getVariablesApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Variable API
-
getDashboardsApi
Description copied from interface:InfluxDBClient
Create a newDashboard
client.- Specified by:
getDashboardsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Dashboard API
-
getChecksApi
Description copied from interface:InfluxDBClient
Create a newCheck
client.- Specified by:
getChecksApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for Checks API
-
getNotificationEndpointsApi
Description copied from interface:InfluxDBClient
Create a newNotificationEndpoint
client.- Specified by:
getNotificationEndpointsApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for NotificationEndpoint API
-
getNotificationRulesApi
Description copied from interface:InfluxDBClient
Create a newNotificationRules
client.- Specified by:
getNotificationRulesApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for NotificationRules API
-
getDeleteApi
Description copied from interface:InfluxDBClient
Create a new Delete client.- Specified by:
getDeleteApi
in interfaceInfluxDBClient
- Returns:
- the new client instance for the Delete API
-
getInvokableScriptsApi
Description copied from interface:InfluxDBClient
Create an InvokableScripts API instance.- Specified by:
getInvokableScriptsApi
in interfaceInfluxDBClient
- Returns:
- InvokableScripts API instance
-
getInfluxQLQueryApi
Description copied from interface:InfluxDBClient
TheInfluxQL
can be used with/query compatibility
endpoint which uses thedatabase
andretention policy
specified in the query request to map the request to an InfluxDB bucket.
For more information, see:- Specified by:
getInfluxQLQueryApi
in interfaceInfluxDBClient
- Returns:
- InfluxQLQuery API instance
-
getService
Description copied from interface:InfluxDBClient
Create an implementation of the API endpoints defined by theservice
interface.The endpoints are defined in
com.influxdb.client.service
.- Specified by:
getService
in interfaceInfluxDBClient
- Type Parameters:
S
- type of service- Parameters:
service
- service to instantiate- Returns:
- instance of service
-
health
Description copied from interface:InfluxDBClient
Get the health of an instance.- Specified by:
health
in interfaceInfluxDBClient
- Returns:
- health of an instance
-
ping
Description copied from interface:InfluxDBClient
Check the status of InfluxDB Server.- Specified by:
ping
in interfaceInfluxDBClient
- Returns:
Boolean.TRUE
if server is healthy otherwise returnBoolean.FALSE
-
version
Description copied from interface:InfluxDBClient
Returns the version of the connected InfluxDB Server.- Specified by:
version
in interfaceInfluxDBClient
- Returns:
- the version String, otherwise unknown.
-
ready
Description copied from interface:InfluxDBClient
The readiness of the InfluxDB 2.x.- Specified by:
ready
in interfaceInfluxDBClient
- Returns:
- return null if the InfluxDB is not ready
-
onBoarding
@Nonnull public OnboardingResponse onBoarding(@Nonnull OnboardingRequest onboarding) throws UnprocessableEntityException Description copied from interface:InfluxDBClient
Post onboarding request, to setup initial user, org and bucket.- Specified by:
onBoarding
in interfaceInfluxDBClient
- Parameters:
onboarding
- to setup defaults- Returns:
- defaults for first run
- Throws:
UnprocessableEntityException
- when an onboarding has already been completed
-
isOnboardingAllowed
Description copied from interface:InfluxDBClient
Check if database has default user, org, bucket created, returns true if not.- Specified by:
isOnboardingAllowed
in interfaceInfluxDBClient
- Returns:
Boolean.FALSE
if onboarding has already been completed otherwiseBoolean.FALSE
.
-
getLogLevel
- Specified by:
getLogLevel
in interfaceInfluxDBClient
- Returns:
- the
LogLevel
that is used for logging requests and responses
-
setLogLevel
Description copied from interface:InfluxDBClient
Set the log level for the request and response information.- Specified by:
setLogLevel
in interfaceInfluxDBClient
- Parameters:
logLevel
- the log level to set.- Returns:
- the InfluxDBClient instance to be able to use it in a fluent manner.
-
enableGzip
Description copied from interface:InfluxDBClient
Enable Gzip compress for http requests.Currently only the "Write" and "Query" endpoints supports the Gzip compression.
- Specified by:
enableGzip
in interfaceInfluxDBClient
- Returns:
- the
InfluxDBClient
instance to be able to use it in a fluent manner.
-
disableGzip
Description copied from interface:InfluxDBClient
Disable Gzip compress for http request body.- Specified by:
disableGzip
in interfaceInfluxDBClient
- Returns:
- the
InfluxDBClient
instance to be able to use it in a fluent manner.
-
isGzipEnabled
public boolean isGzipEnabled()Description copied from interface:InfluxDBClient
Returns whether Gzip compress for http request body is enabled.- Specified by:
isGzipEnabled
in interfaceInfluxDBClient
- Returns:
- true if gzip is enabled.
-