public class PoolFactoryBean extends AbstractFactoryBeanSupport<org.apache.geode.cache.client.Pool> implements DisposableBean, InitializingBean
FactoryBean
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
,
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 int |
DEFAULT_SERVER_PORT |
DEFAULT_SINGLETON
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)
|
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() |
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 |
setPrSingleHopEnabled(boolean prSingleHopEnabled) |
void |
setReadTimeout(int readTimeout) |
void |
setRetryAttempts(int retryAttempts) |
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 |
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) |
getBeanClassLoader, getBeanFactory, getBeanName, getLog, isSingleton, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory, setBeanName
protected static final int DEFAULT_LOCATOR_PORT
protected static final int DEFAULT_SERVER_PORT
public void afterPropertiesSet() throws Exception
Pool
.afterPropertiesSet
in interface InitializingBean
Exception
- if Pool
initialization fails.PoolManager
,
PoolFactory
,
Pool
protected 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
.PoolConfigurer
public void destroy() throws Exception
Pool
when created by this PoolFactoryBean
.destroy
in interface DisposableBean
Exception
- if the Pool
destruction caused an error.DisposableBean.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
.Exception
FactoryBean.getObject()
,
Pool
protected org.apache.geode.cache.client.PoolFactory createPoolFactory()
PoolFactory
interface to construct, configure and initialize a Pool
.PoolFactory
implementation to create a Pool
.PoolManager.createFactory()
,
PoolFactory
protected org.apache.geode.cache.client.PoolFactory configure(org.apache.geode.cache.client.PoolFactory poolFactory)
PoolFactory
from this PoolFactoryBean
.poolFactory
- PoolFactory
to configure.PoolFactory
.PoolFactory
protected 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
.PoolFactory
protected org.apache.geode.cache.client.PoolFactory postProcess(org.apache.geode.cache.client.PoolFactory poolFactory)
PoolFactory
.poolFactory
- PoolFactory
to post process.PoolFactory
.PoolFactory
protected org.apache.geode.cache.client.Pool create(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
.Pool
public 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
.PoolConfigurer
public 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
.PoolConfigurer
public 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.PoolFactoryInitializer
public void setPrSingleHopEnabled(boolean prSingleHopEnabled)
public void setReadTimeout(int readTimeout)
public void setRetryAttempts(int retryAttempts)
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 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)
public void setThreadLocalConnections(boolean threadLocalConnections)
public final void setLocatorsConfiguration(Object locatorsConfiguration)
public final void setServersConfiguration(Object serversConfiguration)
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.