@SuppressWarnings("unchecked")
  @Override
  public <T> T retrieve(String key) throws HiveException {

    T value = null;

    lock.lock();
    try {
      value = (T) registry.getIfPresent(key);
      if (value != null && LOG.isDebugEnabled()) {
        LOG.debug("Found " + key + " in cache");
      }
      return value;
    } finally {
      lock.unlock();
    }
  }
LlapObjectCache. Llap implementation for the shared object cache.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/LlapObjectCache.java