THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
已完成
1. write()
write函数有很多接口,主要的适配目标包括:以Point的形式,以String字符串的形式将数据写入数据库中。
已经实现的接口有:
/**
* Write a single Point to the default database.
*/
public void write(final Point point);
/**
* Write a set of Points to the default database with the string records.
*/
public void write(final String records);
/**
* Write a set of Points to the default database with the list of string records.]]
*/
public void write(final List<String> records);
/**
* Write a single Point to the database.
*/
public void write(final String database, final String retentionPolicy, final Point point);
/**
* Write a single Point to the database through UDP.
*/
public void write(final int udpPort, final Point point);
/**
* Write a set of Points to the influxdb database with the new lineprotocol.
*/
public void write(final BatchPoints batchPoints);
/**
* Write a set of Points to the influxdb database with the new lineprotocol.
*
* If batching is enabled with appropriate {@code BatchOptions} settings
* ({@code BatchOptions.bufferLimit} greater than {@code BatchOptions.actions})
* This method will try to retry in case of some recoverable errors.
* Otherwise it just works as {@link #write(BatchPoints)}
*/
public void writeWithRetry(final BatchPoints batchPoints);
/**
* Write a set of Points to the influxdb database with the string records.
*/
public void write(final String database, final String retentionPolicy,
final ConsistencyLevel consistency, final String records);
/**
* Write a set of Points to the influxdb database with the string records.
*/
public void write(final String database, final String retentionPolicy,
final ConsistencyLevel consistency, final TimeUnit precision, final String records);
/**
* Write a set of Points to the influxdb database with the list of string records.
*/
public void write(final String database, final String retentionPolicy,
final ConsistencyLevel consistency, final List<String> records);
/**
* Write a set of Points to the influxdb database with the list of string records.
*/
public void write(final String database, final String retentionPolicy,
final ConsistencyLevel consistency, final TimeUnit precision, final List<String> records);
/**
* Write a set of Points to the influxdb database with the string records through UDP.
*/
public void write(final int udpPort, final String records);
/**
* Write a set of Points to the influxdb database with the list of string records through UDP.
*/
public void write(final int udpPort, final List<String> records);
2. ping()
/**
* Ping this influxDB.
*/
public Pong ping();
3. version()
/**
* Return the version of the connected influxDB Server.
*/
public String version();
4. flush()
/**
* Send any buffered points to InfluxDB. This method is synchronous and will block while all pending points are
* written.
*/
public void flush();
5. close()
/**
* close thread for asynchronous batch write and UDP socket to release resources if need.
*/
public void close();