Class CaffeineConfiguration
- java.lang.Object
-
- org.apache.camel.component.caffeine.CaffeineConfiguration
-
-
Constructor Summary
Constructors Constructor Description CaffeineConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CaffeineConfiguration
copy()
String
getAction()
com.github.benmanes.caffeine.cache.CacheLoader
getCacheLoader()
EvictionType
getEvictionType()
int
getExpireAfterAccessTime()
int
getExpireAfterWriteTime()
int
getInitialCapacity()
Object
getKey()
String
getKeyType()
int
getMaximumSize()
com.github.benmanes.caffeine.cache.RemovalListener
getRemovalListener()
com.github.benmanes.caffeine.cache.stats.StatsCounter
getStatsCounter()
String
getValueType()
boolean
isCreateCacheIfNotExist()
boolean
isStatsEnabled()
void
setAction(String action)
To configure the default cache action.void
setCacheLoader(com.github.benmanes.caffeine.cache.CacheLoader cacheLoader)
To configure a CacheLoader in case of a LoadCache usevoid
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 cachevoid
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 cachevoid
setKey(Object key)
To configure the default action key.void
setKeyType(String keyType)
The cache key type, default "java.lang.Object"void
setMaximumSize(int maximumSize)
Set the maximum size for the cachevoid
setRemovalListener(com.github.benmanes.caffeine.cache.RemovalListener removalListener)
Set a specific removal Listener for the cachevoid
setStatsCounter(com.github.benmanes.caffeine.cache.stats.StatsCounter statsCounter)
Set a specific Stats Counter for the cache statsvoid
setStatsEnabled(boolean statsEnabled)
To enable stats on the cachevoid
setValueType(String valueType)
The cache value type, default "java.lang.Object"
-
-
-
Method Detail
-
isCreateCacheIfNotExist
public boolean isCreateCacheIfNotExist()
-
setCreateCacheIfNotExist
public void setCreateCacheIfNotExist(boolean createCacheIfNotExist)
Configure if a cache need to be created if it does exist or can't be pre-configured.
-
getAction
public String getAction()
-
setAction
public void setAction(String action)
To configure the default cache action. If an action is set in the message header, then the operation from the header takes precedence.
-
getKey
public Object getKey()
-
setKey
public void setKey(Object key)
To configure the default action key. If a key is set in the message header, then the key from the header takes precedence.
-
getKeyType
public String getKeyType()
-
setKeyType
public void setKeyType(String keyType)
The cache key type, default "java.lang.Object"
-
getValueType
public String getValueType()
-
setValueType
public void setValueType(String valueType)
The cache value type, default "java.lang.Object"
-
getCacheLoader
public com.github.benmanes.caffeine.cache.CacheLoader getCacheLoader()
-
setCacheLoader
public void setCacheLoader(com.github.benmanes.caffeine.cache.CacheLoader cacheLoader)
To configure a CacheLoader in case of a LoadCache use
-
isStatsEnabled
public boolean isStatsEnabled()
-
setStatsEnabled
public void setStatsEnabled(boolean statsEnabled)
To enable stats on the cache
-
getInitialCapacity
public int getInitialCapacity()
-
setInitialCapacity
public void setInitialCapacity(int initialCapacity)
Set the initial Capacity for the cache
-
getMaximumSize
public int getMaximumSize()
-
setMaximumSize
public void setMaximumSize(int maximumSize)
Set the maximum size for the cache
-
getEvictionType
public EvictionType getEvictionType()
-
setEvictionType
public void setEvictionType(EvictionType evictionType)
Set the eviction Type for this cache
-
getExpireAfterAccessTime
public int getExpireAfterAccessTime()
-
setExpireAfterAccessTime
public void setExpireAfterAccessTime(int expireAfterAccessTime)
Set the expire After Access Time in case of time based Eviction (in seconds)
-
getExpireAfterWriteTime
public int getExpireAfterWriteTime()
-
setExpireAfterWriteTime
public void setExpireAfterWriteTime(int expireAfterWriteTime)
Set the expire After Access Write in case of time based Eviction (in seconds)
-
getRemovalListener
public com.github.benmanes.caffeine.cache.RemovalListener getRemovalListener()
-
setRemovalListener
public void setRemovalListener(com.github.benmanes.caffeine.cache.RemovalListener removalListener)
Set a specific removal Listener for the cache
-
getStatsCounter
public com.github.benmanes.caffeine.cache.stats.StatsCounter getStatsCounter()
-
setStatsCounter
public void setStatsCounter(com.github.benmanes.caffeine.cache.stats.StatsCounter statsCounter)
Set a specific Stats Counter for the cache stats
-
copy
public CaffeineConfiguration copy()
-
-