public static <E extends Delayed> E takeWithoutInterrupt(final DelayQueue<E> queue,
    final long timeout, final TimeUnit timeUnit) {
    try {
      return queue.poll(timeout, timeUnit);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      return null;
    }
  }
Returns null (if an interrupt) or an instance of E; resets interrupt on calling thread.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/util/DelayedUtil.java