public class ClientRegionFactoryBean<K,V> extends RegionLookupFactoryBean<K,V> implements BeanFactoryAware, DisposableBean
Constructor and Description |
---|
ClientRegionFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
assertClientRegionShortcutAndPersistentAttributeAreCompatible(com.gemstone.gemfire.cache.client.ClientRegionShortcut resolvedShortcut)
Validates that the settings for ClientRegionShortcut and the 'persistent' attribute in <gfe:*-region> elements
are compatible.
|
protected void |
assertDataPolicyAndPersistentAttributeAreCompatible(com.gemstone.gemfire.cache.DataPolicy resolvedDataPolicy)
Validates that the settings for Data Policy and the 'persistent' attribute in <gfe:*-region> elements
are compatible.
|
void |
destroy() |
protected boolean |
isNotPersistent() |
protected boolean |
isPersistent() |
protected boolean |
isPersistentUnspecified() |
protected com.gemstone.gemfire.cache.Region<K,V> |
lookupFallback(com.gemstone.gemfire.cache.GemFireCache cache,
String regionName)
Fallback method in case the named Region does not exist.
|
protected void |
postProcess(com.gemstone.gemfire.cache.Region<K,V> region) |
protected com.gemstone.gemfire.cache.client.ClientRegionShortcut |
resolveClientRegionShortcut() |
void |
setAttributes(com.gemstone.gemfire.cache.RegionAttributes<K,V> attributes)
Sets the region attributes used for the region used by this factory.
|
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setCacheListeners(com.gemstone.gemfire.cache.CacheListener<K,V>[] cacheListeners)
Sets the cache listeners used for the region used by this factory.
|
void |
setCacheLoader(com.gemstone.gemfire.cache.CacheLoader<K,V> cacheLoader)
Sets the CacheLoader used to load data local to the client's Region on cache misses.
|
void |
setCacheWriter(com.gemstone.gemfire.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(com.gemstone.gemfire.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 |
setInterests(Interest<K>[] interests)
Set the interests for this client region.
|
void |
setPersistent(boolean persistent) |
void |
setPool(com.gemstone.gemfire.cache.client.Pool pool)
Sets the pool used by this client.
|
void |
setPoolName(String poolName)
Sets the pool name used by this client.
|
void |
setShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Initializes the client using a GemFire
ClientRegionShortcut . |
void |
setSnapshot(Resource snapshot)
Sets the snapshots used for loading a newly created region.
|
getLookupEnabled, getObject, getObjectType, getParent, getRegion, isSingleton, setBeanName, setCache, setLookupEnabled, setName, setParent, setRegionName
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class RegionLookupFactoryBean<K,V>
Exception
protected com.gemstone.gemfire.cache.Region<K,V> lookupFallback(com.gemstone.gemfire.cache.GemFireCache cache, String regionName) throws Exception
RegionLookupFactoryBean
lookupFallback
in class RegionLookupFactoryBean<K,V>
cache
- a reference to the GemFire Cache.regionName
- the name of the GemFire Cache Region.Exception
- if the lookup operation fails.protected com.gemstone.gemfire.cache.client.ClientRegionShortcut resolveClientRegionShortcut()
protected void assertClientRegionShortcutAndPersistentAttributeAreCompatible(com.gemstone.gemfire.cache.client.ClientRegionShortcut resolvedShortcut)
resolvedShortcut
- the GemFire ClientRegionShortcut resolved form the Spring GemFire XML namespace
configuration meta-data.isPersistent()
,
isNotPersistent()
,
ClientRegionShortcut
protected void assertDataPolicyAndPersistentAttributeAreCompatible(com.gemstone.gemfire.cache.DataPolicy resolvedDataPolicy)
resolvedDataPolicy
- the GemFire Data Policy resolved form the Spring GemFire XML namespace configuration
meta-data.isPersistent()
,
isNotPersistent()
,
DataPolicy
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void setAttributes(com.gemstone.gemfire.cache.RegionAttributes<K,V> attributes)
attributes
- the attributes to set on a newly created regionpublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
public void setInterests(Interest<K>[] interests)
interests
- the interests to setpublic void setPool(com.gemstone.gemfire.cache.client.Pool pool)
pool
- the GemFire client pool.public void setPoolName(String poolName)
poolName
- a String specify the name of the GemFire client pool.public void setClose(boolean close)
close
- whether to close or not the regionsetDestroy(boolean)
public void setDestroy(boolean destroy)
destroy
- whether or not to destroy the regionsetClose(boolean)
public void setCacheListeners(com.gemstone.gemfire.cache.CacheListener<K,V>[] cacheListeners)
setAttributes(RegionAttributes)
.cacheListeners
- the cacheListeners to set on a newly created regionpublic void setCacheLoader(com.gemstone.gemfire.cache.CacheLoader<K,V> cacheLoader)
cacheLoader
- a GemFire CacheLoader used to load data into the client Region.CacheLoader
public void setCacheWriter(com.gemstone.gemfire.cache.CacheWriter<K,V> cacheWriter)
cacheWriter
- the GemFire CacheWriter used to perform synchronous write-behinds on put ops.CacheWriter
public void setDataPolicy(com.gemstone.gemfire.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(com.gemstone.gemfire.cache.DataPolicy)
public void setDiskStoreName(String diskStoreName)
diskStoreName
- a String specifying the 'name' of the client Region Disk Store.protected boolean isPersistentUnspecified()
protected boolean isPersistent()
protected boolean isNotPersistent()
public void setPersistent(boolean persistent)
public void setShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut
. The
recommended way for creating clients since it covers all the major
scenarios with minimal configuration.shortcut
- the ClientRegionShortcut to use.public void setSnapshot(Resource snapshot)
snapshot
- the snapshot to setRegionLookupFactoryBean.setName(String)