示例#1
0
 /**
  * Offers an id to be released at a certain time in the future, or immediately if the release time
  * < current time
  *
  * @param release time in milliseconds from epoch
  * @param id an id
  * @return true if succefully offered
  * @throws KeeperException
  * @throws InterruptedException
  */
 public boolean offer(long release, long id) throws KeeperException, InterruptedException {
   if (id != -1) {
     return dq.offer(new QueueItem(release, id));
   } else {
     return false;
   }
 }