public class BeanFactoryCacheResolver extends AbstractCachingCacheResolver<org.apache.geode.cache.GemFireCache> implements BeanFactoryAware
CacheResolver
implementation capable of resolving a GemFireCache
instance
from the Spring BeanFactory
.GemFireCache
,
BeanFactory
,
BeanFactoryAware
,
CacheResolver
,
AbstractCachingCacheResolver
Constructor and Description |
---|
BeanFactoryCacheResolver(BeanFactory beanFactory)
Constructs a new instance of
BeanFactoryCacheResolver initialized with the given, required
Spring BeanFactory . |
Modifier and Type | Method and Description |
---|---|
protected org.apache.geode.cache.GemFireCache |
doResolve()
Uses the configured Spring
BeanFactory to resolve a reference to
the single GemFireCache instance. |
protected BeanFactory |
getBeanFactory()
Returns the configured reference to the Spring
BeanFactory used to resolve the single instance
of the GemFireCache . |
Optional<String> |
getCacheBeanName()
Returns the optionally configured
bean name used to further qualify the resolution of
the GemFireCache object reference in a Spring context. |
void |
setBeanFactory(BeanFactory beanFactory)
Sets a reference to the
BeanFactory used to resolve the GemFireCache . |
void |
setCacheBeanName(String cacheBeanName)
Sets (configures) the
bean name used to further qualify the resolution of
the GemFireCache object reference in a Spring context. |
resolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
public BeanFactoryCacheResolver(BeanFactory beanFactory)
BeanFactoryCacheResolver
initialized with the given, required
Spring BeanFactory
.beanFactory
- BeanFactory
used to resolve the GemFireCache
.IllegalArgumentException
- if BeanFactory
is null.BeanFactory
public final void setBeanFactory(@NonNull BeanFactory beanFactory) throws BeansException
BeanFactory
used to resolve the GemFireCache
.setBeanFactory
in interface BeanFactoryAware
beanFactory
- BeanFactory
used to resolve the GemFireCache
.IllegalArgumentException
- if BeanFactory
is null.BeansException
- if configuration of the BeanFactory
fails.BeanFactory
@NonNull protected BeanFactory getBeanFactory()
BeanFactory
used to resolve the single instance
of the GemFireCache
.BeanFactory
.BeanFactory
public void setCacheBeanName(String cacheBeanName)
bean name
used to further qualify the resolution of
the GemFireCache
object reference in a Spring context.cacheBeanName
- name
of the GemFireCache
bean in the Spring context.public Optional<String> getCacheBeanName()
bean name
used to further qualify the resolution of
the GemFireCache
object reference in a Spring context.name
of the GemFireCache
bean in the Spring context.protected org.apache.geode.cache.GemFireCache doResolve()
BeanFactory
to resolve a reference to
the single GemFireCache
instance.doResolve
in class AbstractCachingCacheResolver<org.apache.geode.cache.GemFireCache>
GemFireCache
bean.BeanFactory.getBean(Class)
,
GemFireCache
,
getBeanFactory()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.