public boolean addReader() {
      boolean added = false;
      int readerCount = 0;
      synchronized (this) {
        if (status == CacheEntryStatus.VALID) {
          readerCount = readers.incrementAndGet();
          added = true;
        }
      }
      LOG.debug("addReader: entry: {}, readerCount: {}, added: {}", this, readerCount, added);
      return added;
    }
A class to handle management and lookup of cached Hive query results.
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java