Package org.springframework.data.gemfire
Class AbstractResolvableCacheFactoryBean
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<GemFireCache>
org.springframework.data.gemfire.AbstractBasicCacheFactoryBean
org.springframework.data.gemfire.AbstractConfigurableCacheFactoryBean
org.springframework.data.gemfire.AbstractResolvableCacheFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,BeanNameAware,DisposableBean,FactoryBean<GemFireCache>,InitializingBean,Phased,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
- Author:
- John Blum
- See Also:
-
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 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 GemFireCacheCalled ifAbstractBasicCacheFactoryBean.getCache()returns a nullGemFireCachereference fromAbstractBasicCacheFactoryBean.getObject().protected 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 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 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
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:
-
init
Initializes aGemFireCache.- Returns:
- a reference to the initialized
GemFireCache. - See Also:
-
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:
-
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:
-
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:
-
createCache
Creates a newGemFireCacheinstance using the providedfactory.- Type Parameters:
T-SubtypeofGemFireCache.- Parameters:
factory- factory used to create theGemFireCache.- Returns:
- a new instance of
GemFireCachecreated by the providedfactory. - See Also:
-
postProcess
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(org.apache.geode.cache.GemFireCache)AbstractBasicCacheFactoryBean.configureOffHeapPercentages(GemFireCache)AbstractBasicCacheFactoryBean.registerTransactionListeners(org.apache.geode.cache.GemFireCache)AbstractBasicCacheFactoryBean.registerTransactionWriter(org.apache.geode.cache.GemFireCache)
-