public class SmartCacheResolverFactoryBean extends AbstractFactoryBeanSupport<CacheResolver<org.apache.geode.cache.GemFireCache>> implements InitializingBean
FactoryBean
used to construct a custom, determined CacheResolver
that strategically
and lazily resolves a cache instance.Cache
,
GemFireCache
,
ClientCache
,
BeanFactory
,
FactoryBean
,
InitializingBean
,
CacheResolver
,
AbstractFactoryBeanSupport
DEFAULT_SINGLETON
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
SmartCacheResolverFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Initializes the
CacheResolver [composition] created by this FactoryBean . |
static SmartCacheResolverFactoryBean |
create()
Factory method used to construct a new instance of the
SmartCacheResolverFactoryBean . |
protected Optional<org.apache.geode.cache.GemFireCache> |
getCache() |
protected Optional<String> |
getCacheBeanName() |
protected org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy |
getCompositionStrategy() |
protected List<CacheResolver> |
getConfiguredCacheResolvers() |
CacheResolver<org.apache.geode.cache.GemFireCache> |
getObject()
Returns the fully constructed and initialized instance of the
CacheResolver
created by this FactoryBean . |
Class<?> |
getObjectType()
|
protected CacheResolver |
newBeanFactoryCacheResolver()
Constructs a
CacheResolver capable of resolving a cache instance from the Spring BeanFactory . |
protected CacheResolver |
newClientCacheFactoryCacheResolver()
Constructs a
CacheResolver capable of resolving a ClientCache instance using
the Apache Geode ClientCacheFactory API. |
protected CacheResolver |
newPeerCacheFactoryCacheResolver()
Constructs a
CacheResolver capable of resolving a peer Cache instance using
the Apache Geode CacheFactory API. |
protected CacheResolver |
newSingleCacheCacheResolver()
Constructs a
CacheResolver capable of resolving a single, configured cache instance. |
void |
setCache(org.apache.geode.cache.GemFireCache cache) |
void |
setCacheBeanName(String cacheBeanName) |
void |
setCompositionStrategy(org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy compositionStrategy) |
void |
setConfiguredCacheResolvers(List<CacheResolver> cacheResolvers) |
SmartCacheResolverFactoryBean |
usingCompositionStrategy(org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy compositionStrategy) |
SmartCacheResolverFactoryBean |
withCache(org.apache.geode.cache.GemFireCache cache) |
SmartCacheResolverFactoryBean |
withCacheBeanName(String cacheBeanName) |
getBeanClassLoader, getBeanFactory, getBeanName, getLogger, getOptionalLogger, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLogger, setBeanClassLoader, setBeanFactory, setBeanName
@NonNull public static SmartCacheResolverFactoryBean create()
SmartCacheResolverFactoryBean
.SmartCacheResolverFactoryBean
.SmartCacheResolverFactoryBean
public void afterPropertiesSet()
CacheResolver
[composition] created by this FactoryBean
.afterPropertiesSet
in interface InitializingBean
SmartCacheResolverFactoryBean.CompositionStrategy.use(SmartCacheResolverFactoryBean)
,
getCompositionStrategy()
@NonNull public CacheResolver<org.apache.geode.cache.GemFireCache> getObject()
CacheResolver
created by this FactoryBean
.
If the afterPropertiesSet()
method has not yet been called, then this method returns a Proxy
to the CacheResolver
instance that will eventually be created by this FactoryBean
.getObject
in interface FactoryBean<CacheResolver<org.apache.geode.cache.GemFireCache>>
CacheResolver
instance constructed and initialized by this FactoryBean
.FactoryBean.getObject()
,
CacheResolverProxy
@Nullable public Class<?> getObjectType()
getObjectType
in interface FactoryBean<CacheResolver<org.apache.geode.cache.GemFireCache>>
type
of the CacheResolver
returned by this FactoryBean
.FactoryBean.getObjectType()
,
Class
@Nullable protected CacheResolver newBeanFactoryCacheResolver()
CacheResolver
capable of resolving a cache instance from the Spring BeanFactory
.
Returns null if the BeanFactory
reference is null (i.e. not configured).CacheResolver
capable of resolving a cache instance from the Spring BeanFactory
.BeanFactoryCacheResolver
,
CacheResolver
,
AbstractFactoryBeanSupport.getBeanFactory()
@NonNull protected CacheResolver newClientCacheFactoryCacheResolver()
CacheResolver
capable of resolving a ClientCache
instance using
the Apache Geode ClientCacheFactory
API.CacheResolver
resolving a ClientCache
instance.ClientCacheFactoryCacheResolver
,
CacheResolver
@NonNull protected CacheResolver newPeerCacheFactoryCacheResolver()
CacheResolver
capable of resolving a peer Cache
instance using
the Apache Geode CacheFactory
API.CacheResolver
resolving a peer Cache
instance.CacheFactoryCacheResolver
,
CacheResolver
@Nullable protected CacheResolver newSingleCacheCacheResolver()
CacheResolver
capable of resolving a single, configured cache instance.
Returns null if a cache instance was not configured
on this FactoryBean
.CacheResolver
capable of resolving a single, configured cache instance.SingleCacheCacheResolver
,
CacheResolver
,
getCache()
public final void setCache(@Nullable org.apache.geode.cache.GemFireCache cache)
protected Optional<org.apache.geode.cache.GemFireCache> getCache()
public final void setCompositionStrategy(org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy compositionStrategy)
protected org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy getCompositionStrategy()
@Autowired(required=false) public final void setConfiguredCacheResolvers(List<CacheResolver> cacheResolvers)
protected List<CacheResolver> getConfiguredCacheResolvers()
public SmartCacheResolverFactoryBean withCache(org.apache.geode.cache.GemFireCache cache)
public SmartCacheResolverFactoryBean withCacheBeanName(String cacheBeanName)
public SmartCacheResolverFactoryBean usingCompositionStrategy(org.springframework.data.gemfire.support.SmartCacheResolverFactoryBean.CompositionStrategy compositionStrategy)
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.