@Test(timeout = 3000) public void testQuery() { int count = 5000; List<TestData> list = new ArrayList<TestData>(); for (int i = 0; i < count; i++) { TestData data = new TestData(); data.time = i * 1000; data.type = 0x05; data.value = 1337.1337d; list.add(data); } store.add(list); Assert.assertEquals(count, store.query(0, count * 1000).toList().size()); }
public DataStream<T> query(long t1, long t2) { return new DataStream<T>(iterable(t1, t2)); }
Timeline { public DataStream<T> query(long t1, long t2) { return new DataStream<T>(iterable(t1, t2)); } }
Timeline { public DataStream<T> query(long t1, long t2) { return new DataStream<T>(iterable(t1, t2)); }  }
Timeline { public DataStream<T> query(long t1, long t2) { return new DataStream<T>(iterable(t1, t2)); }  abstract void add(Iterator<T> data, int batchSize); void add(Collection<T> data); abstract void add(T item); abstract Iterator<T> buildIterator(long t1, long t2, int batchSize); Iterator<T> buildIterator(long t1, long t2); Iterable<T> iterable(final long t1, final long t2); DataStream<T> query(long t1, long t2); DataStream<T> query(Date t1, Date t2); abstract long getNumEvents(long t1, long t2); long getNumEvents(Date d1, Date d2); abstract boolean isEventRecorded(long time); boolean isEventRecorded(Date date); abstract void deleteRange(long t1, long t2); void deleteRange(Date t1, Date t2); }
Timeline { public DataStream<T> query(long t1, long t2) { return new DataStream<T>(iterable(t1, t2)); }  abstract void add(Iterator<T> data, int batchSize); void add(Collection<T> data); abstract void add(T item); abstract Iterator<T> buildIterator(long t1, long t2, int batchSize); Iterator<T> buildIterator(long t1, long t2); Iterable<T> iterable(final long t1, final long t2); DataStream<T> query(long t1, long t2); DataStream<T> query(Date t1, Date t2); abstract long getNumEvents(long t1, long t2); long getNumEvents(Date d1, Date d2); abstract boolean isEventRecorded(long time); boolean isEventRecorded(Date date); abstract void deleteRange(long t1, long t2); void deleteRange(Date t1, Date t2); static final int DEFAULT_BATCH_WRITE_SIZE; static final int DEFAULT_BATCH_READ_SIZE; }