public class ClientCacheFactoryBean extends CacheFactoryBean implements ApplicationListener<ContextRefreshedEvent>
ApplicationListener,
ContextRefreshedEvent,
CacheFactoryBean,
GemFireCache,
ClientCache,
ClientCacheFactory,
Pool,
PoolManager,
DistributedSystemCacheFactoryBean.DynamicRegionSupport, CacheFactoryBean.JndiDataSource| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
keepAlive |
protected String |
poolName |
protected Boolean |
readyForEvents |
beanClassLoader, beanFactory, beanFactoryLocator, beanName, cache, cacheXml, close, copyOnRead, criticalHeapPercentage, dynamicRegionSupport, enableAutoReconnect, evictionHeapPercentage, gatewayConflictResolver, jndiDataSources, lazyInitialize, lockLease, lockTimeout, log, messageSyncInterval, pdxDiskStoreName, pdxIgnoreUnreadFields, pdxPersistent, pdxReadSerialized, pdxSerializer, properties, searchTimeout, transactionListeners, transactionWriter, useBeanFactoryLocator, useClusterConfiguration| Constructor and Description |
|---|
ClientCacheFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close(com.gemstone.gemfire.cache.GemFireCache cache) |
protected <T extends com.gemstone.gemfire.cache.GemFireCache> |
createCache(Object factory)
Creates a new GemFire cache instance using the provided factory.
|
protected Object |
createFactory(Properties gemfireProperties)
Creates an instance of GemFire factory initialized with the given GemFire System Properties
to create an instance of a GemFire cache.
|
protected <T extends com.gemstone.gemfire.cache.GemFireCache> |
fetchCache()
Fetches an existing GemFire ClientCache instance from the ClientCacheFactory.
|
Boolean |
getEnableAutoReconnect()
Gets the value for the auto-reconnect setting.
|
Class<? extends com.gemstone.gemfire.cache.GemFireCache> |
getObjectType() |
String |
getPoolName()
Gets the pool name used by this client.
|
Boolean |
getReadyForEvents()
Gets the value for the readyForEvents property.
|
Boolean |
getUseClusterConfiguration()
Gets the value fo the use-shared-configuration GemFire setting.
|
boolean |
isKeepAlive()
Determines whether the server(s) should keep the durable client's queue alive for the duration of the timeout
when the client voluntarily disconnects.
|
boolean |
isReadyForEvents() |
void |
onApplicationEvent(ContextRefreshedEvent event)
Inform the GemFire cluster that this client cache is ready to receive events iff the client is non-durable.
|
protected void |
postProcessPropertiesBeforeInitialization(Properties gemfireProperties) |
protected Object |
prepareFactory(Object factory)
Initializes the GemFire factory used to create the GemFire client cache instance.
|
protected Properties |
resolveProperties()
Resolves the GemFire System properties used to configure the GemFire ClientCache instance.
|
void |
setEnableAutoReconnect(Boolean enableAutoReconnect)
Controls whether auto-reconnect functionality introduced in GemFire 8 is enabled or not.
|
void |
setKeepAlive(Boolean keepAlive)
Sets whether the server(s) should keep the durable client's queue alive for the duration of the timeout
when the client voluntarily disconnects.
|
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 |
setReadyForEvents(Boolean readyForEvents)
Set the readyForEvents flag.
|
void |
setUseClusterConfiguration(Boolean useClusterConfiguration)
Sets the state of the use-shared-configuration GemFire distribution config setting.
|
afterPropertiesSet, destroy, getBeanClassLoader, getBeanFactory, getBeanFactoryLocator, getBeanName, getCacheXml, getCopyOnRead, getCriticalHeapPercentage, getDynamicRegionSupport, getEvictionHeapPercentage, getGatewayConflictResolver, getJndiDataSources, getLockLease, getLockTimeout, getMessageSyncInterval, getObject, getPdxDiskStoreName, getPdxIgnoreUnreadFields, getPdxPersistent, getPdxReadSerialized, getPdxSerializer, getProperties, getSearchTimeout, getTransactionListeners, getTransactionWriter, isLazyInitialize, isPdxOptionsSpecified, isSingleton, postProcess, resolveCache, setBeanClassLoader, setBeanFactory, setBeanName, setCacheXml, setClose, setCopyOnRead, setCriticalHeapPercentage, setDynamicRegionSupport, setEvictionHeapPercentage, setGatewayConflictResolver, setJndiDataSources, setLazyInitialize, setLockLease, setLockTimeout, setMessageSyncInterval, setPdxDiskStoreName, setPdxIgnoreUnreadFields, setPdxPersistent, setPdxReadSerialized, setPdxSerializer, setProperties, setSearchTimeout, setTransactionListeners, setTransactionWriter, setUseBeanFactoryLocator, translateExceptionIfPossibleprotected Boolean keepAlive
protected Boolean readyForEvents
protected String poolName
protected void postProcessPropertiesBeforeInitialization(Properties gemfireProperties)
postProcessPropertiesBeforeInitialization in class CacheFactoryBeanprotected <T extends com.gemstone.gemfire.cache.GemFireCache> T fetchCache()
fetchCache in class CacheFactoryBeanT - is Class type extension of GemFireCache.com.gemstone.gemfire.cache.CacheClosedException - if an existing GemFire Cache instance does not exist.IllegalStateException - if the GemFire cache instance is not a ClientCache.GemFireCache,
ClientCacheFactory.getAnyInstance()protected Properties resolveProperties()
resolveProperties in class CacheFactoryBeanCacheFactoryBean.getProperties()protected Object createFactory(Properties gemfireProperties)
createFactory in class CacheFactoryBeangemfireProperties - a Properties object containing GemFire System properties.Properties,
ClientCacheFactoryprotected Object prepareFactory(Object factory)
prepareFactory in class CacheFactoryBeanfactory - the GemFire factory used to create an instance of the GemFire client cache.CacheFactoryBean.isPdxOptionsSpecified()protected <T extends com.gemstone.gemfire.cache.GemFireCache> T createCache(Object factory)
createCache in class CacheFactoryBeanT - parameterized Class type extension of GemFireCache.factory - the appropriate GemFire factory used to create a cache instance.GemFireCache,
ClientCacheFactory.create()public void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>event - the ApplicationContextEvent fired when the ApplicationContext is refreshed.ClientCache.readyForEvents(),
getReadyForEvents(),
CacheFactoryBean.getObject()protected void close(com.gemstone.gemfire.cache.GemFireCache cache)
close in class CacheFactoryBeanpublic final void setEnableAutoReconnect(Boolean enableAutoReconnect)
CacheFactoryBeansetEnableAutoReconnect in class CacheFactoryBeanenableAutoReconnect - a boolean value to enable/disable auto-reconnect functionality.public final Boolean getEnableAutoReconnect()
CacheFactoryBeangetEnableAutoReconnect in class CacheFactoryBeanpublic Class<? extends com.gemstone.gemfire.cache.GemFireCache> getObjectType()
getObjectType in interface FactoryBean<com.gemstone.gemfire.cache.Cache>getObjectType in class CacheFactoryBeanpublic void setKeepAlive(Boolean keepAlive)
keepAlive - a boolean value indicating to the server to keep the durable client's queues alive.public boolean isKeepAlive()
public void setPool(com.gemstone.gemfire.cache.client.Pool pool)
pool - the GemFire pool used by the Client Cache to obtain connections to the GemFire cluster.public void setPoolName(String poolName)
poolName - set the name of the GemFire Pool used by the GemFire Client Cache.public String getPoolName()
public void setReadyForEvents(Boolean readyForEvents)
readyForEvents - sets a boolean flag to notify the server that this durable client is ready
to receive updates.getReadyForEvents()public Boolean getReadyForEvents()
public boolean isReadyForEvents()
public final void setUseClusterConfiguration(Boolean useClusterConfiguration)
CacheFactoryBeansetUseClusterConfiguration in class CacheFactoryBeanuseClusterConfiguration - a boolean value to set the use-shared-configuration GemFire distribution property.public final Boolean getUseClusterConfiguration()
CacheFactoryBeangetUseClusterConfiguration in class CacheFactoryBean