- All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>
@Private
public class ChunkedArrayList<T>
extends java.util.AbstractList<T>
Simplified List implementation which stores elements as a list
of chunks, each chunk having a maximum size. This improves over
using an ArrayList in that creating a large list will never require
a large amount of contiguous heap space -- thus reducing the likelihood
of triggering a CMS compaction pause due to heap fragmentation.
The first chunks allocated are small, but each additional chunk is
50% larger than the previous, ramping up to a configurable maximum
chunk size. Reasonable defaults are provided which should be a good
balance between not making any large allocations while still retaining
decent performance.
This currently only supports a small subset of List operations --
namely addition and iteration.