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_SINGLETON
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CacheServer
addCacheServer
(Cache cache) void
protected void
applyCacheServerConfigurers
(Iterable<CacheServerConfigurer> cacheServerConfigurers) Null-safe operation to apply the givenIterable
ofCacheServerConfigurers
to thisCacheServerFactoryBean
.protected void
applyCacheServerConfigurers
(CacheServerConfigurer... cacheServerConfigurers) Null-safe operation to apply the given array ofCacheServerConfigurers
to thisCacheServerFactoryBean
.protected CacheServer
configure
(CacheServer cacheServer) Configures the providedCacheServer
with any custom, application-specific configuration.void
destroy()
protected CacheServerConfigurer
Returns a reference to the CompositeCacheServerConfigurer
used to apply additional configuration to thisCacheServerFactoryBean
on Spring container initialization.Class<?>
int
getPhase()
Start at the latest possible moment.boolean
boolean
protected CacheServer
postProcess
(CacheServer cacheServer) Post-process theCacheServer
with any necessary follow-up actions.void
setAutoStartup
(boolean autoStartup) void
setBindAddress
(String bindAddress) void
void
setCacheServerConfigurers
(List<CacheServerConfigurer> cacheServerConfigurers) Null-safe operation to set anIterable
ofCacheServerConfigurers
used to apply additional configuration to thisCacheServerFactoryBean
when using Annotation-based configuration.void
setCacheServerConfigurers
(CacheServerConfigurer... cacheServerConfigurers) Null-safe operation to set an array ofCacheServerConfigurers
used to apply additional configuration to thisCacheServerFactoryBean
when using Annotation-based configuration.void
setHostNameForClients
(String hostNameForClients) void
setListeners
(Set<InterestRegistrationListener> listeners) void
setLoadPollInterval
(long loadPollInterval) void
setMaxConnections
(int maxConnections) void
setMaxMessageCount
(int maxMessageCount) void
setMaxThreads
(int maxThreads) void
setMaxTimeBetweenPings
(int maxTimeBetweenPings) void
setMessageTimeToLive
(int messageTimeToLive) void
setNotifyBySubscription
(boolean notifyBySubscription) void
setPort
(int port) void
setServerGroups
(String[] serverGroups) void
setServerLoadProbe
(ServerLoadProbe serverLoadProbe) void
setSocketBufferSize
(int socketBufferSize) void
setSubscriptionCapacity
(int subscriptionCapacity) void
setSubscriptionDiskStore
(String diskStoreName) void
setSubscriptionEvictionPolicy
(SubscriptionEvictionPolicy evictionPolicy) void
setTcpNoDelay
(boolean tcpNoDelay) void
start()
void
stop()
void
Methods inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
getBeanClassLoader, getBeanFactory, getBeanName, getLogger, getOptionalLogger, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLogger, setBeanClassLoader, setBeanFactory, setBeanName
-
Constructor Details
-
CacheServerFactoryBean
public CacheServerFactoryBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Throws:
IOException
-
applyCacheServerConfigurers
Null-safe operation to apply the given array ofCacheServerConfigurers
to thisCacheServerFactoryBean
.- Parameters:
cacheServerConfigurers
- array ofCacheServerConfigurers
applied to thisCacheServerFactoryBean
.- See Also:
-
applyCacheServerConfigurers
Null-safe operation to apply the givenIterable
ofCacheServerConfigurers
to thisCacheServerFactoryBean
.- Parameters:
cacheServerConfigurers
-Iterable
ofCacheServerConfigurers
applied to thisCacheServerFactoryBean
.- See Also:
-
addCacheServer
- Parameters:
cache
-Cache
used to add aCacheServer
.- Returns:
- the newly added
CacheServer
. - See Also:
-
configure
Configures the providedCacheServer
with any custom, application-specific configuration.- Parameters:
cacheServer
-CacheServer
to configure.- Returns:
- the given
CacheServer
. - See Also:
-
postProcess
Post-process theCacheServer
with any necessary follow-up actions.- Parameters:
cacheServer
-CacheServer
to process.- Returns:
- the given
CacheServer
. - See Also:
-
getCompositeCacheServerConfigurer
Returns a reference to the CompositeCacheServerConfigurer
used to apply additional configuration to thisCacheServerFactoryBean
on Spring container initialization.- Returns:
- the Composite
CacheServerConfigurer
. - See Also:
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<CacheServer>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<CacheServer>
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceSmartLifecycle
-
isRunning
public boolean isRunning() -
getPhase
public int getPhase()Start at the latest possible moment.- Specified by:
getPhase
in interfacePhased
- Specified by:
getPhase
in interfaceSmartLifecycle
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
-
start
public void start() -
stop
public void stop() -
stop
- Specified by:
stop
in interfaceSmartLifecycle
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
setBindAddress
-
setCache
-
setCacheServerConfigurers
Null-safe operation to set an array ofCacheServerConfigurers
used to apply additional configuration to thisCacheServerFactoryBean
when using Annotation-based configuration.- Parameters:
cacheServerConfigurers
- array ofCacheServerConfigurers
used to apply additional configuration to thisCacheServerFactoryBean
.- See Also:
-
setCacheServerConfigurers
Null-safe operation to set anIterable
ofCacheServerConfigurers
used to apply additional configuration to thisCacheServerFactoryBean
when using Annotation-based configuration.- Parameters:
cacheServerConfigurers
- Iterable ofCacheServerConfigurers
used 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)
-