MCPcopy Index your code
hub / github.com/antlr/codebuff / ForwardingCache

Class ForwardingCache

output/java_guava/1.4.13/ForwardingCache.java:37–153  ·  view source on GitHub ↗

A cache which forwards all its method calls to another cache. Subclasses should override one or more methods to modify the behavior of the backing cache as desired per the decorator pattern . @author Charles Fry @since 10.0

Source from the content-addressed store, hash-verified

35
36
37@GwtIncompatible
38public abstract class ForwardingCache<K, V> extends ForwardingObject implements Cache<K, V> {
39
40 /** Constructor for use by subclasses. */
41
42 protected ForwardingCache() {}
43
44 @Override
45 protected abstract Cache<K, V> delegate();
46
47 /**
48 * @since 11.0
49 */
50
51 @Override
52 @Nullable
53 public V getIfPresent(Object key) {
54 return delegate().getIfPresent(key);
55 }
56
57 /**
58 * @since 11.0
59 */
60
61 @Override
62 public V get(K key, Callable<? extends V> valueLoader) throws ExecutionException {
63 return delegate().get(key, valueLoader);
64 }
65
66 /**
67 * @since 11.0
68 */
69
70 @Override
71 public ImmutableMap<K, V> getAllPresent(Iterable<?> keys) {
72 return delegate().getAllPresent(keys);
73 }
74
75 /**
76 * @since 11.0
77 */
78
79 @Override
80 public void put(K key, V value) {
81 delegate().put(key, value);
82 }
83
84 /**
85 * @since 12.0
86 */
87
88 @Override
89 public void putAll(Map<? extends K, ? extends V> m) {
90 delegate().putAll(m);
91 }
92
93 @Override
94 public void invalidate(Object key) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected