Constructor and Description |
---|
CaffeineConfiguration() |
Modifier and Type | Method and Description |
---|---|
CaffeineConfiguration |
copy() |
String |
getAction() |
com.github.benmanes.caffeine.cache.Cache |
getCache() |
com.github.benmanes.caffeine.cache.CacheLoader |
getCacheLoader() |
EvictionType |
getEvictionType() |
int |
getExpireAfterAccessTime() |
int |
getExpireAfterWriteTime() |
int |
getInitialCapacity() |
Object |
getKey() |
Class<?> |
getKeyType() |
int |
getMaximumSize() |
com.github.benmanes.caffeine.cache.RemovalListener |
getRemovalListener() |
com.github.benmanes.caffeine.cache.stats.StatsCounter |
getStatsCounter() |
Class<?> |
getValueType() |
boolean |
isCreateCacheIfNotExist() |
boolean |
isStatsEnabled() |
void |
setAction(String action)
To configure the default cache action.
|
void |
setCache(com.github.benmanes.caffeine.cache.Cache cache)
To configure an already instantiated cache to be used
|
void |
setCacheLoader(com.github.benmanes.caffeine.cache.CacheLoader cacheLoader)
To configure a CacheLoader in case of a LoadCache use
|
void |
setCreateCacheIfNotExist(boolean createCacheIfNotExist)
Configure if a cache need to be created if it does exist or can't be
pre-configured.
|
void |
setEvictionType(EvictionType evictionType)
Set the eviction Type for this cache
|
void |
setExpireAfterAccessTime(int expireAfterAccessTime)
Set the expire After Access Time in case of time based Eviction (in
seconds)
|
void |
setExpireAfterWriteTime(int expireAfterWriteTime)
Set the expire After Access Write in case of time based Eviction (in
seconds)
|
void |
setInitialCapacity(int initialCapacity)
Set the initial Capacity for the cache
|
void |
setKey(Object key)
To configure the default action key.
|
void |
setKeyType(Class<?> keyType)
The cache key type, default "java.lang.Object"
|
void |
setMaximumSize(int maximumSize)
Set the maximum size for the cache
|
void |
setRemovalListener(com.github.benmanes.caffeine.cache.RemovalListener removalListener)
Set a specific removal Listener for the cache
|
void |
setStatsCounter(com.github.benmanes.caffeine.cache.stats.StatsCounter statsCounter)
Set a specific Stats Counter for the cache stats
|
void |
setStatsEnabled(boolean statsEnabled)
To enable stats on the cache
|
void |
setValueType(Class<?> valueType)
The cache value type, default "java.lang.Object"
|
public boolean isCreateCacheIfNotExist()
public void setCreateCacheIfNotExist(boolean createCacheIfNotExist)
public String getAction()
public void setAction(String action)
public Object getKey()
public void setKey(Object key)
public Class<?> getKeyType()
public void setKeyType(Class<?> keyType)
public Class<?> getValueType()
public void setValueType(Class<?> valueType)
public com.github.benmanes.caffeine.cache.Cache getCache()
public void setCache(com.github.benmanes.caffeine.cache.Cache cache)
public com.github.benmanes.caffeine.cache.CacheLoader getCacheLoader()
public void setCacheLoader(com.github.benmanes.caffeine.cache.CacheLoader cacheLoader)
public boolean isStatsEnabled()
public void setStatsEnabled(boolean statsEnabled)
public int getInitialCapacity()
public void setInitialCapacity(int initialCapacity)
public int getMaximumSize()
public void setMaximumSize(int maximumSize)
public EvictionType getEvictionType()
public void setEvictionType(EvictionType evictionType)
public int getExpireAfterAccessTime()
public void setExpireAfterAccessTime(int expireAfterAccessTime)
public int getExpireAfterWriteTime()
public void setExpireAfterWriteTime(int expireAfterWriteTime)
public com.github.benmanes.caffeine.cache.RemovalListener getRemovalListener()
public void setRemovalListener(com.github.benmanes.caffeine.cache.RemovalListener removalListener)
public com.github.benmanes.caffeine.cache.stats.StatsCounter getStatsCounter()
public void setStatsCounter(com.github.benmanes.caffeine.cache.stats.StatsCounter statsCounter)
public CaffeineConfiguration copy()
Apache Camel