Package org.springframework.data.gemfire
Class AbstractResolvableCacheFactoryBean
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<org.apache.geode.cache.GemFireCache>
org.springframework.data.gemfire.AbstractBasicCacheFactoryBean
org.springframework.data.gemfire.AbstractConfigurableCacheFactoryBean
org.springframework.data.gemfire.AbstractResolvableCacheFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.GemFireCache>
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.Phased
,org.springframework.dao.support.PersistenceExceptionTranslator
- Direct Known Subclasses:
CacheFactoryBean
public abstract class AbstractResolvableCacheFactoryBean
extends AbstractConfigurableCacheFactoryBean
Abstract base class encapsulating logic to resolve or create a
GemFireCache
instance.- Since:
- 2.5.0
- See Also:
-
Optional
Properties
GemFireCache
DistributedMember
DistributedSystem
AbstractConfigurableCacheFactoryBean
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.gemfire.AbstractBasicCacheFactoryBean
AbstractBasicCacheFactoryBean.CacheFactoryInitializer<T>, AbstractBasicCacheFactoryBean.PdxConfigurer<T>
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
DEFAULT_SINGLETON
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
configureFactory
(Object factory) Configures the cache factory used to create theGemFireCache
.protected abstract <T extends org.apache.geode.cache.GemFireCache>
TcreateCache
(Object factory) Creates a newGemFireCache
instance using the providedfactory
.protected abstract Object
createFactory
(Properties gemfireProperties) Constructs a new cache factory initialized with the given Apache GeodeProperties
used to construct, configure and initialize a newGemFireCache
.protected org.apache.geode.cache.GemFireCache
Called ifAbstractBasicCacheFactoryBean.getCache()
returns a nullGemFireCache
reference fromAbstractBasicCacheFactoryBean.getObject()
.protected org.apache.geode.cache.GemFireCache
init()
Initializes aGemFireCache
.protected Object
initializeFactory
(Object factory) Initializes the givenCacheFactory
orClientCacheFactory
with the configuredAbstractBasicCacheFactoryBean.CacheFactoryInitializer
.protected Object
postProcess
(Object factory) Post process the cache factory used to create theGemFireCache
.protected <T extends org.apache.geode.cache.GemFireCache>
TpostProcess
(T cache) Post process theGemFireCache
by loading any cache.xml file, applying custom settings specified in SDG XML configuration metadata, and registering appropriate Transaction Listeners, Writer and JVM Heap configuration.protected <T extends org.apache.geode.cache.GemFireCache>
TResolves aGemFireCache
by attempting to lookup an existingGemFireCache
instance in the JVM, first.Methods inherited from class org.springframework.data.gemfire.AbstractConfigurableCacheFactoryBean
afterPropertiesSet, destroy, getBeanFactoryLocator, getCacheXml, getOptionalBeanFactoryLocator, getOptionalCacheXml, getProperties, isCacheXmlPresent, isCacheXmlResolvableAsAFile, isUseBeanFactoryLocator, loadCacheXml, resolveProperties, setAndGetProperties, setBeanFactoryLocator, setCacheXml, setProperties, setUseBeanFactoryLocator
Methods inherited from class org.springframework.data.gemfire.AbstractBasicCacheFactoryBean
applyCacheConfigurers, close, configureHeapPercentages, configureOffHeapPercentages, configurePdx, doFetchCache, doGetObjectType, fetchCache, getCache, getCacheFactoryInitializer, getCopyOnRead, getCriticalHeapPercentage, getCriticalOffHeapPercentage, getEvictionHeapPercentage, getEvictionOffHeapPercentage, getObject, getObjectType, getOptionalCache, getPdxDiskStoreName, getPdxIgnoreUnreadFields, getPdxPersistent, getPdxReadSerialized, getPdxSerializer, getPhase, getTransactionListeners, getTransactionWriter, isClose, isCopyOnRead, isNotClosed, registerTransactionListeners, registerTransactionWriter, setCache, setCacheFactoryInitializer, setClose, setCopyOnRead, setCriticalHeapPercentage, setCriticalOffHeapPercentage, setEvictionHeapPercentage, setEvictionOffHeapPercentage, setPdxDiskStoreName, setPdxIgnoreUnreadFields, setPdxPersistent, setPdxReadSerialized, setPdxSerializer, setPhase, setTransactionListeners, setTransactionWriter, translateExceptionIfPossible
Methods inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
getBeanClassLoader, getBeanFactory, getBeanName, getLogger, getOptionalLogger, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLogger, setBeanClassLoader, setBeanFactory, setBeanName
-
Constructor Details
-
AbstractResolvableCacheFactoryBean
public AbstractResolvableCacheFactoryBean()
-
-
Method Details
-
doGetObject
protected org.apache.geode.cache.GemFireCache doGetObject()Description copied from class:AbstractBasicCacheFactoryBean
Called ifAbstractBasicCacheFactoryBean.getCache()
returns a nullGemFireCache
reference fromAbstractBasicCacheFactoryBean.getObject()
.- Specified by:
doGetObject
in classAbstractBasicCacheFactoryBean
- Returns:
- a new constructed, configured and initialized
GemFireCache
instance. - See Also:
-
GemFireCache
AbstractBasicCacheFactoryBean.getObject()
-
init
protected org.apache.geode.cache.GemFireCache init()Initializes aGemFireCache
.- Returns:
- a reference to the initialized
GemFireCache
. - See Also:
-
resolveCache
protected <T extends org.apache.geode.cache.GemFireCache> T resolveCache()Resolves aGemFireCache
by attempting to lookup an existingGemFireCache
instance in the JVM, first. If an existingGemFireCache
could not be found, then this method proceeds in attempting to create a newGemFireCache
instance.- Type Parameters:
T
- parameterizedClass
type extendingGemFireCache
.- Returns:
- the resolved
GemFireCache
. - See Also:
-
createFactory
Constructs a new cache factory initialized with the given Apache GeodeProperties
used to construct, configure and initialize a newGemFireCache
.- Parameters:
gemfireProperties
-Properties
used by the cache factory to configure theGemFireCache
; must not be null- Returns:
- a new cache factory initialized with the given Apache Geode
Properties
. - See Also:
-
ClientCacheFactory
CacheFactory
Properties
AbstractConfigurableCacheFactoryBean.resolveProperties()
-
configureFactory
Configures the cache factory used to create theGemFireCache
.- Parameters:
factory
- cache factory to configure; must not be null.- Returns:
- the given cache factory.
- See Also:
-
initializeFactory
Description copied from class:AbstractBasicCacheFactoryBean
Initializes the givenCacheFactory
orClientCacheFactory
with the configuredAbstractBasicCacheFactoryBean.CacheFactoryInitializer
.- Overrides:
initializeFactory
in classAbstractBasicCacheFactoryBean
- Parameters:
factory
-CacheFactory
orClientCacheFactory
to initialize.- Returns:
- the initialized
CacheFactory
orClientCacheFactory
. - See Also:
-
AbstractBasicCacheFactoryBean.CacheFactoryInitializer.initialize(Object)
ClientCacheFactory
CacheFactory
AbstractBasicCacheFactoryBean.getCacheFactoryInitializer()
-
postProcess
Post process the cache factory used to create theGemFireCache
.- Parameters:
factory
- cache factory to post process; must not be null.- Returns:
- the post processed cache factory.
- See Also:
-
ClientCacheFactory
CacheFactory
createFactory(Properties)
-
createCache
@NonNull protected abstract <T extends org.apache.geode.cache.GemFireCache> T createCache(@NonNull Object factory) Creates a newGemFireCache
instance using the providedfactory
. -
postProcess
@NonNull protected <T extends org.apache.geode.cache.GemFireCache> T postProcess(@NonNull T cache) Post process theGemFireCache
by loading any cache.xml file, applying custom settings specified in SDG XML configuration metadata, and registering appropriate Transaction Listeners, Writer and JVM Heap configuration.- Type Parameters:
T
- parameterizedClass
type extendingGemFireCache
.- Parameters:
cache
-GemFireCache
to post process.- Returns:
- the given
GemFireCache
. - See Also:
-
AbstractConfigurableCacheFactoryBean.loadCacheXml(GemFireCache)
GemFireCache.loadCacheXml(java.io.InputStream)
AbstractBasicCacheFactoryBean.configureHeapPercentages(GemFireCache)
AbstractBasicCacheFactoryBean.configureOffHeapPercentages(GemFireCache)
AbstractBasicCacheFactoryBean.registerTransactionListeners(GemFireCache)
AbstractBasicCacheFactoryBean.registerTransactionWriter(GemFireCache)
-