|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.gemfire.CacheFactoryBean
public class CacheFactoryBean
Factory used for configuring a Gemfire Cache manager. Allows either retrieval of an existing, opened cache or the creation of a new one.
This class implements the
PersistenceExceptionTranslator
interface, as auto-detected by Spring's
PersistenceExceptionTranslationPostProcessor
, for AOP-based translation of native exceptions to Spring
DataAccessExceptions. Hence, the presence of this class automatically enables
a PersistenceExceptionTranslationPostProcessor to translate GemFire
exceptions.
Nested Class Summary | |
---|---|
static class |
CacheFactoryBean.DynamicRegionSupport
|
static class |
CacheFactoryBean.JndiDataSource
|
Constructor Summary | |
---|---|
CacheFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected void |
applyInternalCacheOptions()
|
protected void |
applyPdxOptions(Object factory)
Sets the PDX properties for the given object. |
protected com.gemstone.gemfire.cache.GemFireCache |
createCache(Object factory)
|
protected Object |
createFactory(Properties props)
|
void |
destroy()
|
protected com.gemstone.gemfire.cache.GemFireCache |
fetchCache()
|
protected BeanFactory |
getBeanFactory()
|
com.gemstone.gemfire.cache.GemFireCache |
getObject()
|
Class<? extends com.gemstone.gemfire.cache.GemFireCache> |
getObjectType()
|
boolean |
isSingleton()
|
protected Properties |
mergeProperties()
|
protected void |
registerTransactionListeners()
Register all declared transaction listeners |
protected void |
registerTransactionWriter()
Register a transaction writer if declared |
void |
setBeanClassLoader(ClassLoader classLoader)
|
void |
setBeanFactory(BeanFactory beanFactory)
|
void |
setBeanName(String name)
|
void |
setCacheXml(Resource cacheXml)
Sets the cache configuration. |
void |
setCopyOnRead(boolean copyOnRead)
|
void |
setCriticalHeapPercentage(Float criticalHeapPercentage)
|
void |
setDynamicRegionSupport(CacheFactoryBean.DynamicRegionSupport dynamicRegionSupport)
|
void |
setEvictionHeapPercentage(Float evictionHeapPercentage)
|
void |
setJndiDataSources(List<CacheFactoryBean.JndiDataSource> jndiDataSources)
|
void |
setLockLease(int lockLease)
|
void |
setLockTimeout(int lockTimeout)
|
void |
setMessageSyncInterval(int messageSyncInterval)
|
void |
setPdxDiskStoreName(String pdxDiskStoreName)
Set the disk store that is used for PDX meta data. |
void |
setPdxIgnoreUnreadFields(Boolean pdxIgnoreUnreadFields)
Controls whether pdx ignores fields that were unread during deserialization. |
void |
setPdxPersistent(Boolean pdxPersistent)
Sets the object preference to PdxInstance type. |
void |
setPdxReadSerialized(Boolean pdxReadSerialized)
Controls whether the type metadata for PDX objects is persisted to disk. |
void |
setPdxSerializer(Object serializer)
Sets the PdxSerializable for this cache. |
void |
setProperties(Properties properties)
Sets the cache properties. |
void |
setSearchTimeout(int searchTimeout)
|
void |
setTransactionListeners(List<com.gemstone.gemfire.cache.TransactionListener> transactionListeners)
|
void |
setTransactionWriter(com.gemstone.gemfire.cache.TransactionWriter transactionWriter)
|
void |
setUseBeanFactoryLocator(boolean usage)
Indicates whether a bean factory locator is enabled (default) for this cache definition or not. |
DataAccessException |
translateExceptionIfPossible(RuntimeException ex)
|
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
protected com.gemstone.gemfire.cache.GemFireCache cache
protected Resource cacheXml
protected Properties properties
protected ClassLoader beanClassLoader
protected GemfireBeanFactoryLocator factoryLocator
protected BeanFactory beanFactory
protected String beanName
protected boolean useBeanFactoryLocator
protected Object pdxSerializer
protected Boolean pdxPersistent
protected Boolean pdxReadSerialized
protected Boolean pdxIgnoreUnreadFields
protected String pdxDiskStoreName
protected Boolean copyOnRead
protected Integer lockTimeout
protected Integer lockLease
protected Integer messageSyncInterval
protected Integer searchTimeout
protected List<com.gemstone.gemfire.cache.TransactionListener> transactionListeners
protected com.gemstone.gemfire.cache.TransactionWriter transactionWriter
protected Float evictionHeapPercentage
protected Float criticalHeapPercentage
protected CacheFactoryBean.DynamicRegionSupport dynamicRegionSupport
protected List<CacheFactoryBean.JndiDataSource> jndiDataSources
Constructor Detail |
---|
public CacheFactoryBean()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected void registerTransactionWriter()
protected void registerTransactionListeners()
protected void applyPdxOptions(Object factory)
factory
- protected void applyInternalCacheOptions()
protected Object createFactory(Properties props)
protected com.gemstone.gemfire.cache.GemFireCache fetchCache()
protected com.gemstone.gemfire.cache.GemFireCache createCache(Object factory)
protected Properties mergeProperties()
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible
in interface PersistenceExceptionTranslator
public com.gemstone.gemfire.cache.GemFireCache getObject() throws Exception
getObject
in interface FactoryBean<com.gemstone.gemfire.cache.GemFireCache>
Exception
public Class<? extends com.gemstone.gemfire.cache.GemFireCache> getObjectType()
getObjectType
in interface FactoryBean<com.gemstone.gemfire.cache.GemFireCache>
public boolean isSingleton()
isSingleton
in interface FactoryBean<com.gemstone.gemfire.cache.GemFireCache>
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
public void setProperties(Properties properties)
properties
- the properties to setpublic void setCacheXml(Resource cacheXml)
cacheXml
- the cacheXml to setpublic void setUseBeanFactoryLocator(boolean usage)
usage
- true if the bean factory locator is used underneath or notpublic void setPdxSerializer(Object serializer)
PdxSerializable
for this cache. Applicable on GemFire
6.6 or higher. The argument is of type object for compatibility with
GemFire 6.5.
serializer
- pdx serializer configured for this cache.public void setPdxPersistent(Boolean pdxPersistent)
pdxPersistent
- the pdxPersistent to setpublic void setPdxReadSerialized(Boolean pdxReadSerialized)
pdxReadSerialized
- the pdxReadSerialized to setpublic void setPdxIgnoreUnreadFields(Boolean pdxIgnoreUnreadFields)
pdxIgnoreUnreadFields
- the pdxIgnoreUnreadFields to setpublic void setPdxDiskStoreName(String pdxDiskStoreName)
pdxDiskStoreName
- the pdxDiskStoreName to setprotected BeanFactory getBeanFactory()
public void setCopyOnRead(boolean copyOnRead)
copyOnRead
- public void setLockTimeout(int lockTimeout)
lockTimeout
- public void setLockLease(int lockLease)
lockLease
- public void setMessageSyncInterval(int messageSyncInterval)
messageSyncInterval
- public void setSearchTimeout(int searchTimeout)
searchTimeout
- public void setEvictionHeapPercentage(Float evictionHeapPercentage)
evictionHeapPercentage
- public void setCriticalHeapPercentage(Float criticalHeapPercentage)
criticalHeapPercentage
- public void setTransactionListeners(List<com.gemstone.gemfire.cache.TransactionListener> transactionListeners)
transactionListeners
- public void setTransactionWriter(com.gemstone.gemfire.cache.TransactionWriter transactionWriter)
transactionWriter
- public void setDynamicRegionSupport(CacheFactoryBean.DynamicRegionSupport dynamicRegionSupport)
dynamicRegionSupport
- public void setJndiDataSources(List<CacheFactoryBean.JndiDataSource> jndiDataSources)
jndiDataSources
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |