Spring Data for VMware GemFire
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:
-
OptionalPropertiesGemFireCacheDistributedMemberDistributedSystemAbstractConfigurableCacheFactoryBean
-
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_SINGLETONFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectconfigureFactory(Object factory) Configures the cache factory used to create theGemFireCache.protected abstract <T extends org.apache.geode.cache.GemFireCache>
TcreateCache(Object factory) Creates a newGemFireCacheinstance using the providedfactory.protected abstract ObjectcreateFactory(Properties gemfireProperties) Constructs a new cache factory initialized with the given Apache GeodePropertiesused to construct, configure and initialize a newGemFireCache.protected org.apache.geode.cache.GemFireCacheCalled ifAbstractBasicCacheFactoryBean.getCache()returns a nullGemFireCachereference fromAbstractBasicCacheFactoryBean.getObject().protected org.apache.geode.cache.GemFireCacheinit()Initializes aGemFireCache.protected ObjectinitializeFactory(Object factory) Initializes the givenCacheFactoryorClientCacheFactorywith the configuredAbstractBasicCacheFactoryBean.CacheFactoryInitializer.protected ObjectpostProcess(Object factory) Post process the cache factory used to create theGemFireCache.protected <T extends org.apache.geode.cache.GemFireCache>
TpostProcess(T cache) Post process theGemFireCacheby 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 aGemFireCacheby attempting to lookup an existingGemFireCacheinstance 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, setUseBeanFactoryLocatorMethods 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, translateExceptionIfPossibleMethods 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:AbstractBasicCacheFactoryBeanCalled ifAbstractBasicCacheFactoryBean.getCache()returns a nullGemFireCachereference fromAbstractBasicCacheFactoryBean.getObject().- Specified by:
doGetObjectin classAbstractBasicCacheFactoryBean- Returns:
- a new constructed, configured and initialized
GemFireCacheinstance. - See Also:
-
GemFireCacheAbstractBasicCacheFactoryBean.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 aGemFireCacheby attempting to lookup an existingGemFireCacheinstance in the JVM, first. If an existingGemFireCachecould not be found, then this method proceeds in attempting to create a newGemFireCacheinstance.- Type Parameters:
T- parameterizedClasstype extendingGemFireCache.- Returns:
- the resolved
GemFireCache. - See Also:
-
createFactory
Constructs a new cache factory initialized with the given Apache GeodePropertiesused to construct, configure and initialize a newGemFireCache.- Parameters:
gemfireProperties-Propertiesused 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:
-
ClientCacheFactoryCacheFactoryPropertiesAbstractConfigurableCacheFactoryBean.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:AbstractBasicCacheFactoryBeanInitializes the givenCacheFactoryorClientCacheFactorywith the configuredAbstractBasicCacheFactoryBean.CacheFactoryInitializer.- Overrides:
initializeFactoryin classAbstractBasicCacheFactoryBean- Parameters:
factory-CacheFactoryorClientCacheFactoryto initialize.- Returns:
- the initialized
CacheFactoryorClientCacheFactory. - See Also:
-
AbstractBasicCacheFactoryBean.CacheFactoryInitializer.initialize(Object)ClientCacheFactoryCacheFactoryAbstractBasicCacheFactoryBean.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:
-
ClientCacheFactoryCacheFactorycreateFactory(Properties)
-
createCache
@NonNull protected abstract <T extends org.apache.geode.cache.GemFireCache> T createCache(@NonNull Object factory) Creates a newGemFireCacheinstance using the providedfactory. -
postProcess
@NonNull protected <T extends org.apache.geode.cache.GemFireCache> T postProcess(@NonNull T cache) Post process theGemFireCacheby 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- parameterizedClasstype extendingGemFireCache.- Parameters:
cache-GemFireCacheto 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)
-