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

Method maximumWeight

output/java_guava/1.4.13/CacheBuilder.java:453–460  ·  view source on GitHub ↗

Specifies the maximum weight of entries the cache may contain. Weight is determined using the Weigher specified with #weigher, and use of this method requires a corresponding call to #weigher prior to calling #build. Note that the cache may evict an entry befor

(long weight)

Source from the content-addressed store, hash-verified

451 */
452
453 @GwtIncompatible // To be supported
454 public CacheBuilder<K, V> maximumWeight(long weight) {
455 checkState(this.maximumWeight == UNSET_INT, "maximum weight was already set to %s", this.maximumWeight);
456 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", this.maximumSize);
457 this.maximumWeight = weight;
458 checkArgument(weight >= 0, "maximum weight must not be negative");
459 return this;
460 }
461
462 /**
463 * Specifies the weigher to use in determining the weight of entries. Entry weight is taken into

Callers 2

toCacheBuilderMethod · 0.45
recreateCacheBuilderMethod · 0.45

Calls 2

checkStateMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected