Class DeclarableSupport
java.lang.Object
org.springframework.data.gemfire.support.DeclarableSupport
- All Implemented Interfaces:
CacheCallback
,Declarable
- Direct Known Subclasses:
WiringDeclarableSupport
Abstract base class for implementing Spring aware, Apache Geode
Declarable
components.
Provides subclasses with a reference to the current Spring BeanFactory
in order to
perform Spring bean lookups or resource loading.
Note, in most cases, the developer should just declare the same Apache Geode components as Spring beans
in the Spring container through the PeerRegionFactoryBean
, which gives full access to the Spring container
capabilities and does not enforce the Declarable
interface to be implemented.- Author:
- Costin Leau, John Blum
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected BeanFactory
Returns a reference to the SpringBeanFactory
.protected String
Returns the key used to lookup the SpringBeanFactory
.protected BeanFactory
Returns a reference to the SpringBeanFactory
.protected BeanFactory
locateBeanFactory
(String beanFactoryKey) Returns a reference to the SpringBeanFactory
for the givenbeanFactoryKey
.void
setBeanFactoryKey
(String beanFactoryKey) Set the key used to lookup the SpringBeanFactory
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
DeclarableSupport
public DeclarableSupport()
-
-
Method Details
-
getBeanFactory
Returns a reference to the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
. - See Also:
-
setBeanFactoryKey
Set the key used to lookup the SpringBeanFactory
.- Parameters:
beanFactoryKey
-String
containing the key used to lookup the SpringBeanFactory
.
-
getBeanFactoryKey
Returns the key used to lookup the SpringBeanFactory
.- Returns:
- a
String
containing the key used to lookup the SpringBeanFactory
.
-
locateBeanFactory
Returns a reference to the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
. - See Also:
-
locateBeanFactory
Returns a reference to the SpringBeanFactory
for the givenbeanFactoryKey
.- Parameters:
beanFactoryKey
-String
containing the key used to lookup the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
for the givenbeanFactoryKey
. - See Also:
-
close
public void close()- Specified by:
close
in interfaceCacheCallback
-