Class MultiLockFairBlockingQueue<E>

  • Type Parameters:
    E - Type of element in the queue
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>

    public class MultiLockFairBlockingQueue<E>
    extends Object
    implements BlockingQueue<E>
    EXPERIMENTAL AND NOT YET COMPLETE! An implementation of a blocking queue with fairness waiting and lock dispersal to avoid contention. invocations to method poll(...) will get handed out in the order they were received. Locking is fine grained, a shared lock is only used during the first level of contention, waiting is done in a lock per thread basis so that order is guaranteed once the thread goes into a suspended monitor state.
    Not all of the methods of the BlockingQueue are implemented.