|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.gemfire.RegionLookupFactoryBean<K,V>
org.springframework.data.gemfire.RegionFactoryBean<K,V>
public class RegionFactoryBean<K,V>
Base class for FactoryBeans used to create GemFire Regions. Will try
to first locate the region (by name) and, in case none if found, proceed to
creating one using the given settings.
Note that this factory bean allows for very flexible creation of GemFire
Region. For "client" regions however, see
ClientRegionFactoryBean which offers easier configuration and
defaults.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
RegionFactoryBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected void |
assertDataPolicyAndPersistentAttributesAreCompatible(com.gemstone.gemfire.cache.DataPolicy resolvedDataPolicy)
Validates that the settings for Data Policy and the 'persistent' attribute in |
void |
destroy()
|
int |
getPhase()
|
boolean |
isAutoStartup()
|
protected boolean |
isNotPersistent()
Returns true when the user explicitly specified a value for the persistent attribute and it is false. |
protected boolean |
isPersistent()
Returns true when the user explicitly specified a value for the persistent attribute and it is true. |
boolean |
isRunning()
|
protected com.gemstone.gemfire.cache.Region<K,V> |
lookupFallback(com.gemstone.gemfire.cache.GemFireCache gemfireCache,
String regionName)
Fall back method in case the named region does not exist. |
protected void |
postProcess(com.gemstone.gemfire.cache.AttributesFactory<K,V> attrFactory)
Deprecated. as of GemFire 6.5, the use of AttributesFactory has
been deprecated |
protected void |
postProcess(com.gemstone.gemfire.cache.Region<K,V> region)
Post-process the region object for this factory bean during the initialization process. |
protected void |
resolveDataPolicy(com.gemstone.gemfire.cache.RegionFactory<K,V> regionFactory,
Boolean persistent,
String dataPolicy)
Validates the configured Data Policy and may override it, taking into account the 'persistent' attribute and constraints for the Region type. |
void |
setAsyncEventQueues(Object[] asyncEventQueues)
|
void |
setAttributes(com.gemstone.gemfire.cache.RegionAttributes<K,V> attributes)
Sets the region attributes used for the region used by this factory. |
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 cache loader used for the region used by this factory. |
void |
setCacheWriter(com.gemstone.gemfire.cache.CacheWriter<K,V> cacheWriter)
Sets the cache writer used for the region used by this factory. |
void |
setClose(boolean close)
Indicates whether the region referred by this factory bean, will be closed on shutdown (default true). |
void |
setDataPolicy(String dataPolicyName)
Sets the dataPolicy as a String. |
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 |
setEnableGateway(boolean enableGateway)
|
void |
setGatewaySenders(Object[] gatewaySenders)
|
void |
setHubId(String hubId)
|
void |
setPersistent(boolean persistent)
|
void |
setScope(com.gemstone.gemfire.cache.Scope scope)
Sets the region scope. |
void |
setSnapshot(Resource snapshot)
Sets the snapshots used for loading a newly created region. |
void |
start()
|
void |
stop()
|
void |
stop(Runnable callback)
|
| Methods inherited from class org.springframework.data.gemfire.RegionLookupFactoryBean |
|---|
getObject, getObjectType, getRegion, isSingleton, setBeanName, setCache, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public RegionFactoryBean()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class RegionLookupFactoryBean<K,V>Exception
protected com.gemstone.gemfire.cache.Region<K,V> lookupFallback(com.gemstone.gemfire.cache.GemFireCache gemfireCache,
String regionName)
throws Exception
RegionLookupFactoryBean
lookupFallback in class RegionLookupFactoryBean<K,V>gemfireCache - GemFire cacheregionName - region name
Exception
protected void resolveDataPolicy(com.gemstone.gemfire.cache.RegionFactory<K,V> regionFactory,
Boolean persistent,
String dataPolicy)
regionFactory - the GemFire RegionFactory used to created the Local Region.persistent - a boolean value indicating whether the Local Region should persist it's data.dataPolicy - requested Data Policy as set by the user in the Spring GemFire configuration meta-data.DataPolicy,
RegionFactory@Deprecated protected void postProcess(com.gemstone.gemfire.cache.AttributesFactory<K,V> attrFactory)
AttributesFactory has
been deprecated
attrFactory - attribute factoryprotected void postProcess(com.gemstone.gemfire.cache.Region<K,V> region)
region -
public void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic void setClose(boolean close)
public void setDestroy(boolean destroy)
public void setSnapshot(Resource snapshot)
snapshot - the snapshot to setRegionLookupFactoryBean.setName(String)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)
setAttributes(RegionAttributes).
cacheLoader - the cacheLoader to set on a newly created regionpublic void setCacheWriter(com.gemstone.gemfire.cache.CacheWriter<K,V> cacheWriter)
setAttributes(RegionAttributes).
cacheWriter - the cacheWriter to set on a newly created regionpublic void setScope(com.gemstone.gemfire.cache.Scope scope)
setAttributes(RegionAttributes).
scope - the region scopeScopepublic void setPersistent(boolean persistent)
public void setDataPolicy(String dataPolicyName)
dataPolicyName - the dataPolicy name (NORMAL, PRELOADED, etc)public void setDiskStoreName(String diskStoreName)
diskStoreName - public void setGatewaySenders(Object[] gatewaySenders)
gatewaySenders - defined as Object for backward compatibility with
Gemfire 6public void setAsyncEventQueues(Object[] asyncEventQueues)
asyncEventQueues - defined as Object for backward compatibility with
Gemfire 6public void setEnableGateway(boolean enableGateway)
public void setHubId(String hubId)
public void setAttributes(com.gemstone.gemfire.cache.RegionAttributes<K,V> attributes)
attributes - the attributes to set on a newly created regionprotected void assertDataPolicyAndPersistentAttributesAreCompatible(com.gemstone.gemfire.cache.DataPolicy resolvedDataPolicy)
resolvedDataPolicy - the GemFire Data Policy resolved form the Spring GemFire XML namespace configuration
meta-data.isPersistent(),
isNotPersistent(),
DataPolicyprotected boolean isPersistent()
isNotPersistent()protected boolean isNotPersistent()
isPersistent()public void start()
start in interface Lifecyclepublic void stop()
stop in interface Lifecyclepublic boolean isRunning()
isRunning in interface Lifecyclepublic int getPhase()
getPhase in interface Phasedpublic boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecycle
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||