code: public synchronized Response<ByteArray, Object> responseQueuePoll(long timeout,
                                                                        TimeUnit timeUnit)
              throws InterruptedException {
          long timeoutMs = timeUnit.toMillis(timeout);
          long timeoutWallClockMs = System.currentTimeMillis() + timeoutMs;
          while(responseQueue.isEmpty() && System.currentTimeMillis() < timeoutWallClockMs) {
              long remainingMs = Math.max(0, timeoutWallClockMs - System.currentTimeMillis());
              if(logger.isDebugEnabled()) {
                  logger.debug("Start waiting for response queue with timeoutMs: " + timeoutMs);
              }
              this.wait(remainingMs);
              if(logger.isDebugEnabled()) {
                  logger.debug("End waiting for response queue with timeoutMs: " + timeoutMs);
              }
          }
          return responseQueue.poll();
      }
docs: poll the response queue for response
  
  @param timeout timeout amount
  @param timeUnit timeUnit of timeout
  @return same result of BlockQueue.poll(long, TimeUnit)
  @throws InterruptedException