|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.caching.impl.CacheBuilderImpl<K,V>
public class CacheBuilderImpl<K,V>
TODO: class description
| Constructor Summary | |
|---|---|
CacheBuilderImpl(String cacheName,
CarbonCacheManager cacheManager)
|
|
| Method Summary | |
|---|---|
Cache<K,V> |
build()
Create an instance of the named Cache. |
CacheBuilder<K,V> |
registerCacheEntryListener(CacheEntryListener<K,V> cacheEntryListener)
Registers a listener. |
CacheBuilder<K,V> |
setCacheLoader(CacheLoader<K,? extends V> cacheLoader)
Sets the cache loader. |
CacheBuilder<K,V> |
setCacheWriter(CacheWriter<? super K,? super V> cacheWriter)
Sets the cache writer. |
CacheBuilder<K,V> |
setExpiry(CacheConfiguration.ExpiryType type,
CacheConfiguration.Duration duration)
Sets the cache expiration |
CacheBuilder<K,V> |
setReadThrough(boolean readThrough)
Sets whether the cache is a read-through cache. |
CacheBuilder<K,V> |
setStatisticsEnabled(boolean enableStatistics)
Sets whether statistics gathering is enabled on this cache. |
CacheBuilder<K,V> |
setStoreByValue(boolean storeByValue)
Sets whether the cache is store-by-value cache. |
CacheBuilder<K,V> |
setTransactionEnabled(IsolationLevel isolationLevel,
Mode mode)
Sets whether transaction are enabled for this cache. |
CacheBuilder<K,V> |
setWriteThrough(boolean writeThrough)
Whether the cache is a write-through cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheBuilderImpl(String cacheName,
CarbonCacheManager cacheManager)
| Method Detail |
|---|
public Cache<K,V> build()
CacheBuilderCache.
The Cache will be created, added to the caches controlled by its associated CacheManager and started.
If there is an existing Cache of the same name associated with this CacheManager when build is invoked,
the old Cache will be stopped.
build in interface CacheBuilder<K,V>CacheManager.createCacheBuilder(String)public CacheBuilder<K,V> setCacheLoader(CacheLoader<K,? extends V> cacheLoader)
CacheBuilder
setCacheLoader in interface CacheBuilder<K,V>cacheLoader - the CacheLoader
public CacheBuilder<K,V> setCacheWriter(CacheWriter<? super K,? super V> cacheWriter)
CacheBuilder
setCacheWriter in interface CacheBuilder<K,V>cacheWriter - the CacheWriter
public CacheBuilder<K,V> registerCacheEntryListener(CacheEntryListener<K,V> cacheEntryListener)
CacheBuilder
registerCacheEntryListener in interface CacheBuilder<K,V>cacheEntryListener - the listener
public CacheBuilder<K,V> setStoreByValue(boolean storeByValue)
CacheBuilder
setStoreByValue in interface CacheBuilder<K,V>storeByValue - the value for storeByValue
CacheConfiguration.isStoreByValue()
public CacheBuilder<K,V> setTransactionEnabled(IsolationLevel isolationLevel,
Mode mode)
CacheBuilder
setTransactionEnabled in interface CacheBuilder<K,V>isolationLevel - - the isolation level for this cachemode - - the mode (Local or XA) for this cache
CacheConfiguration.isTransactionEnabled()public CacheBuilder<K,V> setStatisticsEnabled(boolean enableStatistics)
CacheBuilder
setStatisticsEnabled in interface CacheBuilder<K,V>enableStatistics - true to enable statistics, false to disable
CacheConfiguration.setStatisticsEnabled(boolean)public CacheBuilder<K,V> setReadThrough(boolean readThrough)
CacheBuilder
setReadThrough in interface CacheBuilder<K,V>readThrough - the value for readThrough
public CacheBuilder<K,V> setWriteThrough(boolean writeThrough)
CacheBuilder
setWriteThrough in interface CacheBuilder<K,V>writeThrough - set to true for a write-through cache
public CacheBuilder<K,V> setExpiry(CacheConfiguration.ExpiryType type,
CacheConfiguration.Duration duration)
CacheBuilder
setExpiry in interface CacheBuilder<K,V>type - whether based on creation/modification or last access timeduration - the amount of time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||