Class LocalCache.ManualSerializationProxy<K,V>

java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.cache.ForwardingCache<K,V>
com.google.common.cache.LocalCache.ManualSerializationProxy<K,V>
All Implemented Interfaces:
Cache<K,V>, Serializable
Direct Known Subclasses:
LocalCache.LoadingSerializationProxy
Enclosing class:
LocalCache<K,V>

static class LocalCache.ManualSerializationProxy<K,V> extends ForwardingCache<K,V> implements Serializable
Serializes the configuration of a LocalCache, reconstituting it as a Cache using CacheBuilder upon deserialization. An instance of this class is fit for use by the writeReplace of LocalManualCache.

Unfortunately, readResolve() doesn't get called when a circular dependency is present, so the proxy must be able to behave as the cache itself.