public byte[] poll() throws KeeperException, InterruptedException {
  TimerContext time=stats.time(dir + "_poll");
  try {
    return removeFirst();
  }
  finally {
    time.stop();
  }
}

public byte [ ] poll ( ) throws KeeperException , InterruptedException { TimerContext time = stats . time ( dir + "_poll" ) ; try { return removeFirst ( ) ; } finally { time . stop ( ) ; } }
attempts to remove the head of the queue and return it . returns null if the queue is empty .
