public class RegionLookupFactoryBean<K,V> extends Object implements FactoryBean<com.gemstone.gemfire.cache.Region<K,V>>, InitializingBean, BeanNameAware
Regions. If the Region does not exist,
an exception is thrown. For declaring and configuring new regions, see RegionFactoryBean.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
RegionLookupFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Boolean |
getLookupEnabled() |
com.gemstone.gemfire.cache.Region<K,V> |
getObject() |
Class<?> |
getObjectType() |
protected com.gemstone.gemfire.cache.Region<?,?> |
getParent()
Gets a reference to the parent Region if this FactoryBean represents a GemFire Cache Sub-Region.
|
protected com.gemstone.gemfire.cache.Region<K,V> |
getRegion() |
boolean |
isSingleton() |
protected com.gemstone.gemfire.cache.Region<K,V> |
lookupFallback(com.gemstone.gemfire.cache.GemFireCache cache,
String regionName)
Fallback method in case the named Region does not exist.
|
void |
setBeanName(String name)
Sets the name of the Cache Region based on the bean 'id' attribute.
|
void |
setCache(com.gemstone.gemfire.cache.GemFireCache cache)
Sets a reference to the Cache used to create the Region.
|
void |
setLookupEnabled(Boolean lookupEnabled) |
void |
setName(String name)
Sets the name of the Cache Region based on the bean 'name' attribute.
|
void |
setParent(com.gemstone.gemfire.cache.Region<?,?> parent)
Sets a reference to the parent Region if this FactoryBean represents a GemFire Cache Sub-Region.
|
void |
setRegionName(String regionName)
Sets the name of the Cache Region as expected by GemFire.
|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionprotected com.gemstone.gemfire.cache.Region<K,V> lookupFallback(com.gemstone.gemfire.cache.GemFireCache cache, String regionName) throws Exception
cache - a reference to the GemFire Cache.regionName - the name of the GemFire Cache Region.Exception - if the lookup operation fails.public com.gemstone.gemfire.cache.Region<K,V> getObject() throws Exception
getObject in interface FactoryBean<com.gemstone.gemfire.cache.Region<K,V>>Exceptionpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<com.gemstone.gemfire.cache.Region<K,V>>public boolean isSingleton()
isSingleton in interface FactoryBean<com.gemstone.gemfire.cache.Region<K,V>>public void setBeanName(String name)
setBeanName in interface BeanNameAwarename - the name of this bean (Region) in the application context (bean factory).BeanNameAware.setBeanName(String)public void setCache(com.gemstone.gemfire.cache.GemFireCache cache)
cache - a reference to the Cache.CacheFactoryBean,
GemFireCachepublic void setName(String name)
name - the region namesetBeanName(String),
Region.getFullPath()public void setParent(com.gemstone.gemfire.cache.Region<?,?> parent)
parent - a reference to the parent Region if this Region is a Sub-Region.Regionprotected com.gemstone.gemfire.cache.Region<?,?> getParent()
Regionpublic void setRegionName(String regionName)
regionName - a String indicating the name of the Region in GemFire.setName(String),
Region.getName()public Boolean getLookupEnabled()
public void setLookupEnabled(Boolean lookupEnabled)