public interface InfluxDBService
| Modifier and Type | Method and Description |
|---|---|
boolean |
createDB(java.lang.String dbName)
Creates an InfluxDB with the given name, in case it does not exist.
|
java.util.List<EObject> |
getEObjectQuery(java.lang.String measurement,
java.lang.String dbName,
java.lang.String idTag,
java.lang.String idTagValue,
EClass eclass,
java.lang.Long startDate,
java.lang.Long endDate)
Returns the list of EObject of class eclass saved in the DB with the specified name
and under the specified measurement
|
java.util.List<?> |
getQuery(java.lang.String measurement,
java.lang.String dbName,
java.lang.Class<?> clazz)
Returns the list of Pojo objects of class clazz saved in the DB with the specified name
and under the specified measurement
|
java.util.Map<java.lang.String,java.util.List<EObject>> |
getSeriesMap(java.lang.String measurement,
java.lang.String dbName,
java.lang.String idTag,
EClass eclass,
java.lang.Long startDate,
java.lang.Long endDate)
Returns a map where the key is the value of the idTag and the value is a list of EObject of class eclass,
which have been retrieved from the influxDB and converted throught the mapper.
|
long |
getTimeShift(java.lang.String dbName,
java.lang.String timeShiftTag)
InfluxDB does not support time shift series, thus we provide a work-around for this issue, in case the user
wants to plot two time series, registered at different times, in the same time range.
|
boolean |
removeDB(java.lang.String dbName)
Drops the DB with the given name
|
boolean |
writeSinglePoint(java.lang.String dbName,
InfluxDBEntry entry)
Writes to the given DB a single Point defined by the InfluxDBEntry
|
boolean |
writeTimeSeries(java.lang.String dbName,
java.util.List<InfluxDBEntry> entries)
Writes to the given DB a whole time series defined by the list of InfluxDBEntry
|
boolean |
writeWithTimeShift(java.lang.String dbName,
java.util.List<InfluxDBEntry> entries,
long timeShift)
Allows to write point in the DB, shifting their origin to the value provided by the
timeShift |
boolean createDB(java.lang.String dbName)
dbName - the DB nametrue if no error occurred, false otherwiseboolean writeSinglePoint(java.lang.String dbName,
InfluxDBEntry entry)
dbName - the DB name where we want to write the pointentry - the InfluxDBEntry which specifies the properties of the point to be writtentrue if no error occurred, false otherwiseboolean writeTimeSeries(java.lang.String dbName,
java.util.List<InfluxDBEntry> entries)
dbName - the DB name where we want to write the pointentries - the list of InfluxDBEntry which specifies the properties of the points to be writtentrue if no error occurred, false otherwiseboolean removeDB(java.lang.String dbName)
dbName - the DB name to be removedtrue if no error occurred, false otherwiselong getTimeShift(java.lang.String dbName,
java.lang.String timeShiftTag)
timeShiftTag
to the point whose timestamp is to be used later as time shift for other time series.dbName - the DB name to be removedtimeShiftTag - the tag key under which the time shift has been savedboolean writeWithTimeShift(java.lang.String dbName,
java.util.List<InfluxDBEntry> entries,
long timeShift)
timeShift
parameter. This is to allow different time series to be plot in the same time range.
E.g. Time series A has its origin at time timeShift, while time series B has been recorded an hour
later, but we want to plot them in the same time range. Thus, when saving the points of time series B you should use
this method and provide as 3rd parameter the timeShift, namely the first timestamp of time series A.
The points of time series B will be saved accordingly (the first point of time series B will coincide in time with
the one of time series A, and the subsequent points will be adjusted accordingly).dbName - the DB name to be removedentries - the list of InfluxDBEntry which specifies the properties of the points to be writtentimeShift - the timestamp to which we want the time series to be adjusted withtrue if no error occurred, false otherwisejava.util.List<?> getQuery(java.lang.String measurement,
java.lang.String dbName,
java.lang.Class<?> clazz)
measurement - dbName - clazz - java.util.List<EObject> getEObjectQuery(java.lang.String measurement,
java.lang.String dbName,
java.lang.String idTag,
java.lang.String idTagValue,
EClass eclass,
java.lang.Long startDate,
java.lang.Long endDate)
measurement - dbName - eclass - java.util.Map<java.lang.String,java.util.List<EObject>> getSeriesMap(java.lang.String measurement,
java.lang.String dbName,
java.lang.String idTag,
EClass eclass,
java.lang.Long startDate,
java.lang.Long endDate)
measurement - dbName - idTag - startDate - endDate - Data In Motion GmbH all rights reserved