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

Method maximumSize

output/java_guava/1.4.13/CacheBuilder.java:419–426  ·  view source on GitHub ↗

Specifies the maximum number of entries the cache may contain. Note that the cache may evict an entry before this limit is exceeded . As the cache size grows close to the maximum, the cache evicts entries that are less likely to be used again. For example, the cache may evict an entry because

(long size)

Source from the content-addressed store, hash-verified

417
418
419 public CacheBuilder<K, V> maximumSize(long size) {
420 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", this.maximumSize);
421 checkState(this.maximumWeight == UNSET_INT, "maximum weight was already set to %s", this.maximumWeight);
422 checkState(this.weigher == null, "maximum size can not be combined with weigher");
423 checkArgument(size >= 0, "maximum size must not be negative");
424 this.maximumSize = size;
425 return this;
426 }
427
428 /**
429 * Specifies the maximum weight of entries the cache may contain. Weight is determined using the

Callers 2

toCacheBuilderMethod · 0.45
recreateCacheBuilderMethod · 0.45

Calls 2

checkStateMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected