Package com.google.gerrit.server.cache
Interface CacheDef<K,V>
-
- All Known Subinterfaces:
PersistentCacheDef<K,V>
public interface CacheDef<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
configKey()
Key to use when looking up configuration for this cache.Duration
expireAfterWrite()
Duration
expireFromMemoryAfterAccess()
com.google.inject.TypeLiteral<K>
keyType()
com.google.common.cache.CacheLoader<K,V>
loader()
long
maximumWeight()
String
name()
Unique name for this cache.com.google.inject.TypeLiteral<V>
valueType()
com.google.common.cache.Weigher<K,V>
weigher()
-
-
-
Method Detail
-
name
String name()
Unique name for this cache.The name can be used in a binding annotation
@Named(name)
to inject the cache configured with this binding.
-
configKey
String configKey()
Key to use when looking up configuration for this cache.Typically, this will match the result of
name()
, so that configuration is keyed by the actual cache name. However, it may be changed, for example to reuse the size limits of some other cache.
-
keyType
com.google.inject.TypeLiteral<K> keyType()
-
valueType
com.google.inject.TypeLiteral<V> valueType()
-
maximumWeight
long maximumWeight()
-
expireAfterWrite
Duration expireAfterWrite()
-
expireFromMemoryAfterAccess
Duration expireFromMemoryAfterAccess()
-
-