Package org.craftercms.commons.cache
Class GuavaCacheFactoryBean<K,V>
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<com.google.common.cache.Cache<K,V>>
-
- org.craftercms.commons.cache.GuavaCacheFactoryBean<K,V>
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<com.google.common.cache.Cache<K,V>>
,org.springframework.beans.factory.InitializingBean
public class GuavaCacheFactoryBean<K,V> extends org.springframework.beans.factory.config.AbstractFactoryBean<com.google.common.cache.Cache<K,V>> implements org.springframework.beans.factory.BeanNameAware
SpringFactoryBean
used to create Guava caches as beans.- Since:
- 4.0.0
- Author:
- joseross
-
-
Constructor Summary
Constructors Constructor Description GuavaCacheFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.common.cache.Cache<K,V>
createInstance()
protected void
destroyInstance(com.google.common.cache.Cache<K,V> instance)
Class<?>
getObjectType()
void
setBeanName(String name)
void
setMaxSize(long maxSize)
void
setRecordStats(boolean recordStats)
void
setTimeToIdle(long timeToIdle)
void
setTimeToLive(long timeToLive)
-
-
-
Method Detail
-
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
setRecordStats
public void setRecordStats(boolean recordStats)
-
setMaxSize
public void setMaxSize(long maxSize)
-
setTimeToLive
public void setTimeToLive(long timeToLive)
-
setTimeToIdle
public void setTimeToIdle(long timeToIdle)
-
getObjectType
public Class<?> getObjectType()
-
-