Package com.google.gerrit.server.cache
Class PerThreadProjectCache
java.lang.Object
com.google.gerrit.server.cache.PerThreadProjectCache
To prevent OOM errors on requests that would cache a lot of objects, this class enforces an
 internal limit after which no new elements are cached. All 
computeIfAbsentWithinLimit
 calls are served by invoking the Supplier after that.- 
Method SummaryModifier and TypeMethodDescriptionprotected <T> TcomputeIfAbsentWithinLimit(PerThreadCache.Key<Project.NameKey> key, Supplier<T> loader) static <T> TgetOrCompute(PerThreadCache.Key<Project.NameKey> key, Supplier<T> loader) 
- 
Method Details- 
getOrCompute@CanIgnoreReturnValue public static <T> T getOrCompute(PerThreadCache.Key<Project.NameKey> key, Supplier<T> loader) 
- 
computeIfAbsentWithinLimitprotected <T> T computeIfAbsentWithinLimit(PerThreadCache.Key<Project.NameKey> key, Supplier<T> loader) 
 
-