public class PoolFactoryBean extends AbstractFactoryBeanSupport<org.apache.geode.cache.client.Pool> implements DisposableBean, InitializingBean
FactoryBean used to construct, configure and initialize a Pool.
If a new Pool is created, its lifecycle is bound to that of this declaring FactoryBean
and indirectly, the Spring container.
If a Pool having the configured name already exists, then the existing Pool
will be returned as is without any modifications and its lifecycle will be unaffected by this FactoryBean.InetSocketAddress,
ClientCache,
Pool,
PoolFactory,
PoolManager,
DistributedSystem,
DisposableBean,
InitializingBean,
PoolResolver,
PoolConfigurer,
AbstractFactoryBeanSupport,
ConnectionEndpoint,
ConnectionEndpointList| Modifier and Type | Class and Description |
|---|---|
static interface |
PoolFactoryBean.PoolFactoryInitializer
Callback interface to initialize the
PoolFactory used by this PoolFactoryBean
to create a Pool by providing additional or alternative configuration for the factory. |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_LOCATOR_PORT |
protected static PoolResolver |
DEFAULT_POOL_RESOLVER |
protected static int |
DEFAULT_SERVER_PORT |
DEFAULT_SINGLETONOBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
PoolFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocators(ConnectionEndpoint... locators) |
void |
addLocators(Iterable<ConnectionEndpoint> locators) |
void |
addServers(ConnectionEndpoint... servers) |
void |
addServers(Iterable<ConnectionEndpoint> servers) |
void |
afterPropertiesSet()
Prepares the construction, configuration and initialization of a new
Pool. |
protected void |
applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers)
|
protected void |
applyPoolConfigurers(PoolConfigurer... poolConfigurers)
Null-safe operation to apply the given array of
PoolConfigurers
to this PoolFactoryBean. |
protected org.apache.geode.cache.client.PoolFactory |
configure(org.apache.geode.cache.client.PoolFactory poolFactory)
Configures the given
PoolFactory from this PoolFactoryBean. |
protected org.apache.geode.cache.client.Pool |
create(org.apache.geode.cache.client.PoolFactory poolFactory,
String poolName)
Deprecated.
Use
createPool(PoolFactory, String) instead. |
protected org.apache.geode.cache.client.Pool |
createPool(org.apache.geode.cache.client.PoolFactory poolFactory,
String poolName)
|
protected org.apache.geode.cache.client.PoolFactory |
createPoolFactory()
Creates an instance of the
PoolFactory interface to construct, configure and initialize a Pool. |
void |
destroy()
Releases all system resources and destroys the
Pool when created by this PoolFactoryBean. |
protected PoolConfigurer |
getCompositePoolConfigurer()
Returns a reference to the Composite
PoolConfigurer used to apply additional configuration
to this PoolFactoryBean on Spring container initialization. |
protected String |
getName() |
org.apache.geode.cache.client.Pool |
getObject()
Returns an object reference to the
Pool created by this PoolFactoryBean. |
Class<?> |
getObjectType()
|
org.apache.geode.cache.client.Pool |
getPool() |
PoolResolver |
getPoolResolver()
|
protected org.apache.geode.cache.client.SocketFactory |
getSocketFactory() |
protected org.apache.geode.cache.client.PoolFactory |
initialize(org.apache.geode.cache.client.PoolFactory poolFactory)
Initializes the given
PoolFactory with any configured PoolFactoryBean.PoolFactoryInitializer. |
protected org.apache.geode.cache.client.Pool |
postProcess(org.apache.geode.cache.client.Pool pool)
Post processes the
Pool created by this PoolFactoryBean. |
protected org.apache.geode.cache.client.PoolFactory |
postProcess(org.apache.geode.cache.client.PoolFactory poolFactory)
Post processes the fully configured
PoolFactory. |
void |
setFreeConnectionTimeout(int freeConnectionTimeout) |
void |
setIdleTimeout(long idleTimeout) |
void |
setKeepAlive(boolean keepAlive) |
void |
setLoadConditioningInterval(int loadConditioningInterval) |
void |
setLocators(ConnectionEndpoint[] connectionEndpoints) |
void |
setLocators(Iterable<ConnectionEndpoint> connectionEndpoints) |
void |
setLocatorsConfiguration(Object locatorsConfiguration) |
void |
setMaxConnections(int maxConnections) |
void |
setMinConnections(int minConnections) |
void |
setMultiUserAuthentication(boolean multiUserAuthentication) |
void |
setName(String name) |
void |
setPingInterval(long pingInterval) |
void |
setPool(org.apache.geode.cache.client.Pool pool) |
void |
setPoolConfigurers(List<PoolConfigurer> poolConfigurers)
Null-safe operation to set an
Iterable of PoolConfigurers used to apply
additional configuration to this PoolFactoryBean when using Annotation-based configuration. |
void |
setPoolConfigurers(PoolConfigurer... poolConfigurers)
Null-safe operation to set an array of
PoolConfigurers used to apply
additional configuration to this PoolFactoryBean when using Annotation-based configuration. |
void |
setPoolFactoryInitializer(PoolFactoryBean.PoolFactoryInitializer poolFactoryInitializer)
Sets the
PoolFactoryBean.PoolFactoryInitializer to initialize the PoolFactory used by
this PoolFactoryBean to create a Pool. |
void |
setPoolResolver(PoolResolver poolResolver)
|
void |
setPrSingleHopEnabled(boolean prSingleHopEnabled) |
void |
setReadTimeout(int readTimeout) |
void |
setRetryAttempts(int retryAttempts) |
void |
setServerConnectionTimeout(int serverConnectionTimeout) |
void |
setServerGroup(String serverGroup) |
void |
setServers(ConnectionEndpoint[] connectionEndpoints) |
void |
setServers(Iterable<ConnectionEndpoint> connectionEndpoints) |
void |
setServersConfiguration(Object serversConfiguration) |
void |
setSocketBufferSize(int socketBufferSize) |
void |
setSocketConnectTimeout(int socketConnectTimeout) |
void |
setSocketFactory(org.apache.geode.cache.client.SocketFactory socketFactory) |
void |
setStatisticInterval(int statisticInterval) |
void |
setSubscriptionAckInterval(int subscriptionAckInterval) |
void |
setSubscriptionEnabled(boolean subscriptionEnabled) |
void |
setSubscriptionMessageTrackingTimeout(int subscriptionMessageTrackingTimeout) |
void |
setSubscriptionRedundancy(int subscriptionRedundancy) |
void |
setSubscriptionTimeoutMultiplier(int subscriptionTimeoutMultiplier) |
void |
setThreadLocalConnections(boolean threadLocalConnections)
Deprecated.
|
getBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanNameprotected static final int DEFAULT_LOCATOR_PORT
protected static final int DEFAULT_SERVER_PORT
protected static final PoolResolver DEFAULT_POOL_RESOLVER
public void afterPropertiesSet()
throws Exception
Pool.afterPropertiesSet in interface InitializingBeanException - if Pool initialization fails.PoolManager,
PoolFactory,
Poolprotected void applyPoolConfigurers(PoolConfigurer... poolConfigurers)
PoolConfigurers
to this PoolFactoryBean.poolConfigurers - array of PoolConfigurers applied to this PoolFactoryBean.PoolConfigurer,
applyPoolConfigurers(Iterable)protected void applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers)
poolConfigurers - Iterable of PoolConfigurers
applied to this PoolFactoryBean.PoolConfigurerpublic void destroy()
Pool when created by this PoolFactoryBean.destroy in interface DisposableBeanDisposableBean.destroy()public org.apache.geode.cache.client.Pool getObject()
throws Exception
Pool created by this PoolFactoryBean.getObject in interface FactoryBean<org.apache.geode.cache.client.Pool>Pool created by this PoolFactoryBean.ExceptionFactoryBean.getObject(),
Poolprotected org.apache.geode.cache.client.PoolFactory createPoolFactory()
PoolFactory interface to construct, configure and initialize a Pool.PoolFactory implementation to create a Pool.PoolManager.createFactory(),
PoolFactoryprotected org.apache.geode.cache.client.PoolFactory configure(org.apache.geode.cache.client.PoolFactory poolFactory)
PoolFactory from this PoolFactoryBean.poolFactory - PoolFactory to configure.PoolFactory.PoolFactoryprotected org.apache.geode.cache.client.PoolFactory initialize(org.apache.geode.cache.client.PoolFactory poolFactory)
PoolFactory with any configured PoolFactoryBean.PoolFactoryInitializer.poolFactory - PoolFactory to initialize.PoolFactory.PoolFactoryprotected org.apache.geode.cache.client.PoolFactory postProcess(org.apache.geode.cache.client.PoolFactory poolFactory)
PoolFactory.poolFactory - PoolFactory to post process.PoolFactory.PoolFactory@Deprecated protected org.apache.geode.cache.client.Pool create(org.apache.geode.cache.client.PoolFactory poolFactory, String poolName)
createPool(PoolFactory, String) instead.protected org.apache.geode.cache.client.Pool createPool(org.apache.geode.cache.client.PoolFactory poolFactory,
String poolName)
protected org.apache.geode.cache.client.Pool postProcess(org.apache.geode.cache.client.Pool pool)
Pool created by this PoolFactoryBean.pool - Pool to post process.Pool.Poolpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<org.apache.geode.cache.client.Pool>type of Pool produced by this PoolFactoryBean.FactoryBean.getObjectType()public void addLocators(ConnectionEndpoint... locators)
public void addLocators(Iterable<ConnectionEndpoint> locators)
public void addServers(ConnectionEndpoint... servers)
public void addServers(Iterable<ConnectionEndpoint> servers)
protected PoolConfigurer getCompositePoolConfigurer()
PoolConfigurer used to apply additional configuration
to this PoolFactoryBean on Spring container initialization.PoolConfigurer.PoolConfigurerpublic void setName(String name)
protected String getName()
public void setPool(org.apache.geode.cache.client.Pool pool)
public org.apache.geode.cache.client.Pool getPool()
public void setFreeConnectionTimeout(int freeConnectionTimeout)
public void setIdleTimeout(long idleTimeout)
public void setKeepAlive(boolean keepAlive)
public void setLoadConditioningInterval(int loadConditioningInterval)
public void setLocators(ConnectionEndpoint[] connectionEndpoints)
public void setLocators(Iterable<ConnectionEndpoint> connectionEndpoints)
public void setMaxConnections(int maxConnections)
public void setMinConnections(int minConnections)
public void setMultiUserAuthentication(boolean multiUserAuthentication)
public void setPingInterval(long pingInterval)
public void setPoolConfigurers(PoolConfigurer... poolConfigurers)
PoolConfigurers used to apply
additional configuration to this PoolFactoryBean when using Annotation-based configuration.poolConfigurers - array of PoolConfigurers used to apply
additional configuration to this PoolFactoryBean.PoolConfigurer,
setPoolConfigurers(List)public void setPoolConfigurers(List<PoolConfigurer> poolConfigurers)
Iterable of PoolConfigurers used to apply
additional configuration to this PoolFactoryBean when using Annotation-based configuration.poolConfigurers - Iterable of PoolConfigurers used to apply
additional configuration to this PoolFactoryBean.PoolConfigurerpublic void setPoolFactoryInitializer(PoolFactoryBean.PoolFactoryInitializer poolFactoryInitializer)
PoolFactoryBean.PoolFactoryInitializer to initialize the PoolFactory used by
this PoolFactoryBean to create a Pool.poolFactoryInitializer - PoolFactoryBean.PoolFactoryInitializer user provided callback interface invoked
by this PoolFactoryBean to initialize the PoolFactory constructed to create the Pool.PoolFactoryBean.PoolFactoryInitializerpublic void setPoolResolver(PoolResolver poolResolver)
poolResolver - the configured PoolResolver used to resolve Pool objects
by name.PoolResolverpublic PoolResolver getPoolResolver()
PoolResolver.PoolResolverpublic void setPrSingleHopEnabled(boolean prSingleHopEnabled)
public void setReadTimeout(int readTimeout)
public void setRetryAttempts(int retryAttempts)
public void setServerConnectionTimeout(int serverConnectionTimeout)
public void setServerGroup(String serverGroup)
public void setServers(ConnectionEndpoint[] connectionEndpoints)
public void setServers(Iterable<ConnectionEndpoint> connectionEndpoints)
public void setSocketBufferSize(int socketBufferSize)
public void setSocketConnectTimeout(int socketConnectTimeout)
public void setSocketFactory(org.apache.geode.cache.client.SocketFactory socketFactory)
protected org.apache.geode.cache.client.SocketFactory getSocketFactory()
public void setStatisticInterval(int statisticInterval)
public void setSubscriptionAckInterval(int subscriptionAckInterval)
public void setSubscriptionEnabled(boolean subscriptionEnabled)
public void setSubscriptionMessageTrackingTimeout(int subscriptionMessageTrackingTimeout)
public void setSubscriptionRedundancy(int subscriptionRedundancy)
public void setSubscriptionTimeoutMultiplier(int subscriptionTimeoutMultiplier)
@Deprecated public void setThreadLocalConnections(boolean threadLocalConnections)
public final void setLocatorsConfiguration(Object locatorsConfiguration)
public final void setServersConfiguration(Object serversConfiguration)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.