Class name: com.aliyun.hitsdb.client.HiTSDBClient
- java.lang.Object
- com.aliyun.hitsdb.client.HiTSDBClient
- All implemented interfaces:
- HiTSDB, Closeable, AutoCloseable
Builder Essentials
Builder and explanation HiTSDBClient(HiTSDBConfig config)
Method Essentials
Qualifier and type Method and explanation void
close()
Shut down the HiTSDB client.void
close(boolean force)
Shut down the HiTSDB client.void
delete(Query query)
Data deletion method. This method is currently not enabled!void
deleteData(String metric, Date startDate, Date endDate)
Delete data. Specifies the Metric and time range of data to delete.void
deleteData(String metric, long startTime, long endTime)
Delete data. Specifies the Metric and time range of data to delete.void
deleteMeta(String metric, Map<String,String> tags)
Delete the timeline and all of its associated data.void
deleteMeta(Timeline timeline)
Delete the timeline and all of its associated data.List<TagResult>
dumpMeta(String tagkey, String tagValuePrefix, int max)
Get tag-related information.List<QueryResult>
last(Query query,int num)
Data query methods.List<LastDPValue>
lastdp(Collection<Timeline> timelines)
Returns the last value of a timeline.List<LastDPValue>
lastdp(Timeline… timelines)
Returns the last value of a timeline.void
put(Point… points)
Put time points into HiTSDB asynchronously.void
put(Point point)
Put time points into HiTSDB asynchronously.<T extends Result>
TputSync(Class<T> resultType, Collection<Point> points)
Put time points into HiTSDB synchronously.<T extends Result>
TputSync(Class<T> resultType, Point… points)
Put time points into HiTSDB synchronously.Result
putSync(Collection<Point> points)
Put time points into HiTSDB synchronously.<T extends Result>
TputSync(Collection<Point> points, Class<T> resultType)
Put time points into HiTSDB synchronously.Result
putSync(Point… points)
Put time points into HiTSDB synchronously.List<QueryResult>
query(Query query)
Data query methodsvoid
query(Query query, QueryCallback callback)
Data query methodsList<String>
suggest(Suggest type, String prefix, int max)
This method is used to query metric lists if data meet conditionsint
ttl()
Method to obtain the TTL value. Unit: secondsvoid
ttl(int lifetime)
Method to set the TTL value. Unit: secondsvoid
ttl(int lifetime,TimeUnit unit)
Builder details
HiTSDBClient
- public HiTSDBClient(HiTSDBConfig config) throws HttpClientInitException
- throws:
HttpClientInitException
Method details
close
- public void close() throws IOException
- Specifier:
close
Specifier:Closeable
- Specifier:
close
Specifier:AutoCloseable
- throws:
IOException
close
- public void close(boolean force) throws IOException
Explanations of replicating from interfaces:HiTSDB
Close the HiTSDB instance. Call this method before the program ends.- Specifier:
close
Specifier:HiTSDB
- Parameters:
force
- true or false- throws:
IOException
- exception
deleteData
- public void deleteData(String metric, long startTime, long endTime)
- Specifier:
deleteData
Specifier:HiTSDB
- Parameters:
metric
- metricstartTime
- start timestampendTime
- end timestamp
deleteData
Explanations of replicating from interfaces:HiTSDB
Delete all data of the specified metric and time range.- Specifier:
deleteData
Specifier:HiTSDB
- Parameters:
metric
- metric namestartDate
- start dateendDate
- end date
deleteMeta
Explanations of replicating from interfaces:HiTSDB
Delete timeline data.- Specifier:
deleteMeta
Specifier:HiTSDB
- Parameters:
metric
- Metric, name of measure, name of indicatortags
- Map-denoted Tag key-value pair.
deleteMeta
- public void deleteMeta(Timeline timeline)
Explanations of replicating from interfaces:HiTSDB
Delete timeline data./div>- Specifier:
deleteMeta
Specifier:HiTSDB
- Parameters:
timeline
- Instance of the timeline class.
dumpMeta
Explanations of replicating from interfaces:HiTSDB
Get the list of tags that meet conditions
put
- public void put(Point point)
Explanations of replicating from interfaces:HiTSDB
Put data asynchronously
query
- public List<QueryResult> query(Query query)
Explanations of replicating from interfaces:HiTSDB
Query data
query
- public void query(Query query, QueryCallback callback)
Explanations of replicating from interfaces:HiTSDB
Asynchronous query method, which returns the query results in callback.
suggest
Explanations of replicating from interfaces:HiTSDB
suggest method
ttl
- public int ttl()
Explanations of replicating from interfaces:HiTSDB
Obtain the TTL value. Unit: seconds
ttl
- public void ttl(int lifetime)
Explanations of replicating from interfaces:HiTSDB
Set the TTL value.
ttl
- public void ttl(int lifetime, TimeUnit unit)
last
- public List<QueryResult> last(Query query, int num) throws HttpUnknowStatusException
- Specifier:
last
Specifier:HiTSDB
- Parameters:
query
- Instance of the Query class.num
- The quantity of final points on the timeline of the required query results- Return:
- Query result list
- throws
HttpUnknowStatusException
- Exception
putSync
- public Result putSync(Collection<Point> points)
Explanations of replicating from interfaces:HiTSDB
Put the time points synchronously
putSync
- public <T extends Result> T putSync(Collection<Point> points, Class<T> resultType)
Explanations of replicating from interfaces:HiTSDB
Synchronous putting method
delete
- public void delete(Query query) throws HttpUnknowStatusException
Explanations of replicating from interfaces:HiTSDB
Deletion method, which has not been enabled.- Specifier:
delete
Specifier:HiTSDB
- Parameters:
query
- query- throws
HttpUnknowStatusException
- Exception
lastdp
- public List<LastDPValue> lastdp(Collection<Timeline> timelines) throws HttpUnknowStatusException
Explanations of replicating from interfaces:HiTSDB
Get the last data point of a specified timeline.- Specifier:
lastdp
Specifier:HiTSDB
- Parameters:
timelines
- Timelines instance.- Return:
- Result
- throws
HttpUnknowStatusException
- Exception
lastdp
- public List<LastDPValue> lastdp(Timeline… timelines) throws HttpUnknowStatusException
Explanations of replicating from interfaces:HiTSDB
Get the last data point of a specified timeline.- Specifier:
lastdp
Specifier:HiTSDB
- Parameters:
timelines
- Timeline value.- Return:
- List
- throws
HttpUnknowStatusException
- Exception
put
- public void put(Point… points)
Explanations of replicating from interfaces:HiTSDB
Put time points asynchronously
putSync
Explanations of replicating from interfaces:HiTSDB
Put time points synchronously
putSync
- public <T extends Result> T putSync(Class<T> resultType, Collection<Point> points)
Explanations of replicating from interfaces:HiTSDB
Put synchronously
putSync
Explanations of replicating from interfaces:HiTSDB
Synchronous putting method