コード例 #1
0
 public Future<T> poll()
     throws IOException, KeeperException, InterruptedException, ClassNotFoundException {
   return executorService.submit(
       () -> {
         return blockingQueue.poll();
       });
 }
コード例 #2
0
 public T peek()
     throws IOException, KeeperException, InterruptedException, ClassNotFoundException {
   return blockingQueue.peek(); // for now blockingQueue has non-blocking peek()
 }
コード例 #3
0
 public void offer(T t) throws IOException, KeeperException, InterruptedException {
   blockingQueue.offer(t);
 }