Top Description Inners Fields Constructors Methods
com.google.common.graph

pack-priv final Class MapRetrievalCache<K, V>

extends MapIteratorCache<K, V>
Class Inheritance
Annotations
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull

A MapIteratorCache that adds additional caching. In addition to the caching provided by MapIteratorCache, this structure caches values for the two most recently retrieved keys.
Author
James Sexton

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private transient volatile MapRetrievalCache.CacheEntry<K, V>
private transient volatile MapRetrievalCache.CacheEntry<K, V>

Constructor Summary

AccessConstructor and Description
pack-priv
MapRetrievalCache(Map<K, V> backingMap)

Method Summary

Modifier and TypeMethod and Description
private void
addToCache(K key, V value)

private void
pack-priv void
pack-priv V
pack-priv V
Inherited from com.google.common.graph.MapIteratorCache:
clearcontainsKeygetWithoutCachingputremoveunmodifiableKeySet

Field Detail

cacheEntry1back to summary
private transient volatile MapRetrievalCache.CacheEntry<K, V> cacheEntry1
Annotations
@CheckForNull
cacheEntry2back to summary
private transient volatile MapRetrievalCache.CacheEntry<K, V> cacheEntry2
Annotations
@CheckForNull

Constructor Detail

MapRetrievalCacheback to summary
pack-priv MapRetrievalCache(Map<K, V> backingMap)

Method Detail

addToCacheback to summary
private void addToCache(K key, V value)
addToCacheback to summary
private void addToCache(MapRetrievalCache.CacheEntry<K, V> entry)
clearCacheback to summary
pack-priv void clearCache()

Overrides com.google.common.graph.MapIteratorCache.clearCache.

Annotations
@Override
getback to summary
pack-priv V get(Object key)

Overrides com.google.common.graph.MapIteratorCache.get.

Annotations
@SuppressWarnings:unchecked
@Override
@CheckForNull
getIfCachedback to summary
pack-priv V getIfCached(Object key)

Overrides com.google.common.graph.MapIteratorCache.getIfCached.

Annotations
@Override
@CheckForNull
com.google.common.graph back to summary

private final Class MapRetrievalCache.CacheEntry<K, V>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final K
pack-priv final V

Constructor Summary

AccessConstructor and Description
pack-priv
CacheEntry(K key, V value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
pack-priv final K key
valueback to summary
pack-priv final V value

Constructor Detail

CacheEntryback to summary
pack-priv CacheEntry(K key, V value)