@Override
    boolean waitForData() {
      while (internalIsEmpty()) {
        region.getCache().getCancelCriterion().checkCancelInProgress(null);
        boolean interrupted = Thread.currentThread().isInterrupted();
        try {
          blockCond.await(StoppableCondition.TIME_TO_WAIT);
        } catch (InterruptedException ie) {
          interrupted = true;
          region.getCache().getCancelCriterion().checkCancelInProgress(ie);
          throw new TimeoutException(ie);
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
      return true;
    }
Returns true if data is available in the queue. This method should always be invoked after
acquiring the lock on ReentrantLock object. It blocks the thread if the queue is empty or
returns true otherwise . This will always return true indicating that data is available for
retrieval or throw an Exception.It can never return false.
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java