public class ClientRegionFactoryBean<K,V> extends RegionLookupFactoryBean<K,V> implements BeanFactoryAware, DisposableBean
FactoryBean used to create a GemFire client Region.BeanFactory,
BeanFactoryAware,
DisposableBean,
RegionLookupFactoryBean,
DataPolicy,
GemFireCache,
Region,
RegionAttributes,
ClientCache,
ClientRegionFactory,
ClientRegionShortcut| Constructor and Description |
|---|
ClientRegionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
protected boolean |
isNotPersistent() |
protected boolean |
isPersistent() |
protected boolean |
isPersistentUnspecified() |
protected com.gemstone.gemfire.cache.Region<K,V> |
lookupRegion(com.gemstone.gemfire.cache.GemFireCache cache,
String regionName)
Method to perform a lookup when the named
Region does not exist. |
protected void |
postProcess(com.gemstone.gemfire.cache.Region<K,V> region) |
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 |
setEvictionAttributes(com.gemstone.gemfire.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(com.gemstone.gemfire.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 |
setShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Initializes the client
Region using a GemFire ClientRegionShortcut. |
void |
setSnapshot(Resource snapshot)
Specifies the data snapshots used for loading a newly created
Region. |
void |
setValueConstraint(Class<V> valueConstraint) |
getLookupEnabled, getObject, getObjectType, getParent, getRegion, isSingleton, lookupFallback, resolveRegionName, setBeanName, setCache, setLookupEnabled, setName, setParent, setRegionNamepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class RegionLookupFactoryBean<K,V>Exceptionprotected com.gemstone.gemfire.cache.Region<K,V> lookupRegion(com.gemstone.gemfire.cache.GemFireCache cache, String regionName) throws Exception
RegionLookupFactoryBeanRegion does not exist. By default, this implementation
throws an exception.lookupRegion in class RegionLookupFactoryBean<K,V>cache - reference to the GemFire cache.regionName - name of the GemFire Region.Region in the GemFire cache with the given name.BeanInitializationException - if the lookup operation fails.ExceptionRegionprotected void postProcess(com.gemstone.gemfire.cache.Region<K,V> region) throws Exception
Exceptionpublic void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic 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 BeanFactoryAwareBeansExceptionpublic void setClose(boolean close)
close - whether to close or not the regionsetDestroy(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.CacheLoaderpublic void setCacheWriter(com.gemstone.gemfire.cache.CacheWriter<K,V> cacheWriter)
cacheWriter - the GemFire CacheWriter used to perform synchronous write-behinds on put ops.CacheWriterpublic 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 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(com.gemstone.gemfire.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(com.gemstone.gemfire.cache.client.Pool pool)
Pool used by this client Region.pool - GemFire client Pool.Poolpublic void setPoolName(String poolName)
Pool name used by this client Region.poolName - String specifying the name of the GemFire client Pool.public void setShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Region using a GemFire ClientRegionShortcut.shortcut - ClientRegionShortcut used to initialize this client Region.public void setSnapshot(Resource snapshot)
Region.
The snapshot will be used only when a new Region is created.
If the Region already exists, no loading will be performed.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.