Package org.opennms.core.cache
Class CacheConfig
- java.lang.Object
-
- org.opennms.core.cache.CacheConfig
-
- Direct Known Subclasses:
CacheConfig
public class CacheConfig extends Object
CacheConfig
bean to help configuring a Google GuavaCacheBuilder
. This is helpful when usingCacheBuilder
s in blueprint bundles.- See Also:
CacheBuilder
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CacheConfig()
CacheConfig(String cacheName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <K,V>
com.google.common.cache.CacheBuilder<K,V>createBuilder()
Long
getExpireAfterRead()
Long
getExpireAfterWrite()
Long
getMaximumSize()
com.codahale.metrics.MetricRegistry
getMetricRegistry()
String
getName()
boolean
isEnabled()
boolean
isRecordStats()
void
setEnabled(boolean enabled)
void
setExpireAfterRead(Long expireAfterRead)
void
setExpireAfterWrite(Long expireAfterWrite)
void
setMaximumSize(Long maxSize)
void
setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
void
setName(String name)
void
setRecordStats(boolean recordStats)
String
toString()
void
validate()
-
-
-
Constructor Detail
-
CacheConfig
protected CacheConfig()
-
CacheConfig
public CacheConfig(String cacheName)
-
-
Method Detail
-
getMaximumSize
public Long getMaximumSize()
-
setMaximumSize
public void setMaximumSize(Long maxSize)
-
getExpireAfterWrite
public Long getExpireAfterWrite()
-
setExpireAfterWrite
public void setExpireAfterWrite(Long expireAfterWrite)
-
isRecordStats
public boolean isRecordStats()
-
setRecordStats
public void setRecordStats(boolean recordStats)
-
getExpireAfterRead
public Long getExpireAfterRead()
-
setExpireAfterRead
public void setExpireAfterRead(Long expireAfterRead)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getMetricRegistry
public com.codahale.metrics.MetricRegistry getMetricRegistry()
-
setMetricRegistry
public void setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
createBuilder
protected <K,V> com.google.common.cache.CacheBuilder<K,V> createBuilder()
-
validate
public void validate()
-
-