Class ConcurrentPackedLongArray

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Long>
    Direct Known Subclasses:
    PackedArrayRecorder.InternalConcurrentPackedLongArray

    public class ConcurrentPackedLongArray
    extends PackedLongArray
    A Packed array of signed 64 bit values that supports get(), set(), add() and increment() operations the logical contents of the array.

    ConcurrentPackedLongArray supports concurrent accumulation, with the add() and increment() methods providing lossless atomic accumulation in the presence of multiple writers. However, it is impotant to note that add() and increment() are the *only* safe concurrent operations, and that all other operations, including get(), set() and clear() may produce "suprising" results if used on an array that is not at rest. While the add() and increment() methods are not quite wait-free, they come "close" that behvaior in the sense that a given thread will incur a total of no more than a capped fixed number (e.g. 74 in a current implementation) of non-wait-free add or increment operations during the lifetime of an array, regradless of the number of operations done.

    See Also:
    Serialized Form