InfluxDB.ConsistencyLevel, InfluxDB.LogLevel
Constructor and Description |
---|
InfluxDBImpl(String url,
String username,
String password,
okhttp3.OkHttpClient.Builder client) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close thread for asynchronous batch write and UDP socket to release resources if need.
|
void |
createDatabase(String name)
Create a new Database.
|
void |
deleteDatabase(String name)
Delete a database.
|
List<String> |
describeDatabases()
Describe all available databases.
|
void |
disableBatch()
Disable Batching.
|
InfluxDB |
disableGzip()
Disable Gzip compress for http request body.
|
InfluxDB |
enableBatch(int actions,
int flushDuration,
TimeUnit flushDurationTimeUnit)
Enable batching of single Point writes as
InfluxDB.enableBatch(int, int, TimeUnit, ThreadFactory) }
using default thread factory. |
InfluxDB |
enableBatch(int actions,
int flushDuration,
TimeUnit flushDurationTimeUnit,
ThreadFactory threadFactory)
Enable batching of single Point writes to speed up writes significant.
|
InfluxDB |
enableGzip()
Enable Gzip compress for http request body.
|
boolean |
isBatchEnabled()
Returns whether Batching is enabled.
|
boolean |
isGzipEnabled()
Returns whether Gzip compress for http request body is enabled.
|
Pong |
ping()
Ping this influxDB.
|
QueryResult |
query(Query query)
Execute a query against a database.
|
QueryResult |
query(Query query,
TimeUnit timeUnit)
Execute a query against a database.
|
InfluxDB |
setLogLevel(InfluxDB.LogLevel logLevel)
Set the loglevel which is used for REST related actions.
|
String |
version()
Return the version of the connected influxDB Server.
|
void |
write(BatchPoints batchPoints)
Write a set of Points to the influxdb database with the new (>= 0.9.0rc32) lineprotocol.
|
void |
write(int udpPort,
List<String> records)
Write a set of Points to the influxdb database with the list of string records through UDP.
|
void |
write(int udpPort,
Point point)
Write a single Point to the database through UDP.
|
void |
write(int udpPort,
String records)
Write a set of Points to the influxdb database with the string records through UDP.
|
void |
write(String database,
String retentionPolicy,
InfluxDB.ConsistencyLevel consistency,
List<String> records)
Write a set of Points to the influxdb database with the list of string records.
|
void |
write(String database,
String retentionPolicy,
InfluxDB.ConsistencyLevel consistency,
String records)
Write a set of Points to the influxdb database with the string records.
|
void |
write(String database,
String retentionPolicy,
Point point)
Write a single Point to the database.
|
public InfluxDB setLogLevel(InfluxDB.LogLevel logLevel)
InfluxDB
setLogLevel
in interface InfluxDB
logLevel
- the loglevel to set.public InfluxDB enableGzip()
enableGzip
in interface InfluxDB
public InfluxDB disableGzip()
disableGzip
in interface InfluxDB
public boolean isGzipEnabled()
isGzipEnabled
in interface InfluxDB
public InfluxDB enableBatch(int actions, int flushDuration, TimeUnit flushDurationTimeUnit)
InfluxDB
InfluxDB.enableBatch(int, int, TimeUnit, ThreadFactory)
}
using default thread factory.enableBatch
in interface InfluxDB
InfluxDB.enableBatch(int, int, TimeUnit, ThreadFactory)
public InfluxDB enableBatch(int actions, int flushDuration, TimeUnit flushDurationTimeUnit, ThreadFactory threadFactory)
InfluxDB
enableBatch
in interface InfluxDB
actions
- the number of actions to collectflushDuration
- the time to wait at most.public void disableBatch()
InfluxDB
disableBatch
in interface InfluxDB
public boolean isBatchEnabled()
InfluxDB
isBatchEnabled
in interface InfluxDB
public String version()
InfluxDB
public void write(String database, String retentionPolicy, Point point)
InfluxDB
public void write(int udpPort, Point point)
public void write(BatchPoints batchPoints)
InfluxDB
public void write(String database, String retentionPolicy, InfluxDB.ConsistencyLevel consistency, String records)
InfluxDB
public void write(String database, String retentionPolicy, InfluxDB.ConsistencyLevel consistency, List<String> records)
InfluxDB
public void write(int udpPort, String records)
public void write(int udpPort, List<String> records)
public QueryResult query(Query query)
public QueryResult query(Query query, TimeUnit timeUnit)
public void createDatabase(String name)
createDatabase
in interface InfluxDB
name
- the name of the new database.public void deleteDatabase(String name)
deleteDatabase
in interface InfluxDB
name
- the name of the database to delete.public List<String> describeDatabases()
describeDatabases
in interface InfluxDB
Copyright © 2016. All rights reserved.