Spring Data for VMware GemFire
Class DeclarableSupport
java.lang.Object
org.springframework.data.gemfire.support.DeclarableSupport
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback,org.apache.geode.cache.Declarable
- Direct Known Subclasses:
WiringDeclarableSupport
public abstract class DeclarableSupport
extends Object
implements org.apache.geode.cache.CacheCallback, org.apache.geode.cache.Declarable
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.- See Also:
-
CacheCallbackDeclarableBeanFactoryGemfireBeanFactoryLocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected org.springframework.beans.factory.BeanFactoryReturns a reference to the SpringBeanFactory.protected StringReturns the key used to lookup the SpringBeanFactory.protected org.springframework.beans.factory.BeanFactoryReturns a reference to the SpringBeanFactory.protected org.springframework.beans.factory.BeanFactorylocateBeanFactory(String beanFactoryKey) Returns a reference to the SpringBeanFactoryfor the givenbeanFactoryKey.voidsetBeanFactoryKey(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, waitMethods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
DeclarableSupport
public DeclarableSupport()
-
-
Method Details
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory 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-Stringcontaining the key used to lookup the SpringBeanFactory.
-
getBeanFactoryKey
Returns the key used to lookup the SpringBeanFactory.- Returns:
- a
Stringcontaining the key used to lookup the SpringBeanFactory.
-
locateBeanFactory
protected org.springframework.beans.factory.BeanFactory locateBeanFactory()Returns a reference to the SpringBeanFactory.- Returns:
- a reference to the Spring
BeanFactory. - See Also:
-
BeanFactorylocateBeanFactory(String)getBeanFactoryKey()
-
locateBeanFactory
Returns a reference to the SpringBeanFactoryfor the givenbeanFactoryKey.- Parameters:
beanFactoryKey-Stringcontaining the key used to lookup the SpringBeanFactory.- Returns:
- a reference to the Spring
BeanFactoryfor the givenbeanFactoryKey. - See Also:
-
GemfireBeanFactoryLocator.useBeanFactory(String)BeanFactory
-
close
public void close()- Specified by:
closein interfaceorg.apache.geode.cache.CacheCallback
-