persistable sclass TickerSequence { new LongBuffer timestamps; new DoubleBuffer prices; void add(double price, long timestamp) { timestamps.add(timestamp); prices.add(price); } void add(double[] prices, long[] timestamps) { this.prices.addAll(prices); this.timestamps.addAll(timestamps); } }