void addAll(List<double> ls) { data.addAll(ls); if (data.length > maxLength + 10) { data.removeRange(0, data.length - maxLength); } _tryFlush(); }