public final class CacheConfigurationImpl extends Object implements CacheConfiguration
CacheConfiguration.Duration, CacheConfiguration.ExpiryType| Modifier and Type | Field and Description |
|---|---|
protected IsolationLevel |
isolationLevel
isolation level
|
protected boolean |
readThrough
read through
|
protected boolean |
statisticsEnabled
statistics enabled
|
protected boolean |
storeByValue
store by value
|
protected CacheConfiguration.Duration[] |
timeToLive
duration
|
protected Mode |
transactionMode
transaction mode
|
protected boolean |
writeThrough
write through
|
| Constructor and Description |
|---|
CacheConfigurationImpl() |
CacheConfigurationImpl(boolean readThrough,
boolean writeThrough,
boolean storeByValue,
boolean statisticsEnabled,
IsolationLevel isolationLevel,
Mode transactionMode,
CacheConfiguration.Duration[] timeToLive) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
CacheLoader |
getCacheLoader()
Gets the registered
CacheLoader, if any. |
CacheWriter |
getCacheWriter()
Gets the registered
CacheWriter, if any. |
CacheConfiguration.Duration |
getExpiry(CacheConfiguration.ExpiryType type)
Gets the cache's time to live setting,Sets how long cache entries should live.
|
IsolationLevel |
getTransactionIsolationLevel()
Gets the transaction isolation level.
|
Mode |
getTransactionMode()
Gets the transaction mode.
|
int |
hashCode() |
boolean |
isReadThrough()
Whether the cache is a read-through cache.
|
boolean |
isStatisticsEnabled()
Checks whether statistics collection is enabled in this cache.
|
boolean |
isStoreByValue()
Whether storeByValue (true) or storeByReference (false).
|
boolean |
isTransactionEnabled()
Checks whether transaction are enabled for this cache.
|
boolean |
isWriteThrough()
Whether the cache is a write-through cache.
|
void |
setStatisticsEnabled(boolean enableStatistics)
Sets whether statistics gathering is enabled on this cache.
|
protected boolean readThrough
protected boolean writeThrough
protected boolean statisticsEnabled
protected CacheConfiguration.Duration[] timeToLive
protected boolean storeByValue
protected IsolationLevel isolationLevel
protected Mode transactionMode
public CacheConfigurationImpl()
public CacheConfigurationImpl(boolean readThrough,
boolean writeThrough,
boolean storeByValue,
boolean statisticsEnabled,
IsolationLevel isolationLevel,
Mode transactionMode,
CacheConfiguration.Duration[] timeToLive)
public boolean isReadThrough()
Cache.get(Object) and Cache#getAll(java.util.Set.
Default value is false.isReadThrough in interface CacheConfigurationpublic boolean isWriteThrough()
isWriteThrough in interface CacheConfigurationpublic boolean isStoreByValue()
isStoreByValue in interface CacheConfigurationpublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface CacheConfigurationpublic void setStatisticsEnabled(boolean enableStatistics)
setStatisticsEnabled in interface CacheConfigurationenableStatistics - true to enable statistics, false to disable.public CacheConfiguration.Duration getExpiry(CacheConfiguration.ExpiryType type)
CacheConfigurationCacheConfiguration.Duration.ETERNAL.getExpiry in interface CacheConfigurationtype - the type of the expirationpublic boolean isTransactionEnabled()
isTransactionEnabled in interface CacheConfigurationpublic IsolationLevel getTransactionIsolationLevel()
CacheConfigurationgetTransactionIsolationLevel in interface CacheConfigurationIsolationLevel.NONE if this cache is not transactional.public Mode getTransactionMode()
CacheConfigurationgetTransactionMode in interface CacheConfigurationMode.NONE if this cache is not transactional.public CacheLoader getCacheLoader()
CacheConfigurationCacheLoader, if any.getCacheLoader in interface CacheConfigurationCacheLoader or null if none has been set.public CacheWriter getCacheWriter()
CacheConfigurationCacheWriter, if any.getCacheWriter in interface CacheConfigurationCacheWriter or null if none has been set.Copyright © 2018 WSO2 Inc. All rights reserved.