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_SINGLETON
OBJECT_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()
Gets the configured
name of the Pool bean. |
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()
Gets the
Pool configured and built by this PoolFactoryBean . |
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[] locators) |
void |
setLocators(Iterable<ConnectionEndpoint> locators) |
void |
setMaxConnections(int maxConnections) |
void |
setMinConnections(int minConnections) |
void |
setMultiUserAuthentication(boolean multiUserAuthentication) |
void |
setName(String name)
Configures the
name of the Pool bean. |
void |
setPingInterval(long pingInterval) |
void |
setPool(org.apache.geode.cache.client.Pool pool)
Configures the
Pool to be returned by this PoolFactoryBean . |
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[] servers) |
void |
setServers(Iterable<ConnectionEndpoint> servers) |
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.
|
void |
setXmlDeclaredLocators(ConnectionEndpointList xmlDeclaredLocators) |
void |
setXmlDeclaredServers(ConnectionEndpointList xmlDeclaredServers) |
getBeanClassLoader, getBeanFactory, getBeanName, getLogger, getOptionalLogger, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLogger, setBeanClassLoader, setBeanFactory, setBeanName
protected 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 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()
Pool
when created by this PoolFactoryBean
.destroy
in interface DisposableBean
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
@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
.Pool
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<org.apache.geode.cache.client.Pool>
type
of Pool
produced by this PoolFactoryBean
.FactoryBean.getObjectType()
,
Pool
,
Class
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
protected String getName()
name
of the Pool
bean.name
of the Pool
bean.AbstractFactoryBeanSupport.getBeanName()
,
setName(String)
public void setPool(@Nullable org.apache.geode.cache.client.Pool pool)
Pool
to be returned by this PoolFactoryBean
.pool
- the Pool
to be returned by this PoolFactoryBean
.Pool
@NonNull public org.apache.geode.cache.client.Pool getPool()
Pool
configured and built by this PoolFactoryBean
.
May return a proxy Pool
if the actual Pool
has not yet been configured and built by
this PoolFactoryBean
. In this case, the proxy Pool
object will have the same configuration
as the final Pool
built by this PoolFactoryBean
.Pool
configured and built by this PoolFactoryBean
.Pool
,
setPool(Pool)
public void setFreeConnectionTimeout(int freeConnectionTimeout)
public void setIdleTimeout(long idleTimeout)
public void setKeepAlive(boolean keepAlive)
public void setLoadConditioningInterval(int loadConditioningInterval)
public void setLocators(ConnectionEndpoint[] locators)
public void setLocators(Iterable<ConnectionEndpoint> locators)
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 setPoolResolver(PoolResolver poolResolver)
poolResolver
- the configured PoolResolver
used to resolve Pool
objects
by name
.PoolResolver
public PoolResolver getPoolResolver()
PoolResolver
.PoolResolver
public 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[] servers)
public void setServers(Iterable<ConnectionEndpoint> servers)
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 void setXmlDeclaredLocators(ConnectionEndpointList xmlDeclaredLocators)
public void setXmlDeclaredServers(ConnectionEndpointList xmlDeclaredServers)
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.