public class GemFireCacheTypeAwareRegionFactoryBean<K,V> extends RegionLookupFactoryBean<K,V>
GemFireCacheTypeAwareRegionFactoryBean
class is a smart Spring FactoryBean
that knows how to
create a client or server Region
depending on whether the GemFireCache
is
a ClientCache
or a peer Cache
.GemFireCache
,
Region
,
FactoryBean
,
GenericRegionFactoryBean
,
RegionLookupFactoryBean
,
RegionFactoryBean
,
ClientRegionFactoryBean
,
RegionConfigurer
DEFAULT_SINGLETON
Constructor and Description |
---|
GemFireCacheTypeAwareRegionFactoryBean() |
Modifier and Type | Method and Description |
---|---|
org.apache.geode.cache.Region<K,V> |
createRegion(org.apache.geode.cache.GemFireCache gemfireCache,
String regionName)
Creates a new
Region with the given name . |
protected org.apache.geode.cache.client.ClientRegionShortcut |
getClientRegionShortcut() |
protected Boolean |
getClose() |
protected org.apache.geode.cache.DataPolicy |
getDataPolicy() |
protected Class<K> |
getKeyConstraint() |
protected String |
getPoolName() |
protected org.apache.geode.cache.RegionAttributes<K,V> |
getRegionAttributes() |
protected org.apache.geode.cache.RegionShortcut |
getServerRegionShortcut() |
protected Class<V> |
getValueConstraint() |
protected boolean |
isClose() |
protected org.apache.geode.cache.Region<K,V> |
newClientRegion(org.apache.geode.cache.GemFireCache gemfireCache,
String regionName)
Constructs a new client
Region using the ClientRegionFactoryBean . |
protected org.apache.geode.cache.Region<K,V> |
newServerRegion(org.apache.geode.cache.GemFireCache gemfireCache,
String regionName)
Constructs a new server
Region using the GenericRegionFactoryBean . |
void |
setAttributes(org.apache.geode.cache.RegionAttributes<K,V> regionAttributes) |
void |
setClientRegionShortcut(org.apache.geode.cache.client.ClientRegionShortcut clientRegionShortcut) |
void |
setClose(Boolean close) |
void |
setDataPolicy(org.apache.geode.cache.DataPolicy dataPolicy) |
void |
setKeyConstraint(Class<K> keyConstraint) |
void |
setPoolName(String poolName) |
void |
setRegionConfigurers(List<RegionConfigurer> regionConfigurers)
Null-safe operation used to set an
Iterable of RegionConfigurers used to apply
additional configuration to this RegionLookupFactoryBean when using Annotation-based configuration. |
void |
setRegionConfigurers(RegionConfigurer... regionConfigurers)
Null-safe operation used to set an array of
RegionConfigurers used to apply
additional configuration to this RegionLookupFactoryBean when using Annotation-based configuration. |
void |
setServerRegionShortcut(org.apache.geode.cache.RegionShortcut shortcut) |
void |
setValueConstraint(Class<V> valueConstraint) |
afterPropertiesSet, getCache, getLookupEnabled, getObject, getObjectType, getParent, getRegion, loadSnapshot, postProcess, resolveRegionName, setCache, setLookupEnabled, setName, setParent, setRegion, setRegionName, setSnapshot
getBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logInfo, logInfo, newLog, setBeanClassLoader, setBeanFactory, setBeanName
public GemFireCacheTypeAwareRegionFactoryBean()
public org.apache.geode.cache.Region<K,V> createRegion(org.apache.geode.cache.GemFireCache gemfireCache, String regionName) throws Exception
RegionLookupFactoryBean
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.createRegion
in class RegionLookupFactoryBean<K,V>
gemfireCache
- reference to the GemFireCache
.regionName
- name
of the new Region
.Region
with the given name
.BeanInitializationException
- by default unless a subclass
overrides this method.Exception
GemFireCache
,
Region
protected org.apache.geode.cache.Region<K,V> newClientRegion(org.apache.geode.cache.GemFireCache gemfireCache, String regionName) throws Exception
Region
using the ClientRegionFactoryBean
.gemfireCache
- reference to the GemFireCache
used to create/initialize the factory
used to create the client Region
.regionName
- name given to the client Region
.Region
with the given regionName
.Exception
- if the client Region
could not be created.ClientRegionFactoryBean
,
GemFireCache
,
Region
protected org.apache.geode.cache.Region<K,V> newServerRegion(org.apache.geode.cache.GemFireCache gemfireCache, String regionName) throws Exception
Region
using the GenericRegionFactoryBean
.gemfireCache
- reference to the GemFireCache
used to create/initialize the factory
used to create the server Region
.regionName
- name given to the server Region
.Region
with the given regionName
.Exception
- if the server Region
could not be created.GenericRegionFactoryBean
,
GemFireCache
,
Region
public void setAttributes(org.apache.geode.cache.RegionAttributes<K,V> regionAttributes)
public void setClientRegionShortcut(org.apache.geode.cache.client.ClientRegionShortcut clientRegionShortcut)
protected org.apache.geode.cache.client.ClientRegionShortcut getClientRegionShortcut()
public void setClose(Boolean close)
protected Boolean getClose()
protected boolean isClose()
public void setDataPolicy(org.apache.geode.cache.DataPolicy dataPolicy)
protected org.apache.geode.cache.DataPolicy getDataPolicy()
public void setPoolName(String poolName)
protected String getPoolName()
public void setRegionConfigurers(RegionConfigurer... regionConfigurers)
RegionConfigurers
used to apply
additional configuration to this RegionLookupFactoryBean
when using Annotation-based configuration.regionConfigurers
- array of RegionConfigurers
used to apply
additional configuration to this RegionLookupFactoryBean
.RegionConfigurer
,
setRegionConfigurers(List)
public void setRegionConfigurers(List<RegionConfigurer> regionConfigurers)
Iterable
of RegionConfigurers
used to apply
additional configuration to this RegionLookupFactoryBean
when using Annotation-based configuration.regionConfigurers
- Iterable
of RegionConfigurers
used to apply
additional configuration to this RegionLookupFactoryBean
.RegionConfigurer
public void setServerRegionShortcut(org.apache.geode.cache.RegionShortcut shortcut)
protected org.apache.geode.cache.RegionShortcut getServerRegionShortcut()
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.