public abstract class AbstractClient extends Object implements Client
Modifier | Constructor and Description |
---|---|
protected |
AbstractClient(String url)
Creates a client
|
Modifier and Type | Method and Description |
---|---|
Response |
delete(QueryBuilder builder)
Deletes data in KairosDB using the query built by the builder.
|
protected abstract org.kairosdb.client.ClientResponse |
delete(String url) |
Response |
deleteMetric(String name)
Deletes a metric.
|
Class |
getDataPointValueClass(String groupType)
Returns the data point value class for the given group type or null if one is not registered for the group type
|
GetResponse |
getMetricNames()
Returns a list of all metric names.
|
GetResponse |
getTagNames()
Returns a list of all tag names.
|
GetResponse |
getTagValues()
Returns a list of all tag values.
|
protected abstract org.kairosdb.client.ClientResponse |
postData(String json,
String url) |
Response |
pushMetrics(MetricBuilder builder)
Sends metrics from the builder to the KairosDB server.
|
QueryResponse |
query(QueryBuilder builder)
Queries KairosDB using the query built by the builder.
|
protected abstract org.kairosdb.client.ClientResponse |
queryData(String url) |
void |
registerCustomDataType(String groupType,
Class dataPointClass)
Registers a new custom data type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRetryCount, shutdown
protected AbstractClient(String url) throws MalformedURLException
url
- url to the KairosDB serverMalformedURLException
public GetResponse getMetricNames() throws IOException
Client
getMetricNames
in interface Client
IOException
- if the JSON returned could not be properly processedpublic GetResponse getTagNames() throws IOException
Client
getTagNames
in interface Client
IOException
- if the JSON returned could not be properly processedpublic GetResponse getTagValues() throws IOException
Client
getTagValues
in interface Client
IOException
- if the JSON returned could not be properly processedpublic QueryResponse query(QueryBuilder builder) throws URISyntaxException, IOException
Client
query
in interface Client
builder
- query builderURISyntaxException
- if the host or post is invalidIOException
- problem occurred querying the serverpublic Response pushMetrics(MetricBuilder builder) throws URISyntaxException, IOException
Client
pushMetrics
in interface Client
builder
- metrics builderURISyntaxException
- if the host or post is invalidIOException
- problem occurred sending to the serverpublic Response deleteMetric(String name) throws IOException
Client
deleteMetric
in interface Client
name
- the metric to deleteIOException
- problem occurred sending to the serverpublic Response delete(QueryBuilder builder) throws URISyntaxException, IOException
Client
delete
in interface Client
builder
- query builderURISyntaxException
- if the host or post is invalidIOException
- problem occurred querying the serverpublic void registerCustomDataType(String groupType, Class dataPointClass)
Client
registerCustomDataType
in interface Client
groupType
- type used to deserialize the json on the clientdataPointClass
- class that is the value of a data pointpublic Class getDataPointValueClass(String groupType)
Client
getDataPointValueClass
in interface Client
groupType
- group typeprotected abstract org.kairosdb.client.ClientResponse postData(String json, String url) throws IOException
IOException
protected abstract org.kairosdb.client.ClientResponse queryData(String url) throws IOException
IOException
protected abstract org.kairosdb.client.ClientResponse delete(String url) throws IOException
IOException
Copyright © 2014. All rights reserved.