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 CacheConfiguration
public boolean isWriteThrough()
isWriteThrough
in interface CacheConfiguration
public boolean isStoreByValue()
isStoreByValue
in interface CacheConfiguration
public boolean isStatisticsEnabled()
isStatisticsEnabled
in interface CacheConfiguration
public void setStatisticsEnabled(boolean enableStatistics)
setStatisticsEnabled
in interface CacheConfiguration
enableStatistics
- true to enable statistics, false to disable.public CacheConfiguration.Duration getExpiry(CacheConfiguration.ExpiryType type)
CacheConfiguration
CacheConfiguration.Duration.ETERNAL
.getExpiry
in interface CacheConfiguration
type
- the type of the expirationpublic boolean isTransactionEnabled()
isTransactionEnabled
in interface CacheConfiguration
public IsolationLevel getTransactionIsolationLevel()
CacheConfiguration
getTransactionIsolationLevel
in interface CacheConfiguration
IsolationLevel.NONE
if this cache is not transactional.public Mode getTransactionMode()
CacheConfiguration
getTransactionMode
in interface CacheConfiguration
Mode.NONE
if this cache is not transactional.public CacheLoader getCacheLoader()
CacheConfiguration
CacheLoader
, if any.getCacheLoader
in interface CacheConfiguration
CacheLoader
or null if none has been set.public CacheWriter getCacheWriter()
CacheConfiguration
CacheWriter
, if any.getCacheWriter
in interface CacheConfiguration
CacheWriter
or null if none has been set.Copyright © 2015 WSO2 Inc. All rights reserved.