javax.cache
Interface CacheBuilder<K,V>
- All Known Implementing Classes:
- CacheBuilderImpl
public interface CacheBuilder<K,V>
Provides the capability of dynamically creating a cache.
See the default implementation of this interface in com.caucho.cluster.CacheTemplate
for additional methods.
Method Summary |
Cache<K,V> |
build()
|
CacheBuilder<K,V> |
registerCacheEntryListener(CacheEntryListener<K,V> listener)
|
CacheBuilder<K,V> |
setCacheLoader(CacheLoader<K,? extends V> cacheLoader)
|
CacheBuilder<K,V> |
setCacheWriter(CacheWriter<? super K,? super V> cacheWriter)
|
CacheBuilder<K,V> |
setExpiry(CacheConfiguration.ExpiryType type,
CacheConfiguration.Duration timeToLive)
|
CacheBuilder<K,V> |
setReadThrough(boolean readThrough)
|
CacheBuilder<K,V> |
setStatisticsEnabled(boolean isEnable)
|
CacheBuilder<K,V> |
setStoreByValue(boolean storeByValue)
|
CacheBuilder<K,V> |
setTransactionEnabled(IsolationLevel isolationLevel,
Mode mode)
|
CacheBuilder<K,V> |
setWriteThrough(boolean writeThrough)
|
build
Cache<K,V> build()
setCacheLoader
CacheBuilder<K,V> setCacheLoader(CacheLoader<K,? extends V> cacheLoader)
setCacheWriter
CacheBuilder<K,V> setCacheWriter(CacheWriter<? super K,? super V> cacheWriter)
registerCacheEntryListener
CacheBuilder<K,V> registerCacheEntryListener(CacheEntryListener<K,V> listener)
setStoreByValue
CacheBuilder<K,V> setStoreByValue(boolean storeByValue)
setTransactionEnabled
CacheBuilder<K,V> setTransactionEnabled(IsolationLevel isolationLevel,
Mode mode)
setStatisticsEnabled
CacheBuilder<K,V> setStatisticsEnabled(boolean isEnable)
setReadThrough
CacheBuilder<K,V> setReadThrough(boolean readThrough)
setWriteThrough
CacheBuilder<K,V> setWriteThrough(boolean writeThrough)
setExpiry
CacheBuilder<K,V> setExpiry(CacheConfiguration.ExpiryType type,
CacheConfiguration.Duration timeToLive)