@Test public void add() throws Exception { final GroupName group = GroupName.valueOf(SimpleGroupPath.valueOf("foo", "bar"), Tags.valueOf(singletonMap("x", MetricValue.fromIntValue(17)))); final ImmutableTimeSeriesValue tsv0 = new ImmutableTimeSeriesValue(group, singletonMap(MetricName.valueOf("met", "ric"), MetricValue.fromStrValue("value"))); final TimeSeriesCollection tsdata = new SimpleTimeSeriesCollection(DateTime.parse("2017-09-17T10:00:00.000Z"), singleton(tsv0)); boolean historyAddResult = history.add(tsdata); assertTrue(historyAddResult); verify(influxDB, times(1)).write(Mockito.<BatchPoints>argThat( Matchers.hasProperty( "points", Matchers.contains( Point.measurement("foo.bar") .tag("x", "17") .time(DateTime.parse("2017-09-17T10:00:00.000Z").getMillis(), TimeUnit.MILLISECONDS) .addField("met.ric", "value") .build() ) ) )); verifyNoMoreInteractions(influxDB); }
@Override public boolean add(@NonNull TimeSeriesCollection tsdata) { return addAll(singleton(tsdata)); }
InfluxHistory extends InfluxUtil implements CollectHistory, AutoCloseable { @Override public boolean add(@NonNull TimeSeriesCollection tsdata) { return addAll(singleton(tsdata)); } }
InfluxHistory extends InfluxUtil implements CollectHistory, AutoCloseable { @Override public boolean add(@NonNull TimeSeriesCollection tsdata) { return addAll(singleton(tsdata)); } InfluxHistory(InfluxDB influxDB, String database);  InfluxHistory(InfluxDB influxDB, String database, boolean verifyDatabaseConnection); }
InfluxHistory extends InfluxUtil implements CollectHistory, AutoCloseable { @Override public boolean add(@NonNull TimeSeriesCollection tsdata) { return addAll(singleton(tsdata)); } InfluxHistory(InfluxDB influxDB, String database);  InfluxHistory(InfluxDB influxDB, String database, boolean verifyDatabaseConnection); @Override void close(); @Override boolean add(@NonNull TimeSeriesCollection tsdata); @Override boolean addAll(@NonNull Collection<? extends TimeSeriesCollection> c); @Override boolean addAll(@NonNull Iterator<? extends TimeSeriesCollection> i); int getTargetBatchSize(); void setTargetBatchSize(int targetBatchSize); @Override long getFileSize(); @Override DateTime getEnd(); Optional<DateTime> getBegin(); @Override Stream<TimeSeriesCollection> streamReversed(); @Override Stream<TimeSeriesCollection> stream(); Stream<TimeSeriesCollection> stream(@NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(@NonNull Duration stepsize, @NonNull TimeSeriesMetricFilter filter); @Override Stream<TimeSeriesCollection> stream(DateTime begin); Stream<TimeSeriesCollection> stream(@NonNull DateTime begin, @NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(DateTime begin, Duration stepsize, TimeSeriesMetricFilter filter); @Override Stream<TimeSeriesCollection> stream(DateTime begin, DateTime end); Stream<TimeSeriesCollection> stream(@NonNull DateTime begin, @NonNull DateTime end, @NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(DateTime begin, DateTime end, Duration stepsize, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(DateTime begin, Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(DateTime begin, DateTime end, Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter); }
InfluxHistory extends InfluxUtil implements CollectHistory, AutoCloseable { @Override public boolean add(@NonNull TimeSeriesCollection tsdata) { return addAll(singleton(tsdata)); } InfluxHistory(InfluxDB influxDB, String database);  InfluxHistory(InfluxDB influxDB, String database, boolean verifyDatabaseConnection); @Override void close(); @Override boolean add(@NonNull TimeSeriesCollection tsdata); @Override boolean addAll(@NonNull Collection<? extends TimeSeriesCollection> c); @Override boolean addAll(@NonNull Iterator<? extends TimeSeriesCollection> i); int getTargetBatchSize(); void setTargetBatchSize(int targetBatchSize); @Override long getFileSize(); @Override DateTime getEnd(); Optional<DateTime> getBegin(); @Override Stream<TimeSeriesCollection> streamReversed(); @Override Stream<TimeSeriesCollection> stream(); Stream<TimeSeriesCollection> stream(@NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(@NonNull Duration stepsize, @NonNull TimeSeriesMetricFilter filter); @Override Stream<TimeSeriesCollection> stream(DateTime begin); Stream<TimeSeriesCollection> stream(@NonNull DateTime begin, @NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(DateTime begin, Duration stepsize, TimeSeriesMetricFilter filter); @Override Stream<TimeSeriesCollection> stream(DateTime begin, DateTime end); Stream<TimeSeriesCollection> stream(@NonNull DateTime begin, @NonNull DateTime end, @NonNull TimeSeriesMetricFilter filter); Stream<TimeSeriesCollection> stream(DateTime begin, DateTime end, Duration stepsize, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(DateTime begin, Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter); @Override Stream<Context> getContext(DateTime begin, DateTime end, Duration stepsize, ExpressionLookBack lookback, TimeSeriesMetricFilter filter);  }