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
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 cache,
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. |
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 |
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)
Sets the
Pool name used by this client Region . |
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 a GemFire ClientRegionShortcut . |
void |
setValueConstraint(Class<V> valueConstraint) |
afterPropertiesSet, getCache, getLookupEnabled, getObject, getObjectType, getParent, getRegion, loadSnapshot, resolveRegionName, setCache, setLookupEnabled, setName, setParent, setRegion, setRegionName, setSnapshot
getBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logInfo, logInfo, newLog, setBeanClassLoader, setBeanFactory, setBeanName
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.Exception
GemFireCache
,
Region
protected 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
.RegionConfigurer
protected org.apache.geode.cache.client.ClientRegionFactory<K,V> createClientRegionFactory(org.apache.geode.cache.client.ClientCache cache, org.apache.geode.cache.client.ClientRegionShortcut shortcut)
ClientRegionFactory
using the given ClientCache
and ClientRegionShortcut
.cache
- reference to the ClientCache
.shortcut
- ClientRegionShortcut
used to specify the client Region
DataPolicy
.ClientRegionFactory
.ClientCache.createClientRegionFactory(ClientRegionShortcut)
,
ClientRegionShortcut
,
ClientRegionFactory
protected 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
.ClientRegionFactory
protected 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
.ClientRegionFactory
protected 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.Region
public void destroy() throws Exception
Region
.destroy
in interface DisposableBean
Exception
- if destroy fails.DisposableBean
protected RegionConfigurer getCompositeRegionConfigurer()
RegionConfigurer
used to apply additional configuration
to this ClientRegionFactoryBean
on Spring container initialization.RegionConfigurer
.RegionConfigurer
public 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.CacheLoader
public void setCacheWriter(org.apache.geode.cache.CacheWriter<K,V> cacheWriter)
cacheWriter
- the GemFire CacheWriter used to perform synchronous write-behinds on put ops.CacheWriter
public void setClose(boolean close)
close
- whether to close or not the regionsetDestroy(boolean)
public 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
- GemFire client Pool
.Pool
public void setPoolName(String poolName)
Pool
name used by this client Region
.poolName
- String specifying the name of the GemFire client Pool
.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
.RegionConfigurer
public void setShortcut(org.apache.geode.cache.client.ClientRegionShortcut shortcut)
Region
using a GemFire ClientRegionShortcut
.shortcut
- ClientRegionShortcut
used to initialize this client Region
.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.