public class BoundedTaskQueue extends AbstractBlockingTaskQueue
BoundedTaskQueueis an unordered, bounded implementation of a
AbstractBlockingTaskQueue. This implementation is
ThreadSafe, as it can safely handle multiple consumer and producer threads writing and/or reading from it.
|Constructor and Description|
|Modifier and Type||Method and Description|
Adds an element to the head of the queue.
public void enqueue(Task<? extends Object> task) throws InterruptedException
Threadis blocked until capacity in the queue has been released.
public int getCapacity()
Copyright © 2020. All rights reserved.