com.axibase.tsd.client
Class DataService
java.lang.Object
com.axibase.tsd.client.DataService
public class DataService
- extends Object
Provides high-level API to retrieve and update ATSD Data Objects (time-series, alerts, properties).
- Author:
- Nikolay Malevanny.
|
Method Summary |
boolean |
addSeries(AddSeriesCommand... addSeriesCommands)
|
boolean |
addSeriesCsv(String entityName,
String data,
String... tagNamesAndValues)
|
boolean |
batchUpdateAlerts(BatchAlertCommand... commands)
|
boolean |
batchUpdateProperties(BatchPropertyCommand... batchPropertyCommands)
|
boolean |
canSendPlainCommand()
|
boolean |
insertProperties(Property... properties)
|
List<PlainCommand> |
removeSavedPlainCommands()
|
List<AlertHistory> |
retrieveAlertHistory(GetAlertHistoryQuery getAlertHistoryQuery,
GetAlertHistoryQuery... getAlertHistoryQueries)
|
List<Alert> |
retrieveAlerts(GetAlertQuery alertQuery,
GetAlertQuery... alertQueries)
|
List<Alert> |
retrieveAlerts(List<String> metricNames,
List<String> entityNames,
List<String> ruleNames,
List<Integer> severityIds,
Integer minSeverityId)
|
List<GetSeriesResult> |
retrieveLastSeries(GetSeriesQuery... seriesQueries)
|
List<Property> |
retrieveProperties(GetPropertiesQuery getPropertiesQuery,
GetPropertiesQuery... getPropertiesQueries)
|
List<Property> |
retrieveProperties(String entityName,
String typeName)
|
List<GetSeriesResult> |
retrieveSeries(GetSeriesQuery... seriesQueries)
|
List<GetSeriesResult> |
retrieveSeries(SeriesCommandPreparer preparer,
GetSeriesQuery... seriesQueries)
|
void |
sendPlainCommand(PlainCommand plainCommand)
|
void |
setHttpClientManager(HttpClientManager httpClientManager)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAST_PREPARER
public static final SeriesCommandPreparer LAST_PREPARER
DataService
public DataService()
DataService
public DataService(HttpClientManager httpClientManager)
setHttpClientManager
public void setHttpClientManager(HttpClientManager httpClientManager)
retrieveSeries
public List<GetSeriesResult> retrieveSeries(GetSeriesQuery... seriesQueries)
- Parameters:
seriesQueries - queries with details, each query property overrides common one in the request parameters
- Returns:
- list of
GetSeriesResult
retrieveSeries
public List<GetSeriesResult> retrieveSeries(SeriesCommandPreparer preparer,
GetSeriesQuery... seriesQueries)
addSeries
public boolean addSeries(AddSeriesCommand... addSeriesCommands)
- Parameters:
addSeriesCommands - commands that contains time-series which are added
- Returns:
- true if success
addSeriesCsv
public boolean addSeriesCsv(String entityName,
String data,
String... tagNamesAndValues)
- Parameters:
entityName - entity namedata - CSV as StringtagNamesAndValues - entity tags
- Returns:
- true if success
retrieveLastSeries
public List<GetSeriesResult> retrieveLastSeries(GetSeriesQuery... seriesQueries)
- Parameters:
seriesQueries - queries with details
- Returns:
- list of
GetSeriesResult
retrieveProperties
public List<Property> retrieveProperties(GetPropertiesQuery getPropertiesQuery,
GetPropertiesQuery... getPropertiesQueries)
- Parameters:
getPropertiesQuery - command with property filter parameters
- Returns:
- list of
Property
retrieveProperties
public List<Property> retrieveProperties(String entityName,
String typeName)
- Parameters:
entityName - entity nametypeName - property type name
- Returns:
- properties for entity and type
insertProperties
public boolean insertProperties(Property... properties)
- Parameters:
properties - list of Property to add.
- Returns:
- true if success
batchUpdateProperties
public boolean batchUpdateProperties(BatchPropertyCommand... batchPropertyCommands)
- Parameters:
batchPropertyCommands - list of batch commands to mass update properties
- Returns:
- true if success
retrieveAlerts
public List<Alert> retrieveAlerts(List<String> metricNames,
List<String> entityNames,
List<String> ruleNames,
List<Integer> severityIds,
Integer minSeverityId)
- Parameters:
metricNames - metric filter, multiple values allowedentityNames - entity filter, multiple values allowedruleNames - rule filter, multiple values allowedseverityIds - severity filter, multiple values allowedminSeverityId - minimal severity filter
- Returns:
- list of
Alert
retrieveAlerts
public List<Alert> retrieveAlerts(GetAlertQuery alertQuery,
GetAlertQuery... alertQueries)
retrieveAlertHistory
public List<AlertHistory> retrieveAlertHistory(GetAlertHistoryQuery getAlertHistoryQuery,
GetAlertHistoryQuery... getAlertHistoryQueries)
- Parameters:
getAlertHistoryQuery - command with alert history selection details
- Returns:
- list of
AlertHistory
batchUpdateAlerts
public boolean batchUpdateAlerts(BatchAlertCommand... commands)
sendPlainCommand
public void sendPlainCommand(PlainCommand plainCommand)
throws AtsdClientException,
AtsdServerException
- Throws:
AtsdClientException
AtsdServerException
canSendPlainCommand
public boolean canSendPlainCommand()
removeSavedPlainCommands
public List<PlainCommand> removeSavedPlainCommands()
Copyright © 2015. All rights reserved.