Class ArraySortedSet<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.linkedin.alpini.base.concurrency.ArraySortedSet<E>
Type Parameters:
E -
All Implemented Interfaces:
Cloneable, Iterable<E>, Collection<E>, Set<E>, SortedSet<E>

public class ArraySortedSet<E> extends AbstractSet<E> implements SortedSet<E>, Cloneable
A thread-safe SortedSet implementation which uses an array as a backing store. Mutations to the backing store are guarded by a read-write lock. The purpose of this is to be a more garbage-collector friendly collection than ConcurrentSkipListSet at the cost of slightly more CPU cost at insert and deletion. When used as a backing store for AbstractQuantileEstimation, 5 million samples per second can be performed at the average invocation time of 3 microseconds.