public Future<T> poll() throws IOException, KeeperException, InterruptedException, ClassNotFoundException { return executorService.submit( () -> { return blockingQueue.poll(); }); }
public T peek() throws IOException, KeeperException, InterruptedException, ClassNotFoundException { return blockingQueue.peek(); // for now blockingQueue has non-blocking peek() }
public void offer(T t) throws IOException, KeeperException, InterruptedException { blockingQueue.offer(t); }