ConcurrentLinkedDeque in Java

ConcurrentLinkedDeque in Java implements Deque interface and is part of java.util.concurrent package. ConcurrentLinkedDeque in Java is an unbounded concurrent deque which is thread-safe. It stores its elements as linked nodes where each node stores a reference to both previous and next nodes. How ConcurrentLinkedDeque differs from the blocking Deque implementations…

Continue reading

ConcurrentLinkedQueue in Java

ConcurrentLinkedQueue in Java implements Queue interface and is part of java.util.concurrent package. ConcurrentLinkedQueue in Java is an unbounded queue which is thread-safe. It stores its elements as linked nodes where each node stores a reference to the next node. How ConcurrentLinkedQueue differs from the BlockingQueue implementations like ArrayBlockingQueue, PriorityBlockingQueue is…

Continue reading

LinkedTransferQueue in Java

LinkedTransferQueue in Java is an implementation of the TransferQueue interface and is part of java.util.concurrent package. It was added in Java 7. TransferQueue interface in Java TransferQueue interface which extends BlockingQueue interface adds the capability where producers may wait for consumers to receive elements. In BlockingQueue implementations like ArrayBlockingQueue, PriorityBlockingQueue…

Continue reading