public interface CacheBinding<K,V>
CacheModule
instance.Modifier and Type | Method and Description |
---|---|
long |
diskLimit() |
CacheBinding<K,V> |
diskLimit(long limit)
Set the total on-disk limit of the cache
|
CacheBinding<K,V> |
expireAfterWrite(long duration,
TimeUnit durationUnits)
Set the time an element lives before being expired.
|
Long |
expireAfterWrite(TimeUnit unit) |
com.google.inject.TypeLiteral<K> |
keyType() |
com.google.common.cache.CacheLoader<K,V> |
loader() |
CacheBinding<K,V> |
loader(Class<? extends com.google.common.cache.CacheLoader<K,V>> clazz)
Populate the cache with items from the CacheLoader.
|
long |
maximumWeight() |
CacheBinding<K,V> |
maximumWeight(long weight)
Set the total size of the cache.
|
String |
name() |
com.google.inject.TypeLiteral<V> |
valueType() |
com.google.common.cache.Weigher<K,V> |
weigher() |
CacheBinding<K,V> |
weigher(Class<? extends com.google.common.cache.Weigher<K,V>> clazz)
Algorithm to weigh an object with a method other than the unit weight 1.
|
CacheBinding<K,V> maximumWeight(long weight)
CacheBinding<K,V> diskLimit(long limit)
CacheBinding<K,V> expireAfterWrite(long duration, TimeUnit durationUnits)
CacheBinding<K,V> loader(Class<? extends com.google.common.cache.CacheLoader<K,V>> clazz)
CacheBinding<K,V> weigher(Class<? extends com.google.common.cache.Weigher<K,V>> clazz)
String name()
com.google.inject.TypeLiteral<K> keyType()
com.google.inject.TypeLiteral<V> valueType()
long maximumWeight()
long diskLimit()