Class CacheServerFactoryBean
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<CacheServer>
org.springframework.data.gemfire.server.CacheServerFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,BeanNameAware,DisposableBean,FactoryBean<CacheServer>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class CacheServerFactoryBean
extends AbstractFactoryBeanSupport<CacheServer>
implements DisposableBean, InitializingBean, SmartLifecycle
Spring
FactoryBean used to construct, configure and initialize a CacheServer.- Author:
- Costin Leau, John Blum
- See Also:
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
DEFAULT_SINGLETONFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CacheServeraddCacheServer(Cache cache) voidprotected voidapplyCacheServerConfigurers(Iterable<CacheServerConfigurer> cacheServerConfigurers) Null-safe operation to apply the givenIterableofCacheServerConfigurersto thisCacheServerFactoryBean.protected voidapplyCacheServerConfigurers(CacheServerConfigurer... cacheServerConfigurers) Null-safe operation to apply the given array ofCacheServerConfigurersto thisCacheServerFactoryBean.protected CacheServerconfigure(CacheServer cacheServer) Configures the providedCacheServerwith any custom, application-specific configuration.voiddestroy()protected CacheServerConfigurerReturns a reference to the CompositeCacheServerConfigurerused to apply additional configuration to thisCacheServerFactoryBeanon Spring container initialization.Class<?>intgetPhase()Start at the latest possible moment.booleanbooleanprotected CacheServerpostProcess(CacheServer cacheServer) Post-process theCacheServerwith any necessary follow-up actions.voidsetAutoStartup(boolean autoStartup) voidsetBindAddress(String bindAddress) voidvoidsetCacheServerConfigurers(List<CacheServerConfigurer> cacheServerConfigurers) Null-safe operation to set anIterableofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBeanwhen using Annotation-based configuration.voidsetCacheServerConfigurers(CacheServerConfigurer... cacheServerConfigurers) Null-safe operation to set an array ofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBeanwhen using Annotation-based configuration.voidsetHostNameForClients(String hostNameForClients) voidsetListeners(Set<InterestRegistrationListener> listeners) voidsetLoadPollInterval(long loadPollInterval) voidsetMaxConnections(int maxConnections) voidsetMaxMessageCount(int maxMessageCount) voidsetMaxThreads(int maxThreads) voidsetMaxTimeBetweenPings(int maxTimeBetweenPings) voidsetMessageTimeToLive(int messageTimeToLive) voidsetNotifyBySubscription(boolean notifyBySubscription) voidsetPort(int port) voidsetServerGroups(String[] serverGroups) voidsetServerLoadProbe(ServerLoadProbe serverLoadProbe) voidsetSocketBufferSize(int socketBufferSize) voidsetSubscriptionCapacity(int subscriptionCapacity) voidsetSubscriptionDiskStore(String diskStoreName) voidsetSubscriptionEvictionPolicy(SubscriptionEvictionPolicy evictionPolicy) voidsetTcpNoDelay(boolean tcpNoDelay) voidstart()voidstop()voidMethods inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
getBeanClassLoader, getBeanFactory, getBeanName, getLog, getOptionalLog, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanName
-
Constructor Details
-
CacheServerFactoryBean
public CacheServerFactoryBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
IOException
-
applyCacheServerConfigurers
Null-safe operation to apply the given array ofCacheServerConfigurersto thisCacheServerFactoryBean.- Parameters:
cacheServerConfigurers- array ofCacheServerConfigurersapplied to thisCacheServerFactoryBean.- See Also:
-
applyCacheServerConfigurers
Null-safe operation to apply the givenIterableofCacheServerConfigurersto thisCacheServerFactoryBean.- Parameters:
cacheServerConfigurers-IterableofCacheServerConfigurersapplied to thisCacheServerFactoryBean.- See Also:
-
addCacheServer
- Parameters:
cache-Cacheused to add aCacheServer.- Returns:
- the newly added
CacheServer. - See Also:
-
configure
Configures the providedCacheServerwith any custom, application-specific configuration.- Parameters:
cacheServer-CacheServerto configure.- Returns:
- the given
CacheServer. - See Also:
-
postProcess
Post-process theCacheServerwith any necessary follow-up actions.- Parameters:
cacheServer-CacheServerto process.- Returns:
- the given
CacheServer. - See Also:
-
getCompositeCacheServerConfigurer
Returns a reference to the CompositeCacheServerConfigurerused to apply additional configuration to thisCacheServerFactoryBeanon Spring container initialization.- Returns:
- the Composite
CacheServerConfigurer. - See Also:
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<CacheServer>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<CacheServer>
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceSmartLifecycle
-
isRunning
public boolean isRunning() -
getPhase
public int getPhase()Start at the latest possible moment.- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceDisposableBean
-
start
public void start() -
stop
public void stop() -
stop
- Specified by:
stopin interfaceSmartLifecycle
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
setBindAddress
-
setCache
-
setCacheServerConfigurers
Null-safe operation to set an array ofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBeanwhen using Annotation-based configuration.- Parameters:
cacheServerConfigurers- array ofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBean.- See Also:
-
setCacheServerConfigurers
Null-safe operation to set anIterableofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBeanwhen using Annotation-based configuration.- Parameters:
cacheServerConfigurers- Iterable ofCacheServerConfigurersused to apply additional configuration to thisCacheServerFactoryBean.- See Also:
-
setHostNameForClients
-
setListeners
-
setLoadPollInterval
public void setLoadPollInterval(long loadPollInterval) -
setMaxConnections
public void setMaxConnections(int maxConnections) -
setMaxMessageCount
public void setMaxMessageCount(int maxMessageCount) -
setMaxThreads
public void setMaxThreads(int maxThreads) -
setMaxTimeBetweenPings
public void setMaxTimeBetweenPings(int maxTimeBetweenPings) -
setMessageTimeToLive
public void setMessageTimeToLive(int messageTimeToLive) -
setNotifyBySubscription
public void setNotifyBySubscription(boolean notifyBySubscription) -
setPort
public void setPort(int port) -
setServerGroups
-
setServerLoadProbe
-
setSocketBufferSize
public void setSocketBufferSize(int socketBufferSize) -
setSubscriptionCapacity
public void setSubscriptionCapacity(int subscriptionCapacity) -
setSubscriptionDiskStore
-
setSubscriptionEvictionPolicy
-
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay)
-