Class ConcurrentCASList<E>

  • All Implemented Interfaces:
    Iterable<E>, Collection<E>, List<E>

    public class ConcurrentCASList<E>
    extends Object
    implements List<E>
    A List implementation intended to be used in places where an API requires a List but doesn't actually use the indexes - it just needs ordering. In concurrent environments, Lists are highly inconvenient due to their sequential nature. This class therefore mimics a list when infact it's actually a ConcurrentLinkedDeque.

    AS A RESULT, USERS SHOULD NOT RELY ON INDEXES! THIS LIST IS SIMPLY A FACADE FOR POORLY DESIGNED / OVERSPECIFIED APIs WITH NO REGARDS FOR CONCURRENCY.
    Since:
    1.6
    Author:
    Sina Madani