MCPcopy Create free account
hub / github.com/antlr/codebuff / build

Method build

corpus/java/training/guava/cache/CacheBuilder.java:811–815  ·  view source on GitHub ↗

Builds a cache, which either returns an already-loaded value for a given key or atomically computes or retrieves it using the supplied CacheLoader. If another thread is currently loading the value for this key, simply waits for that thread to finish and returns its loaded value. Note that mu

(
      CacheLoader<? super K1, V1> loader)

Source from the content-addressed store, hash-verified

809 * @return a cache having the requested features
810 */
811 public <K1 extends K, V1 extends V> LoadingCache<K1, V1> build(
812 CacheLoader<? super K1, V1> loader) {
813 checkWeightWithWeigher();
814 return new LocalCache.LocalLoadingCache<K1, V1>(this, loader);
815 }
816
817 /**
818 * Builds a cache which does not automatically load values when keys are requested.

Callers 8

CacheBuilderSpecClass · 0.45
readObjectMethod · 0.45
readObjectMethod · 0.45
HtmlEscapersClass · 0.45
XmlEscapersClass · 0.45
withParameterMethod · 0.45
createMethod · 0.45
parseMethod · 0.45

Calls 2

checkNonLoadingCacheMethod · 0.95

Tested by

no test coverage detected