@Test public void reversed() throws Exception { List<TimeSeriesCollection> tsdata = create_tsdata_().limit(100).collect(Collectors.toList()); hist.addAll(tsdata); reverse(tsdata); assertEquals(tsdata, hist.streamReversed().collect(Collectors.toList())); }
@Override public boolean addAll(Collection<? extends TimeSeriesCollection> tsv) { final Optional<Long> disk_usage_limit; synchronized (this) { disk_usage_limit = disk_usage_limit_; } boolean added = super.addAll(tsv); if (added) disk_usage_limit.ifPresent(this::ensureDiskUsageBelow); return added; }
DirCollectHistory extends AbstractCollectHistory<TSDataFileChain> { @Override public boolean addAll(Collection<? extends TimeSeriesCollection> tsv) { final Optional<Long> disk_usage_limit; synchronized (this) { disk_usage_limit = disk_usage_limit_; } boolean added = super.addAll(tsv); if (added) disk_usage_limit.ifPresent(this::ensureDiskUsageBelow); return added; } }
DirCollectHistory extends AbstractCollectHistory<TSDataFileChain> { @Override public boolean addAll(Collection<? extends TimeSeriesCollection> tsv) { final Optional<Long> disk_usage_limit; synchronized (this) { disk_usage_limit = disk_usage_limit_; } boolean added = super.addAll(tsv); if (added) disk_usage_limit.ifPresent(this::ensureDiskUsageBelow); return added; } DirCollectHistory(Path dir, Optional<Long> disk_usage_limit, Optional<Long> max_filesize);  DirCollectHistory(Path dir);  DirCollectHistory(Path dir, long disk_usage_limit);  DirCollectHistory(Path dir, long disk_usage_limit, long max_filesize); }
DirCollectHistory extends AbstractCollectHistory<TSDataFileChain> { @Override public boolean addAll(Collection<? extends TimeSeriesCollection> tsv) { final Optional<Long> disk_usage_limit; synchronized (this) { disk_usage_limit = disk_usage_limit_; } boolean added = super.addAll(tsv); if (added) disk_usage_limit.ifPresent(this::ensureDiskUsageBelow); return added; } DirCollectHistory(Path dir, Optional<Long> disk_usage_limit, Optional<Long> max_filesize);  DirCollectHistory(Path dir);  DirCollectHistory(Path dir, long disk_usage_limit);  DirCollectHistory(Path dir, long disk_usage_limit, long max_filesize); boolean hasPendingTasks(); void waitPendingTasks(); @Override boolean add(TimeSeriesCollection tsv); @Override boolean addAll(Collection<? extends TimeSeriesCollection> tsv); void optimizeOldFiles(); Collection<? extends Collection<TimeSeriesCollection>> getRawCollections(); BatchAdd bachAdd(); }
DirCollectHistory extends AbstractCollectHistory<TSDataFileChain> { @Override public boolean addAll(Collection<? extends TimeSeriesCollection> tsv) { final Optional<Long> disk_usage_limit; synchronized (this) { disk_usage_limit = disk_usage_limit_; } boolean added = super.addAll(tsv); if (added) disk_usage_limit.ifPresent(this::ensureDiskUsageBelow); return added; } DirCollectHistory(Path dir, Optional<Long> disk_usage_limit, Optional<Long> max_filesize);  DirCollectHistory(Path dir);  DirCollectHistory(Path dir, long disk_usage_limit);  DirCollectHistory(Path dir, long disk_usage_limit, long max_filesize); boolean hasPendingTasks(); void waitPendingTasks(); @Override boolean add(TimeSeriesCollection tsv); @Override boolean addAll(Collection<? extends TimeSeriesCollection> tsv); void optimizeOldFiles(); Collection<? extends Collection<TimeSeriesCollection>> getRawCollections(); BatchAdd bachAdd();  }