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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDisable Gzip compress for http request body.Enable Gzip compress for http requests.Create a newAuthorizationclient.Create a newBucketclient.Create a newCheckclient.Create a newDashboardclient.Create a new Delete client.TheInfluxQLcan be used with/query compatibilityendpoint which uses thedatabaseandretention policyspecified in the query request to map the request to an InfluxDB bucket.Create an InvokableScripts API instance.Create a newLabelclient.Create a newNotificationEndpointclient.Create a newNotificationRulesclient.Create a newOrganizationclient.Create a new Query client.Create a newScraperTargetResponseclient.<S> SgetService(Class<S> service) Create an implementation of the API endpoints defined by theserviceinterface.Create a newSourceclient.Create a newTaskclient.Create a newTelegrafclient.Create a newUserclient.Create a newVariableclient.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.booleanReturns 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, healthMethods inherited from class com.influxdb.internal.AbstractRestClient
execute, getLogLevel, ping, responseToError, setLogLevel, toInfluxException, versionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.influxdb.client.InfluxDBClient
close
-
Constructor Details
-
InfluxDBClientImpl
-
-
Method Details
-
getQueryApi
Description copied from interface:InfluxDBClientCreate a new Query client.- Specified by:
getQueryApiin interfaceInfluxDBClient- Returns:
- the new client instance for the Query API
-
getWriteApi
Description copied from interface:InfluxDBClientCreate a new asynchronous non-blocking Write client.The
WriteApiuses 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:
getWriteApiin interfaceInfluxDBClient- Returns:
- the new client instance for the Write API
-
getWriteApi
Description copied from interface:InfluxDBClientCreate a new asynchronous non-blocking Write client.- Specified by:
getWriteApiin interfaceInfluxDBClient- Parameters:
writeOptions- the writes configuration- Returns:
- the new client instance for the Write API
-
makeWriteApi
Description copied from interface:InfluxDBClientCreate a new asynchronous non-blocking Write client.The
WriteApiuses 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:
makeWriteApiin interfaceInfluxDBClient- Returns:
- the new client instance for the Write API
-
makeWriteApi
Description copied from interface:InfluxDBClientCreate a new asynchronous non-blocking Write client.The
WriteApiuses 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:
makeWriteApiin interfaceInfluxDBClient- Parameters:
writeOptions- the writes configuration- Returns:
- the new client instance for the Write API
-
getWriteApiBlocking
Description copied from interface:InfluxDBClientCreate a new synchronous blocking Write client.- Specified by:
getWriteApiBlockingin interfaceInfluxDBClient- Returns:
- the new client instance for the Write API
-
getAuthorizationsApi
Description copied from interface:InfluxDBClientCreate a newAuthorizationclient.- Specified by:
getAuthorizationsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Authorization API
-
getBucketsApi
Description copied from interface:InfluxDBClientCreate a newBucketclient.- Specified by:
getBucketsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Bucket API
-
getOrganizationsApi
Description copied from interface:InfluxDBClientCreate a newOrganizationclient.- Specified by:
getOrganizationsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Organization API
-
getSourcesApi
Description copied from interface:InfluxDBClientCreate a newSourceclient.- Specified by:
getSourcesApiin interfaceInfluxDBClient- Returns:
- the new client instance for Source API
-
getTasksApi
Description copied from interface:InfluxDBClientCreate a newTaskclient.- Specified by:
getTasksApiin interfaceInfluxDBClient- Returns:
- the new client instance for Task API
-
getUsersApi
Description copied from interface:InfluxDBClientCreate a newUserclient.- Specified by:
getUsersApiin interfaceInfluxDBClient- Returns:
- the new client instance for User API
-
getScraperTargetsApi
Description copied from interface:InfluxDBClientCreate a newScraperTargetResponseclient.- Specified by:
getScraperTargetsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Scraper API
-
getTelegrafsApi
Description copied from interface:InfluxDBClientCreate a newTelegrafclient.- Specified by:
getTelegrafsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Telegrafs API
-
getLabelsApi
Description copied from interface:InfluxDBClientCreate a newLabelclient.- Specified by:
getLabelsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Label API
-
getVariablesApi
Description copied from interface:InfluxDBClientCreate a newVariableclient.- Specified by:
getVariablesApiin interfaceInfluxDBClient- Returns:
- the new client instance for Variable API
-
getDashboardsApi
Description copied from interface:InfluxDBClientCreate a newDashboardclient.- Specified by:
getDashboardsApiin interfaceInfluxDBClient- Returns:
- the new client instance for Dashboard API
-
getChecksApi
Description copied from interface:InfluxDBClientCreate a newCheckclient.- Specified by:
getChecksApiin interfaceInfluxDBClient- Returns:
- the new client instance for Checks API
-
getNotificationEndpointsApi
Description copied from interface:InfluxDBClientCreate a newNotificationEndpointclient.- Specified by:
getNotificationEndpointsApiin interfaceInfluxDBClient- Returns:
- the new client instance for NotificationEndpoint API
-
getNotificationRulesApi
Description copied from interface:InfluxDBClientCreate a newNotificationRulesclient.- Specified by:
getNotificationRulesApiin interfaceInfluxDBClient- Returns:
- the new client instance for NotificationRules API
-
getDeleteApi
Description copied from interface:InfluxDBClientCreate a new Delete client.- Specified by:
getDeleteApiin interfaceInfluxDBClient- Returns:
- the new client instance for the Delete API
-
getInvokableScriptsApi
Description copied from interface:InfluxDBClientCreate an InvokableScripts API instance.- Specified by:
getInvokableScriptsApiin interfaceInfluxDBClient- Returns:
- InvokableScripts API instance
-
getInfluxQLQueryApi
Description copied from interface:InfluxDBClientTheInfluxQLcan be used with/query compatibilityendpoint which uses thedatabaseandretention policyspecified in the query request to map the request to an InfluxDB bucket.
For more information, see:- Specified by:
getInfluxQLQueryApiin interfaceInfluxDBClient- Returns:
- InfluxQLQuery API instance
-
getService
Description copied from interface:InfluxDBClientCreate an implementation of the API endpoints defined by theserviceinterface.The endpoints are defined in
com.influxdb.client.service.- Specified by:
getServicein interfaceInfluxDBClient- Type Parameters:
S- type of service- Parameters:
service- service to instantiate- Returns:
- instance of service
-
health
Description copied from interface:InfluxDBClientGet the health of an instance.- Specified by:
healthin interfaceInfluxDBClient- Returns:
- health of an instance
-
ping
Description copied from interface:InfluxDBClientCheck the status of InfluxDB Server.- Specified by:
pingin interfaceInfluxDBClient- Returns:
Boolean.TRUEif server is healthy otherwise returnBoolean.FALSE
-
version
Description copied from interface:InfluxDBClientReturns the version of the connected InfluxDB Server.- Specified by:
versionin interfaceInfluxDBClient- Returns:
- the version String, otherwise unknown.
-
ready
Description copied from interface:InfluxDBClientThe readiness of the InfluxDB 2.x.- Specified by:
readyin interfaceInfluxDBClient- Returns:
- return null if the InfluxDB is not ready
-
onBoarding
@Nonnull public OnboardingResponse onBoarding(@Nonnull OnboardingRequest onboarding) throws UnprocessableEntityException Description copied from interface:InfluxDBClientPost onboarding request, to setup initial user, org and bucket.- Specified by:
onBoardingin 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:InfluxDBClientCheck if database has default user, org, bucket created, returns true if not.- Specified by:
isOnboardingAllowedin interfaceInfluxDBClient- Returns:
Boolean.FALSEif onboarding has already been completed otherwiseBoolean.FALSE.
-
getLogLevel
- Specified by:
getLogLevelin interfaceInfluxDBClient- Returns:
- the
LogLevelthat is used for logging requests and responses
-
setLogLevel
Description copied from interface:InfluxDBClientSet the log level for the request and response information.- Specified by:
setLogLevelin 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:InfluxDBClientEnable Gzip compress for http requests.Currently only the "Write" and "Query" endpoints supports the Gzip compression.
- Specified by:
enableGzipin interfaceInfluxDBClient- Returns:
- the
InfluxDBClientinstance to be able to use it in a fluent manner.
-
disableGzip
Description copied from interface:InfluxDBClientDisable Gzip compress for http request body.- Specified by:
disableGzipin interfaceInfluxDBClient- Returns:
- the
InfluxDBClientinstance to be able to use it in a fluent manner.
-
isGzipEnabled
public boolean isGzipEnabled()Description copied from interface:InfluxDBClientReturns whether Gzip compress for http request body is enabled.- Specified by:
isGzipEnabledin interfaceInfluxDBClient- Returns:
- true if gzip is enabled.
-