|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.spring.support.InfinispanDefaultCacheFactoryBean<K,V>
public class InfinispanDefaultCacheFactoryBean<K,V>
A
for creating a
native default Infinispan FactoryBean
, delegating to a org.infinispan.Cache
configurable
.
A default org.infinispan.manager.CacheContainer
Cache
is a Cache
that uses its CacheContainer
's
default settings. This is contrary to a named Cache
where select settings
from a CacheContainer
's default configuration may be overridden with settings
specific to that Cache
.
In addition to creating a Cache
this FactoryBean
does also control that
Cache
's lifecycle
by shutting it down
when the enclosing Spring application context is closed. It is therefore advisable to
always use this FactoryBean
when creating a Cache
.
Field Summary | |
---|---|
protected Log |
logger
|
Constructor Summary | |
---|---|
InfinispanDefaultCacheFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
Shuts down the org.infinispan.Cache created by this FactoryBean . |
Cache<K,V> |
getObject()
|
Class<? extends Cache> |
getObjectType()
|
boolean |
isSingleton()
Always returns true . |
void |
setInfinispanCacheContainer(CacheContainer infinispanCacheContainer)
Sets the to be used for creating our
instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log logger
Constructor Detail |
---|
public InfinispanDefaultCacheFactoryBean()
Method Detail |
---|
public void setInfinispanCacheContainer(CacheContainer infinispanCacheContainer)
Sets the
to be used for creating our
org.infinispan.manager.CacheContainer
instance. Note that this is a
mandatory property.
Cache
infinispanCacheContainer
- The org.infinispan.manager.CacheContainer
to be used for creating our
Cache
instancepublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public Cache<K,V> getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
Exception
FactoryBean.getObject()
public Class<? extends Cache> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
FactoryBean.getObjectType()
public boolean isSingleton()
true
.
isSingleton
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
true
FactoryBean.isSingleton()
public void destroy() throws Exception
org.infinispan.Cache
created by this FactoryBean
.
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
DisposableBean.destroy()
,
Lifecycle.stop()
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |