public class ClientRegionFactoryBean<K,V> extends RegionLookupFactoryBean<K,V> implements DisposableBean
FactoryBean used to construct, configure and initialize a client Region.DataPolicy,
EvictionAttributes,
GemFireCache,
Region,
RegionAttributes,
ClientCache,
ClientRegionFactory,
ClientRegionShortcut,
Pool,
DisposableBean,
FactoryBean,
DataPolicyConverter,
RegionLookupFactoryBean,
RegionConfigurer| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_POOL_NAME |
static String |
GEMFIRE_POOL_NAME |
DEFAULT_SINGLETON| Constructor and Description |
|---|
ClientRegionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyRegionConfigurers(String regionName,
Iterable<RegionConfigurer> regionConfigurers)
Null-safe operation to apply the given
Iterable of RegionConfigurers
to this ClientRegionFactoryBean. |
protected void |
applyRegionConfigurers(String regionName,
RegionConfigurer... regionConfigurers)
Null-safe operation to apply the given array of
RegionConfigurers
to this ClientRegionFactoryBean. |
protected org.apache.geode.cache.client.ClientRegionFactory<K,V> |
configure(org.apache.geode.cache.client.ClientRegionFactory<K,V> clientRegionFactory)
Configures the given
ClientRegionFactoryBean from the configuration settings
of this ClientRegionFactoryBean. |
protected org.apache.geode.cache.client.ClientRegionFactory<K,V> |
createClientRegionFactory(org.apache.geode.cache.client.ClientCache clientCache,
org.apache.geode.cache.client.ClientRegionShortcut shortcut)
Constructs a new instance of
ClientRegionFactory using the given ClientCache
and ClientRegionShortcut. |
protected org.apache.geode.cache.Region<K,V> |
createRegion(org.apache.geode.cache.GemFireCache gemfireCache,
String regionName)
Creates a new
Region with the given name. |
void |
destroy()
Closes and destroys the
Region. |
protected RegionConfigurer |
getCompositeRegionConfigurer()
Returns a reference to the Composite
RegionConfigurer used to apply additional configuration
to this ClientRegionFactoryBean on Spring container initialization. |
Optional<String> |
getPoolName()
|
protected boolean |
isNotPersistent() |
protected boolean |
isPersistent() |
protected boolean |
isPersistentUnspecified() |
protected org.apache.geode.cache.client.ClientRegionFactory<K,V> |
postProcess(org.apache.geode.cache.client.ClientRegionFactory<K,V> clientRegionFactory)
Post-process the given
ClientRegionFactory setup by this ClientRegionFactoryBean. |
protected org.apache.geode.cache.Region<K,V> |
postProcess(org.apache.geode.cache.Region<K,V> region)
Post-process the
Region created by this ClientRegionFactoryBean. |
void |
setAttributes(org.apache.geode.cache.RegionAttributes<K,V> attributes)
Sets the region attributes used for the region used by this factory.
|
void |
setCacheListeners(org.apache.geode.cache.CacheListener<K,V>[] cacheListeners)
Sets the cache listeners used for the region used by this factory.
|
void |
setCacheLoader(org.apache.geode.cache.CacheLoader<K,V> cacheLoader)
Sets the CacheLoader used to load data local to the client's Region on cache misses.
|
void |
setCacheWriter(org.apache.geode.cache.CacheWriter<K,V> cacheWriter)
Sets the CacheWriter used to perform a synchronous write-behind when data is put into the client's Region.
|
void |
setClose(boolean close)
Indicates whether the region referred by this factory bean will be closed on shutdown (default true).
|
void |
setCompressor(org.apache.geode.compression.Compressor compressor)
Configures the
Compressor used to compress the this Region's data. |
void |
setDataPolicy(org.apache.geode.cache.DataPolicy dataPolicy)
Sets the Data Policy.
|
void |
setDataPolicyName(String dataPolicyName)
Deprecated.
use setDataPolicy(:DataPolicy) instead.
|
void |
setDestroy(boolean destroy)
Indicates whether the region referred by this factory bean will be
destroyed on shutdown (default false).
|
void |
setDiskStoreName(String diskStoreName)
Sets the name of disk store to use for overflow and persistence
|
void |
setEvictionAttributes(org.apache.geode.cache.EvictionAttributes evictionAttributes) |
void |
setInterests(Interest<K>[] interests)
Set the interests for this client region.
|
void |
setKeyConstraint(Class<K> keyConstraint) |
void |
setPersistent(boolean persistent) |
void |
setPool(org.apache.geode.cache.client.Pool pool)
Sets the
Pool used by this client Region. |
void |
setPoolName(String poolName)
|
void |
setRegionConfigurers(List<RegionConfigurer> regionConfigurers)
Null-safe operation to set an
Iterable of RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean when using Annotation-based configuration. |
void |
setRegionConfigurers(RegionConfigurer... regionConfigurers)
Null-safe operation to set an array of
RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean when using Annotation-based configuration. |
void |
setShortcut(org.apache.geode.cache.client.ClientRegionShortcut shortcut)
Initializes the client
Region using the given ClientRegionShortcut. |
void |
setValueConstraint(Class<V> valueConstraint)
Sets a
type constraint on this Region's values. |
afterPropertiesSet, getCache, getLookupEnabled, getObject, getObjectType, getParent, getRegion, loadSnapshot, resolveRegionName, setCache, setLookupEnabled, setName, setParent, setRegion, setRegionName, setSnapshotgetBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanNamepublic static final String DEFAULT_POOL_NAME
public static final String GEMFIRE_POOL_NAME
protected org.apache.geode.cache.Region<K,V> createRegion(org.apache.geode.cache.GemFireCache gemfireCache, String regionName) throws Exception
Region with the given name.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.ExceptionGemFireCache,
Regionprotected void applyRegionConfigurers(String regionName, RegionConfigurer... regionConfigurers)
RegionConfigurers
to this ClientRegionFactoryBean.regionName - String containing the name of the Region.regionConfigurers - array of RegionConfigurers applied
to this ClientRegionFactoryBean.RegionConfigurer,
applyRegionConfigurers(String, Iterable)protected void applyRegionConfigurers(String regionName, Iterable<RegionConfigurer> regionConfigurers)
Iterable of RegionConfigurers
to this ClientRegionFactoryBean.regionName - String containing the name of the Region.regionConfigurers - Iterable of RegionConfigurers applied
to this ClientRegionFactoryBean.RegionConfigurerprotected org.apache.geode.cache.client.ClientRegionFactory<K,V> createClientRegionFactory(org.apache.geode.cache.client.ClientCache clientCache, org.apache.geode.cache.client.ClientRegionShortcut shortcut)
ClientRegionFactory using the given ClientCache
and ClientRegionShortcut.clientCache - reference to the ClientCache.shortcut - ClientRegionShortcut used to specify the client Region DataPolicy.ClientRegionFactory.ClientCache.createClientRegionFactory(ClientRegionShortcut),
ClientRegionShortcut,
ClientRegionFactoryprotected org.apache.geode.cache.client.ClientRegionFactory<K,V> configure(org.apache.geode.cache.client.ClientRegionFactory<K,V> clientRegionFactory)
ClientRegionFactoryBean from the configuration settings
of this ClientRegionFactoryBean.clientRegionFactory - ClientRegionFactory to configure.ClientRegionFactory.ClientRegionFactoryprotected org.apache.geode.cache.client.ClientRegionFactory<K,V> postProcess(org.apache.geode.cache.client.ClientRegionFactory<K,V> clientRegionFactory)
ClientRegionFactory setup by this ClientRegionFactoryBean.clientRegionFactory - ClientRegionFactory to process.ClientRegionFactory.ClientRegionFactoryprotected org.apache.geode.cache.Region<K,V> postProcess(org.apache.geode.cache.Region<K,V> region)
Region created by this ClientRegionFactoryBean.postProcess in class RegionLookupFactoryBean<K,V>region - Region to process.Regionpublic void destroy()
throws Exception
Region.destroy in interface DisposableBeanException - if destroy fails.DisposableBeanprotected RegionConfigurer getCompositeRegionConfigurer()
RegionConfigurer used to apply additional configuration
to this ClientRegionFactoryBean on Spring container initialization.RegionConfigurer.RegionConfigurerpublic void setAttributes(org.apache.geode.cache.RegionAttributes<K,V> attributes)
attributes - the attributes to set on a newly created regionpublic void setCacheListeners(org.apache.geode.cache.CacheListener<K,V>[] cacheListeners)
setAttributes(RegionAttributes).cacheListeners - the cacheListeners to set on a newly created regionpublic void setCacheLoader(org.apache.geode.cache.CacheLoader<K,V> cacheLoader)
cacheLoader - a GemFire CacheLoader used to load data into the client Region.CacheLoaderpublic void setCacheWriter(org.apache.geode.cache.CacheWriter<K,V> cacheWriter)
cacheWriter - the GemFire CacheWriter used to perform synchronous write-behinds on put ops.CacheWriterpublic void setClose(boolean close)
close - whether to close or not the regionsetDestroy(boolean)public void setCompressor(org.apache.geode.compression.Compressor compressor)
Compressor used to compress the this Region's data.compressor - Compressor used to compress the this Region's data.Compressorpublic void setDataPolicy(org.apache.geode.cache.DataPolicy dataPolicy)
dataPolicy - the client Region's Data Policy.DataPolicy@Deprecated public void setDataPolicyName(String dataPolicyName)
dataPolicyName - the enumerated value String name of the Data Policy.DataPolicy,
setDataPolicy(org.apache.geode.cache.DataPolicy)public void setDestroy(boolean destroy)
destroy - whether or not to destroy the regionsetClose(boolean)public void setDiskStoreName(String diskStoreName)
diskStoreName - a String specifying the 'name' of the client Region Disk Store.public void setEvictionAttributes(org.apache.geode.cache.EvictionAttributes evictionAttributes)
public void setInterests(Interest<K>[] interests)
interests - the interests to setprotected boolean isPersistentUnspecified()
protected boolean isPersistent()
protected boolean isNotPersistent()
public void setPersistent(boolean persistent)
public void setPool(org.apache.geode.cache.client.Pool pool)
Pool used by this client Region.pool - client Pool to be used by this client Region.Pool,
setPoolName(String)public void setPoolName(String poolName)
poolName - String containing the name of the client Pool used by this client Region.getPoolName(),
setPool(Pool)public Optional<String> getPoolName()
Optional name of the configured Pool to use
with this client Region.setPoolName(String)public void setRegionConfigurers(RegionConfigurer... regionConfigurers)
RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean when using Annotation-based configuration.regionConfigurers - array of RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean.RegionConfigurer,
setRegionConfigurers(List)public void setRegionConfigurers(List<RegionConfigurer> regionConfigurers)
Iterable of RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean when using Annotation-based configuration.regionConfigurers - Iterable of RegionConfigurers used to apply
additional configuration to this ClientRegionFactoryBean.RegionConfigurerpublic void setShortcut(org.apache.geode.cache.client.ClientRegionShortcut shortcut)
Region using the given ClientRegionShortcut.shortcut - ClientRegionShortcut used to initialize this client Region.ClientRegionShortcutCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.