mirror of
https://github.com/corda/corda.git
synced 2025-01-09 14:33:30 +00:00
68fca60d21
I had to implement a blocking queue for ExecutorCompletionService. LinkedBlockingQueue could be very easily extended right now to implement the java 7 LinkedBlockingDeque. Right now LinkedBlockingQueue just synchronizes and depends on LinkedList implementation. But I wrote a very complete unit test suite so we if we want to put a more concurrent design here, we have a complete test suite to verify against.# Please enter the commit message for your changes. Lines starting
14 lines
398 B
Java
14 lines
398 B
Java
package java.util.concurrent;
|
|
|
|
import java.util.Deque;
|
|
|
|
public interface BlockingDeque<T> extends Deque<T>, BlockingQueue<T> {
|
|
public T takeFirst() throws InterruptedException;
|
|
|
|
public T takeLast() throws InterruptedException;
|
|
|
|
public T pollFirst(long timeout, TimeUnit unit) throws InterruptedException;
|
|
|
|
public T pollLast(long timeout, TimeUnit unit) throws InterruptedException;
|
|
}
|