public abstract class ResolvableRegionFactoryBean<K,V> extends AbstractFactoryBeanSupport<org.apache.geode.cache.Region<K,V>> implements InitializingBean
FactoryBean for looking up Regions.
If lookups are disabled or the Region does not exist, an exception is thrown.
For declaring and configuring new Regions, see PeerRegionFactoryBean.GemFireCache,
Region,
FactoryBean,
InitializingBean,
AbstractFactoryBeanSupportDEFAULT_SINGLETON| Constructor and Description |
|---|
ResolvableRegionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initializes this
ResolvableRegionFactoryBean after properties have been set by the Spring container. |
protected org.apache.geode.cache.Region<K,V> |
createRegion(org.apache.geode.cache.GemFireCache cache,
String regionName)
Creates a new
Region with the given name. |
org.apache.geode.cache.GemFireCache |
getCache()
>>>>>>> DATAGEODE-95 - Upgrade to Apache Geode 1.5.0.
|
Boolean |
getLookupEnabled() |
org.apache.geode.cache.Region<K,V> |
getObject()
Returns an object reference to the
Region created by this ResolvableRegionFactoryBean. |
Class<?> |
getObjectType()
|
protected org.apache.geode.cache.Region<?,?> |
getParent()
Returns a reference to the parent
Region indicating this FactoryBean represents a GemFire cache
Sub-Region. |
org.apache.geode.cache.Region<K,V> |
getRegion()
Returns a reference to the
Region resolved by this Spring FactoryBean
during the lookup operation; maybe a new Region. |
boolean |
isLookupEnabled() |
protected org.apache.geode.cache.Region<K,V> |
loadSnapshot(org.apache.geode.cache.Region<K,V> region)
Loads the configured data
snapshot into the given Region. |
protected org.apache.geode.cache.Region<K,V> |
postProcess(org.apache.geode.cache.Region<K,V> region)
Post-process the
Region created by this PeerRegionFactoryBean. |
String |
resolveRegionName()
Resolves the
name of the Region. |
void |
setCache(org.apache.geode.cache.GemFireCache cache)
Sets a reference to the
GemFireCache 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(org.apache.geode.cache.Region<?,?> parent)
Sets a reference to the parent
Region to indicated this FactoryBean represents a GemFire cache
Sub-Region. |
protected void |
setRegion(org.apache.geode.cache.Region<K,V> region)
Sets a reference to the
Region to be resolved by this Spring FactoryBean. |
void |
setRegionName(String regionName)
Sets the name of the cache
Region. |
void |
setSnapshot(Resource snapshot)
Sets the snapshots used for loading a newly created region.
|
getBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanNamepublic void afterPropertiesSet()
throws Exception
ResolvableRegionFactoryBean after properties have been set by the Spring container.afterPropertiesSet in interface InitializingBeanException - if initialization fails.InitializingBean.afterPropertiesSet(),
createRegion(GemFireCache, String)public String resolveRegionName()
name of the Region.String containing the name of the Region.Region.getName()protected org.apache.geode.cache.Region<K,V> createRegion(org.apache.geode.cache.GemFireCache cache, String regionName) throws Exception
Region with the given name.
This method gets called when a Region with the specified name does not already exist.
By default, this method implementation throws a BeanInitializationException and it is expected
that subclasses will override this method.cache - reference to the GemFireCache.regionName - name of the new Region.Region with the given name.BeanInitializationException - by default unless a subclass overrides this method.ExceptionGemFireCache,
Regionprotected org.apache.geode.cache.Region<K,V> loadSnapshot(org.apache.geode.cache.Region<K,V> region)
snapshot into the given Region.region - Region to load.Region.RuntimeException - if the snapshot load fails.Region.loadSnapshot(InputStream)protected org.apache.geode.cache.Region<K,V> postProcess(org.apache.geode.cache.Region<K,V> region)
Region created by this PeerRegionFactoryBean.region - Region to process.Regionpublic org.apache.geode.cache.Region<K,V> getObject() throws Exception
Region created by this ResolvableRegionFactoryBean.getObject in interface FactoryBean<org.apache.geode.cache.Region<K,V>>Region created by this ResolvableRegionFactoryBean.ExceptionFactoryBean.getObject(),
Region,
getRegion()public Class<?> getObjectType()
getObjectType in interface FactoryBean<org.apache.geode.cache.Region<K,V>>Class type of the Region produced by this ResolvableRegionFactoryBean.FactoryBean.getObjectType()public org.apache.geode.cache.GemFireCache getCache()
GemFireCache used to create the Region.GemFireCache used to create the Region..GemFireCachepublic void setCache(org.apache.geode.cache.GemFireCache cache)
GemFireCache used to create the Region.cache - reference to the GemFireCache.GemFireCachepublic boolean isLookupEnabled()
public void setLookupEnabled(Boolean lookupEnabled)
public Boolean getLookupEnabled()
public void setName(String name)
Region based on the bean 'name' attribute. If no Region is found
with the given name, a new one will be created. If no name is given, the value of the 'beanName' property
will be used.name - Region name.AbstractFactoryBeanSupport.setBeanName(String),
Region.getFullPath()public void setParent(org.apache.geode.cache.Region<?,?> parent)
Region to indicated this FactoryBean represents a GemFire cache
Sub-Region.parent - reference to the parent Region.Regionprotected org.apache.geode.cache.Region<?,?> getParent()
Region indicating this FactoryBean represents a GemFire cache
Sub-Region.Region or null if this Region
is not a Sub-Region.Regionprotected void setRegion(org.apache.geode.cache.Region<K,V> region)
Region to be resolved by this Spring FactoryBean.region - reference to the resolvable Region.Regionpublic org.apache.geode.cache.Region<K,V> getRegion()
Region resolved by this Spring FactoryBean
during the lookup operation; maybe a new Region.Region resolved during lookup.Regionpublic void setRegionName(String regionName)
Region. If no Region is found with the given name,
a new one will be created. If no name is given, the value of the 'name' property will be used.regionName - name of the Region.setName(String),
Region.getName()public void setSnapshot(Resource snapshot)
snapshot - the snapshot to setsetName(String)Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.