public void set(T value, final int index) {
    // Must be held by same thread
    Preconditions.checkState(locks.get(index).isHeldByCurrentThread());
    softReferenceList[index] = new SoftReference<>(value);
  }
LlapObjectSubCache. A subcache which lives inside the LlapObjectCache.
The subcache maintains two lists
1. List of softreference to the objects
2. List of locks to access the objects.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/LlapObjectSubCache.java