public class InfinispanDefaultCacheFactoryBean<K,V> extends Object implements org.springframework.beans.factory.FactoryBean<Cache<K,V>>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A for creating a
native default Infinispan FactoryBean
, delegating to a org.infinispan.Cacheconfigurable.
A default org.infinispan.manager.CacheContainerCache 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.
| Constructor and Description |
|---|
InfinispanDefaultCacheFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
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. |
protected final Log logger
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.InitializingBeanExceptionInitializingBean.afterPropertiesSet()public boolean isSingleton()
true.public void destroy()
throws Exception
org.infinispan.Cache created by this FactoryBean.destroy in interface org.springframework.beans.factory.DisposableBeanExceptionDisposableBean.destroy(),
Lifecycle.stop()Copyright © 2025 JBoss, a division of Red Hat. All rights reserved.