K - Type of the cache-key of the built cacheV - Type of the cache-value of the built cachepublic static class ChangingValueCache.Builder<K,V> extends Object
ChangingValueCache instances| Modifier and Type | Field and Description |
|---|---|
protected ChangingValueCache<K,V> |
instance |
| Modifier | Constructor and Description |
|---|---|
protected |
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ChangingValueCache<K,V> |
build()
Build the
ChangingValueCache instance |
ChangingValueCache.Builder<K,V> |
cache(com.google.common.cache.Cache<K,V> cache)
The the cache to be used internally
|
protected ChangingValueCache<K,V> |
createInstance() |
ChangingValueCache.Builder<K,V> |
defaultModifier(com.google.common.base.Function<V,V> modifier)
Set the default modifier.
|
ChangingValueCache.Builder<K,V> |
defaultNewCreator(com.google.common.base.Supplier<V> newCreator)
Set the default new-creator.
|
protected final ChangingValueCache<K,V> instance
protected ChangingValueCache<K,V> createInstance()
public ChangingValueCache.Builder<K,V> defaultNewCreator(com.google.common.base.Supplier<V> newCreator)
newCreator - Used to generate the new cache-valuepublic ChangingValueCache.Builder<K,V> defaultModifier(com.google.common.base.Function<V,V> modifier)
modifier - Used to modify the cache-valuepublic ChangingValueCache.Builder<K,V> cache(com.google.common.cache.Cache<K,V> cache)
cache - The Guava cache to be used internallypublic ChangingValueCache<K,V> build()
ChangingValueCache instanceChangingValueCache instanceCopyright © 2015 teletronics.ae. All rights reserved.