public class RegionLookupFactoryBean<K,V> extends Object implements FactoryBean<Region<K,V>>, InitializingBean, BeanNameAware
Region
s. 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() |
Region<K,V> |
getObject() |
Class<?> |
getObjectType() |
protected Region<?,?> |
getParent()
Gets a reference to the parent Region if this FactoryBean represents a GemFire Cache Sub-Region.
|
protected Region<K,V> |
getRegion() |
boolean |
isSingleton() |
protected Region<K,V> |
lookupFallback(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(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(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 InitializingBean
Exception
protected Region<K,V> lookupFallback(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 Class<?> getObjectType()
getObjectType
in interface FactoryBean<Region<K,V>>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Region<K,V>>
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
name
- the name of this bean (Region) in the application context (bean factory).BeanNameAware.setBeanName(String)
public void setCache(GemFireCache cache)
cache
- a reference to the Cache.CacheFactoryBean
,
GemFireCache
public void setName(String name)
name
- the region namesetBeanName(String)
,
Region.getFullPath()
public void setParent(Region<?,?> parent)
parent
- a reference to the parent Region if this Region is a Sub-Region.Region
protected Region<?,?> getParent()
Region
public 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)