@Override
public void storeIncomingStatistics(String guiPath, String accountName, Long timeperiod, String value, ValueType valueType, UnitType unitType, Long count) {
Double valueDouble = LiveStatisticsUtil.parseDouble(value);
long hoursSince1970 = timeperiod / 240;
BasicMetricHour storedMetricHour = getMetricHour(accountName, guiPath, hoursSince1970);
if (storedMetricHour == null) {
storedMetricHour = new BasicMetricHour(guiPath, accountName, hoursSince1970, valueType.toString(), unitType.toString());
}
storedMetricHour.addStatistic(new BasicLiveStatistics(guiPath, accountName, timeperiod, valueDouble, valueType.value(), unitType.value(), count));
db.put(bytes(liveStatsBucketKey + accountName + ";" + hoursSince1970 + ";" + guiPath), bytes(gson.toJson(storedMetricHour)));
}