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

Method refreshAfterWrite

output/java_guava/1.4.13/CacheBuilder.java:712–719  ·  view source on GitHub ↗

Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value. The semantics of refreshes are specified in LoadingCache#refresh, and are performed by calling {@link CacheLoader#reload

(long duration, TimeUnit unit)

Source from the content-addressed store, hash-verified

710 */
711
712 @GwtIncompatible // To be supported (synchronously).
713 public CacheBuilder<K, V> refreshAfterWrite(long duration, TimeUnit unit) {
714 checkNotNull(unit);
715 checkState(refreshNanos == UNSET_INT, "refresh was already set to %s ns", refreshNanos);
716 checkArgument(duration > 0, "duration must be positive: %s %s", duration, unit);
717 this.refreshNanos = unit.toNanos(duration);
718 return this;
719 }
720
721 long getRefreshNanos() {
722 return (refreshNanos == UNSET_INT) ? DEFAULT_REFRESH_NANOS : refreshNanos;

Callers 1

toCacheBuilderMethod · 0.45

Calls 3

checkNotNullMethod · 0.45
checkStateMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected