public abstract class AbstractConfigurableCacheFactoryBean extends AbstractBasicCacheFactoryBean
ClientCache
or peer Cache as a bean in the Spring context.File,
InputStream,
Properties,
Cache,
GemFireCache,
ClientCache,
BeanFactory,
Resource,
AbstractBasicCacheFactoryBean,
GemfireBeanFactoryLocatorAbstractBasicCacheFactoryBean.CacheFactoryInitializer<T>, AbstractBasicCacheFactoryBean.PdxConfigurer<T>DEFAULT_SINGLETONOBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
AbstractConfigurableCacheFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initializes the
GemfireBeanFactoryLocator if isUseBeanFactoryLocator() returns true
and an existing GemfireBeanFactoryLocator is not already present. |
void |
destroy()
Destroys and releases resources used by the
GemfireBeanFactoryLocator, if present. |
GemfireBeanFactoryLocator |
getBeanFactoryLocator()
Returns a reference to the configured
GemfireBeanFactoryLocator used to resolve Spring bean references
in Apache Geode native configuration metadata (e.g. |
Resource |
getCacheXml()
Returns a reference to an (optional) Apache Geode native cache.xml
Resource. |
Optional<GemfireBeanFactoryLocator> |
getOptionalBeanFactoryLocator()
Returns an
Optional reference to the configured GemfireBeanFactoryLocator used to
resolve Spring bean references in Apache Geode native configuration metadata (e.g. |
Optional<Resource> |
getOptionalCacheXml()
|
Properties |
getProperties()
Returns a reference to the Apache Geode
Properties used to configure the cache. |
protected boolean |
isCacheXmlPresent()
Determines whether a cache.xml
Resource exists (i.e. is present). |
protected boolean |
isCacheXmlResolvableAsAFile()
Determines whether the optionally configured cache.xml is resolvable as a
File
in the file system. |
boolean |
isUseBeanFactoryLocator()
Determines whether the
GemfireBeanFactoryLocator has been enabled. |
protected <T extends org.apache.geode.cache.GemFireCache> |
loadCacheXml(T cache)
Loads the configured cache.xml to initialize the
GemFireCache. |
protected Properties |
resolveProperties()
Resolves the Apache Geode
Properties used to configure the GemFireCache. |
Properties |
setAndGetProperties(Properties properties)
Sets and then returns a reference to Apache Geode
Properties used to configure the cache. |
protected void |
setBeanFactoryLocator(GemfireBeanFactoryLocator beanFactoryLocator)
Gets a reference to the configured
GemfireBeanFactoryLocator used to resolve Spring bean references
in Apache Geode native configuration metadata (e.g. |
void |
setCacheXml(Resource cacheXml)
Sets a reference to an (optional) Apache Geode native cache.xml
Resource. |
void |
setProperties(Properties properties)
Sets the Apache Geode
Properties used to configure the cache. |
void |
setUseBeanFactoryLocator(boolean use)
Sets a boolean value used to determine whether to enable the
GemfireBeanFactoryLocator. |
applyCacheConfigurers, close, configureHeapPercentages, configureOffHeapPercentages, configurePdx, doFetchCache, doGetObject, doGetObjectType, fetchCache, getCache, getCacheFactoryInitializer, getCopyOnRead, getCriticalHeapPercentage, getCriticalOffHeapPercentage, getEvictionHeapPercentage, getEvictionOffHeapPercentage, getObject, getObjectType, getOptionalCache, getPdxDiskStoreName, getPdxIgnoreUnreadFields, getPdxPersistent, getPdxReadSerialized, getPdxSerializer, getPhase, getTransactionListeners, getTransactionWriter, initializeFactory, isClose, isCopyOnRead, registerTransactionListeners, registerTransactionWriter, setCache, setCacheFactoryInitializer, setClose, setCopyOnRead, setCriticalHeapPercentage, setCriticalOffHeapPercentage, setEvictionHeapPercentage, setEvictionOffHeapPercentage, setPdxDiskStoreName, setPdxIgnoreUnreadFields, setPdxPersistent, setPdxReadSerialized, setPdxSerializer, setPhase, setTransactionListeners, setTransactionWriter, translateExceptionIfPossiblegetBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanNamepublic AbstractConfigurableCacheFactoryBean()
protected void setBeanFactoryLocator(@Nullable GemfireBeanFactoryLocator beanFactoryLocator)
GemfireBeanFactoryLocator used to resolve Spring bean references
in Apache Geode native configuration metadata (e.g. cache.xml).beanFactoryLocator - reference to the configured GemfireBeanFactoryLocator.GemfireBeanFactoryLocator@Nullable public GemfireBeanFactoryLocator getBeanFactoryLocator()
GemfireBeanFactoryLocator used to resolve Spring bean references
in Apache Geode native configuration metadata (e.g. cache.xml).GemfireBeanFactoryLocator.GemfireBeanFactoryLocatorpublic Optional<GemfireBeanFactoryLocator> getOptionalBeanFactoryLocator()
Optional reference to the configured GemfireBeanFactoryLocator used to
resolve Spring bean references in Apache Geode native configuration metadata (e.g. cache.xml).Optional reference to the configured GemfireBeanFactoryLocator.GemfireBeanFactoryLocator,
getBeanFactoryLocator(),
Optionalpublic void setCacheXml(@Nullable Resource cacheXml)
Resource.@Nullable public Resource getCacheXml()
Resource.public Optional<Resource> getOptionalCacheXml()
Optional reference to an Apache Geode native cache.xml Resource.Resource,
Optional,
getCacheXml()protected boolean isCacheXmlPresent()
Resource exists (i.e. is present).Resource.exists(),
getCacheXml()protected boolean isCacheXmlResolvableAsAFile()
File
in the file system.File in the file system.Resource.isFile(),
getCacheXml(),
File@Nullable public Properties setAndGetProperties(@Nullable Properties properties)
Properties used to configure the cache.properties - reference to Apache Geode Properties used to configure the cache.Properties used to configure the cache.setProperties(Properties),
getProperties(),
Propertiespublic void setProperties(@Nullable Properties properties)
Properties used to configure the cache.properties - reference to Apache Geode Properties used to configure the cache.Properties@Nullable public Properties getProperties()
Properties used to configure the cache.Properties.Propertiespublic void setUseBeanFactoryLocator(boolean use)
GemfireBeanFactoryLocator.use - boolean value used to determine whether to enable the GemfireBeanFactoryLocator.GemfireBeanFactoryLocatorpublic boolean isUseBeanFactoryLocator()
GemfireBeanFactoryLocator has been enabled.GemfireBeanFactoryLocator has been enabled.GemfireBeanFactoryLocatorpublic void afterPropertiesSet()
throws Exception
GemfireBeanFactoryLocator if isUseBeanFactoryLocator() returns true
and an existing GemfireBeanFactoryLocator is not already present.afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractBasicCacheFactoryBeanException - if initialization fails.GemfireBeanFactoryLocator.newBeanFactoryLocator(BeanFactory, String),
getOptionalBeanFactoryLocator(),
isUseBeanFactoryLocator(),
AbstractFactoryBeanSupport.getBeanFactory(),
AbstractFactoryBeanSupport.getBeanName()public void destroy()
GemfireBeanFactoryLocator, if present.destroy in interface DisposableBeandestroy in class AbstractBasicCacheFactoryBeanGemfireBeanFactoryLocator.destroy(),
getOptionalBeanFactoryLocator()@NonNull protected <T extends org.apache.geode.cache.GemFireCache> T loadCacheXml(@NonNull T cache)
GemFireCache.T - parameterized Class type extending GemFireCache.cache - GemFireCache instance to initialize with cache.xml; must not be null.GemFireCache.RuntimeException - if the configured cache.xml file could not be loaded
into the GemFireCache.GemFireCache.loadCacheXml(InputStream),
GemFireCache,
getOptionalCacheXml()@NonNull protected Properties resolveProperties()
Properties used to configure the GemFireCache.Properties used to configure the GemFireCache.setAndGetProperties(Properties),
getProperties(),
PropertiesCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.