public final class InfluxDBClientImpl extends AbstractInfluxDBClient implements InfluxDBClient
autoCloseables, DEFAULT_DIALECT, gzipInterceptor, healthService, loggingInterceptor, options, pingService, retrofit
Constructor and Description |
---|
InfluxDBClientImpl(InfluxDBClientOptions options) |
Modifier and Type | Method and Description |
---|---|
InfluxDBClient |
disableGzip()
Disable Gzip compress for http request body.
|
InfluxDBClient |
enableGzip()
Enable Gzip compress for http requests.
|
AuthorizationsApi |
getAuthorizationsApi()
Create a new
Authorization client. |
BucketsApi |
getBucketsApi()
Create a new
Bucket client. |
ChecksApi |
getChecksApi()
Create a new
Check client. |
DashboardsApi |
getDashboardsApi()
Create a new
Dashboard client. |
DeleteApi |
getDeleteApi()
Create a new Delete client.
|
InfluxQLQueryApi |
getInfluxQLQueryApi()
The
InfluxQL can be used with /query compatibility endpoint which uses the
database and
retention policy specified in the query request to
map the request to an InfluxDB bucket. |
InvokableScriptsApi |
getInvokableScriptsApi()
Create an InvokableScripts API instance.
|
LabelsApi |
getLabelsApi()
Create a new
Label client. |
LogLevel |
getLogLevel() |
NotificationEndpointsApi |
getNotificationEndpointsApi()
Create a new
NotificationEndpoint client. |
NotificationRulesApi |
getNotificationRulesApi()
Create a new
NotificationRules client. |
OrganizationsApi |
getOrganizationsApi()
Create a new
Organization client. |
QueryApi |
getQueryApi()
Create a new Query client.
|
ScraperTargetsApi |
getScraperTargetsApi()
Create a new
ScraperTargetResponse client. |
<S> S |
getService(Class<S> service)
Create an implementation of the API endpoints defined by the
service interface. |
SourcesApi |
getSourcesApi()
Create a new
Source client. |
TasksApi |
getTasksApi()
Create a new
Task client. |
TelegrafsApi |
getTelegrafsApi()
Create a new
Telegraf client. |
UsersApi |
getUsersApi()
Create a new
User client. |
VariablesApi |
getVariablesApi()
Create a new
Variable client. |
WriteApi |
getWriteApi()
Create a new asynchronous non-blocking Write client.
|
WriteApi |
getWriteApi(WriteOptions writeOptions)
Create a new asynchronous non-blocking Write client.
|
WriteApiBlocking |
getWriteApiBlocking()
Create a new synchronous blocking Write client.
|
HealthCheck |
health()
Get the health of an instance.
|
boolean |
isGzipEnabled()
Returns whether Gzip compress for http request body is enabled.
|
Boolean |
isOnboardingAllowed()
Check if database has default user, org, bucket created, returns true if not.
|
WriteApi |
makeWriteApi()
Create a new asynchronous non-blocking Write client.
|
WriteApi |
makeWriteApi(WriteOptions writeOptions)
Create a new asynchronous non-blocking Write client.
|
OnboardingResponse |
onBoarding(OnboardingRequest onboarding)
Post onboarding request, to setup initial user, org and bucket.
|
Boolean |
ping()
Check the status of InfluxDB Server.
|
Ready |
ready()
The readiness of the InfluxDB 2.x.
|
InfluxDBClient |
setLogLevel(LogLevel logLevel)
Set the log level for the request and response information.
|
String |
version()
Returns the version of the connected InfluxDB Server.
|
close, health
execute, getLogLevel, ping, responseToError, setLogLevel, toInfluxException, version
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public InfluxDBClientImpl(@Nonnull InfluxDBClientOptions options)
@Nonnull public QueryApi getQueryApi()
InfluxDBClient
getQueryApi
in interface InfluxDBClient
@Nonnull public WriteApi getWriteApi()
InfluxDBClient
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.
getWriteApi
in interface InfluxDBClient
@Nonnull public WriteApi getWriteApi(@Nonnull WriteOptions writeOptions)
InfluxDBClient
getWriteApi
in interface InfluxDBClient
writeOptions
- the writes configuration@Nonnull public WriteApi makeWriteApi()
InfluxDBClient
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.
makeWriteApi
in interface InfluxDBClient
@Nonnull public WriteApi makeWriteApi(@Nonnull WriteOptions writeOptions)
InfluxDBClient
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.
makeWriteApi
in interface InfluxDBClient
writeOptions
- the writes configuration@Nonnull public WriteApiBlocking getWriteApiBlocking()
InfluxDBClient
getWriteApiBlocking
in interface InfluxDBClient
@Nonnull public AuthorizationsApi getAuthorizationsApi()
InfluxDBClient
Authorization
client.getAuthorizationsApi
in interface InfluxDBClient
@Nonnull public BucketsApi getBucketsApi()
InfluxDBClient
Bucket
client.getBucketsApi
in interface InfluxDBClient
@Nonnull public OrganizationsApi getOrganizationsApi()
InfluxDBClient
Organization
client.getOrganizationsApi
in interface InfluxDBClient
@Nonnull public SourcesApi getSourcesApi()
InfluxDBClient
Source
client.getSourcesApi
in interface InfluxDBClient
@Nonnull public TasksApi getTasksApi()
InfluxDBClient
Task
client.getTasksApi
in interface InfluxDBClient
@Nonnull public UsersApi getUsersApi()
InfluxDBClient
User
client.getUsersApi
in interface InfluxDBClient
@Nonnull public ScraperTargetsApi getScraperTargetsApi()
InfluxDBClient
ScraperTargetResponse
client.getScraperTargetsApi
in interface InfluxDBClient
@Nonnull public TelegrafsApi getTelegrafsApi()
InfluxDBClient
Telegraf
client.getTelegrafsApi
in interface InfluxDBClient
@Nonnull public LabelsApi getLabelsApi()
InfluxDBClient
Label
client.getLabelsApi
in interface InfluxDBClient
@Nonnull public VariablesApi getVariablesApi()
InfluxDBClient
Variable
client.getVariablesApi
in interface InfluxDBClient
@Nonnull public DashboardsApi getDashboardsApi()
InfluxDBClient
Dashboard
client.getDashboardsApi
in interface InfluxDBClient
@Nonnull public ChecksApi getChecksApi()
InfluxDBClient
Check
client.getChecksApi
in interface InfluxDBClient
@Nonnull public NotificationEndpointsApi getNotificationEndpointsApi()
InfluxDBClient
NotificationEndpoint
client.getNotificationEndpointsApi
in interface InfluxDBClient
@Nonnull public NotificationRulesApi getNotificationRulesApi()
InfluxDBClient
NotificationRules
client.getNotificationRulesApi
in interface InfluxDBClient
@Nonnull public DeleteApi getDeleteApi()
InfluxDBClient
getDeleteApi
in interface InfluxDBClient
@Nonnull public InvokableScriptsApi getInvokableScriptsApi()
InfluxDBClient
getInvokableScriptsApi
in interface InfluxDBClient
@Nonnull public InfluxQLQueryApi getInfluxQLQueryApi()
InfluxDBClient
InfluxQL
can be used with /query compatibility
endpoint which uses the
database
and
retention policy
specified in the query request to
map the request to an InfluxDB bucket.
getInfluxQLQueryApi
in interface InfluxDBClient
@Nonnull public <S> S getService(@Nonnull Class<S> service)
InfluxDBClient
service
interface.
The endpoints are defined in com.influxdb.client.service
.
getService
in interface InfluxDBClient
S
- type of serviceservice
- service to instantiate@Nonnull public HealthCheck health()
InfluxDBClient
health
in interface InfluxDBClient
@Nonnull public Boolean ping()
InfluxDBClient
ping
in interface InfluxDBClient
Boolean.TRUE
if server is healthy otherwise return Boolean.FALSE
@Nonnull public String version()
InfluxDBClient
version
in interface InfluxDBClient
@Nullable public Ready ready()
InfluxDBClient
ready
in interface InfluxDBClient
@Nonnull public OnboardingResponse onBoarding(@Nonnull OnboardingRequest onboarding) throws UnprocessableEntityException
InfluxDBClient
onBoarding
in interface InfluxDBClient
onboarding
- to setup defaultsUnprocessableEntityException
- when an onboarding has already been completed@Nonnull public Boolean isOnboardingAllowed()
InfluxDBClient
isOnboardingAllowed
in interface InfluxDBClient
Boolean.FALSE
if onboarding has already been completed otherwise Boolean.FALSE
.@Nonnull public LogLevel getLogLevel()
getLogLevel
in interface InfluxDBClient
LogLevel
that is used for logging requests and responses@Nonnull public InfluxDBClient setLogLevel(@Nonnull LogLevel logLevel)
InfluxDBClient
setLogLevel
in interface InfluxDBClient
logLevel
- the log level to set.@Nonnull public InfluxDBClient enableGzip()
InfluxDBClient
Currently only the "Write" and "Query" endpoints supports the Gzip compression.
enableGzip
in interface InfluxDBClient
InfluxDBClient
instance to be able to use it in a fluent manner.@Nonnull public InfluxDBClient disableGzip()
InfluxDBClient
disableGzip
in interface InfluxDBClient
InfluxDBClient
instance to be able to use it in a fluent manner.public boolean isGzipEnabled()
InfluxDBClient
isGzipEnabled
in interface InfluxDBClient
Copyright © 2018–2022 InfluxData, Inc.. All rights reserved.