Top Description Fields Constructors Methods
com.google.inject.internal

public abstract Class FailableCache<K, V>

extends Object
Class Inheritance
Imports
com.google.common.cache.CacheBuilder, .CacheLoader, .LoadingCache, com.google.common.collect.ImmutableMap, .Maps, java.util.Map, .Set, java.util.concurrent.ConcurrentHashMap

Lazily creates (and caches) values for keys. If creating the value fails (with errors), an exception is thrown on retrieval.
Author
[email protected] (Jesse Wilson)

Field Summary

Modifier and TypeField and Description
private final LoadingCache<K, Object>
private final Set<K>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv Map<K, V>
protected abstract V
create(K key, Errors errors)

public V
get(K key, Errors errors)

pack-priv boolean
isLoading(K key)

pack-priv boolean
remove(K key)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final LoadingCache<K, Object> delegate
loadingSetback to summary
private final Set<K> loadingSet

Constructor Detail

FailableCacheback to summary
public FailableCache()

Method Detail

asMapback to summary
pack-priv Map<K, V> asMap()
createback to summary
protected abstract V create(K key, Errors errors) throws ErrorsException
getback to summary
public V get(K key, Errors errors) throws ErrorsException
isLoadingback to summary
pack-priv boolean isLoading(K key)
removeback to summary
pack-priv boolean remove(K key)