code: public boolean await(final Date deadline) throws InterruptedException {
  	this.lock.lock();
  	try {
  	  if (this.cancelled) {
  		throw new InterruptedException("Operation interrupted");
  	  }
  	  boolean success = false;
  	  if (deadline != null) {
  		success = this.condition.awaitUntil(deadline);
  	  } else {
  		this.condition.await();
  		success = true;
  	  }
  	  if (this.cancelled) {
  		throw new InterruptedException("Operation interrupted");
  	  }
  	  return success;
  	} finally {
  	  this.lock.unlock();
  	}
  
    }
docs: Waits/Blocks until the specified deadline or condition
  
  @param deadline the deadline
  @return true, if successful
  @throws InterruptedException the interrupted exception