@Test public void testEmpty() { MetricStore store = new OffHeapVarBitMetricStore(1, testFileName); assertTrue(store.getSeries(1).isEmpty()); assertTrue(store.getSeries(2).isEmpty()); }
@Override public List<Point> getSeries(long uuid) { final LongValue key = Values.newHeapInstance(LongValue.class); key.setValue(uuid); if (timeSeries.containsKey(key)) { ByteBuffer serializedValues = timeSeries.get(key); TimeSeriesIterator iterator = VarBitTimeSeries.deserialize(serializedValues); return iterator.getPoints(); } else { return Collections.emptyList(); } }
OffHeapVarBitMetricStore implements MetricStore { @Override public List<Point> getSeries(long uuid) { final LongValue key = Values.newHeapInstance(LongValue.class); key.setValue(uuid); if (timeSeries.containsKey(key)) { ByteBuffer serializedValues = timeSeries.get(key); TimeSeriesIterator iterator = VarBitTimeSeries.deserialize(serializedValues); return iterator.getPoints(); } else { return Collections.emptyList(); } } }
OffHeapVarBitMetricStore implements MetricStore { @Override public List<Point> getSeries(long uuid) { final LongValue key = Values.newHeapInstance(LongValue.class); key.setValue(uuid); if (timeSeries.containsKey(key)) { ByteBuffer serializedValues = timeSeries.get(key); TimeSeriesIterator iterator = VarBitTimeSeries.deserialize(serializedValues); return iterator.getPoints(); } else { return Collections.emptyList(); } } OffHeapVarBitMetricStore(long size, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo, String dir); }
OffHeapVarBitMetricStore implements MetricStore { @Override public List<Point> getSeries(long uuid) { final LongValue key = Values.newHeapInstance(LongValue.class); key.setValue(uuid); if (timeSeries.containsKey(key)) { ByteBuffer serializedValues = timeSeries.get(key); TimeSeriesIterator iterator = VarBitTimeSeries.deserialize(serializedValues); return iterator.getPoints(); } else { return Collections.emptyList(); } } OffHeapVarBitMetricStore(long size, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo, String dir); @Override List<Point> getSeries(long uuid); static OffHeapVarBitMetricStore toOffHeapStore(Map<Long, VarBitTimeSeries> timeSeriesMap,
                                                        String chunkInfo, String dataDirectory); void addPoint(long uuid, ByteBuffer series); @Override void addPoint(long uuid, long ts, double val); @Override Map<String, Object> getStats(); @Override Map getSeriesMap(); @Override void close(); @Override boolean isReadOnly(); @Override void setReadOnly(boolean readOnly); }
OffHeapVarBitMetricStore implements MetricStore { @Override public List<Point> getSeries(long uuid) { final LongValue key = Values.newHeapInstance(LongValue.class); key.setValue(uuid); if (timeSeries.containsKey(key)) { ByteBuffer serializedValues = timeSeries.get(key); TimeSeriesIterator iterator = VarBitTimeSeries.deserialize(serializedValues); return iterator.getPoints(); } else { return Collections.emptyList(); } } OffHeapVarBitMetricStore(long size, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo);  OffHeapVarBitMetricStore(long size, int valueSize, String chunkInfo, String dir); @Override List<Point> getSeries(long uuid); static OffHeapVarBitMetricStore toOffHeapStore(Map<Long, VarBitTimeSeries> timeSeriesMap,
                                                        String chunkInfo, String dataDirectory); void addPoint(long uuid, ByteBuffer series); @Override void addPoint(long uuid, long ts, double val); @Override Map<String, Object> getStats(); @Override Map getSeriesMap(); @Override void close(); @Override boolean isReadOnly(); @Override void setReadOnly(boolean readOnly);  }