GemFire 5.7

com.gemstone.gemfire.cache.client
Interface Pool


public interface Pool

A pool for connections from a client to a set of GemFire Cache Servers.

Instances of this interface are created using PoolFactory.create(java.lang.String).

Existing instances can be found using PoolManager.find(java.lang.String) and PoolManager.getAll().

The pool name must be configured on the client regions that will use this pool by calling RegionFactory.setPoolName(java.lang.String).

Since:
5.7

Method Summary
 void destroy()
          Destroys this pool closing any connections it produced.
 void destroy(boolean keepAlive)
          Destroys this pool closing any connections it produced.
 int getFreeConnectionTimeout()
          Returns the connection timeout of this pool.
 long getIdleTimeout()
          Get the maximum connections for this pool.
 int getLoadConditioningInterval()
          Returns the load conditioning interval of this pool.
 List getLocators()
          Returns an unmodifiable list of InetSocketAddress of the locators this pool is using.
 int getMaxConnections()
          Get the maximum connections for this pool.
 int getMinConnections()
          Get the minimum connections for this pool.
 String getName()
          Get the name of the connection pool
 long getPingInterval()
          Get the ping interval for this pool.
 QueryService getQueryService()
          Returns the QueryService for this Pool.
 int getReadTimeout()
          Returns the read timeout of this pool.
 int getRetryAttempts()
          Get the retry attempts for this pool.
 String getServerGroup()
          Returns the server group of this pool.
 List getServers()
          Returns an unmodifiable list of InetSocketAddress of the servers this pool is using.
 int getSocketBufferSize()
          Returns the socket buffer size of this pool.
 int getStatisticInterval()
          Get the statistic interval for this pool.
 int getSubscriptionAckInterval()
          Returns the subscription ack interval of this pool.
 boolean getSubscriptionEnabled()
          Returns the true if a server-to-client subscriptions are enabled on this pool.
 int getSubscriptionMessageTrackingTimeout()
          Returns the subscription message tracking timeout of this pool.
 int getSubscriptionRedundancy()
          Returns the subscription redundancy level of this pool.
 boolean getThreadLocalConnections()
          Returns true if thread local connections are enabled on this pool.
 boolean isDestroyed()
          Indicates whether this Pool has been destroyed.
 void releaseThreadLocalConnection()
          If this pool was configured to to use thread local connections, then this method will release the connection cached for the calling thread.
 

Method Detail

getName

String getName()
Get the name of the connection pool

Returns:
the name of the pool
See Also:
PoolFactory.create(java.lang.String)

getFreeConnectionTimeout

int getFreeConnectionTimeout()
Returns the connection timeout of this pool.

See Also:
PoolFactory.setFreeConnectionTimeout(int)

getLoadConditioningInterval

int getLoadConditioningInterval()
Returns the load conditioning interval of this pool.

See Also:
PoolFactory.setLoadConditioningInterval(int)

getSocketBufferSize

int getSocketBufferSize()
Returns the socket buffer size of this pool.

See Also:
PoolFactory.setSocketBufferSize(int)

getReadTimeout

int getReadTimeout()
Returns the read timeout of this pool.

See Also:
PoolFactory.setReadTimeout(int)

getMinConnections

int getMinConnections()
Get the minimum connections for this pool.

See Also:
PoolFactory.setMinConnections(int)

getMaxConnections

int getMaxConnections()
Get the maximum connections for this pool.

See Also:
PoolFactory.setMaxConnections(int)

getIdleTimeout

long getIdleTimeout()
Get the maximum connections for this pool.

See Also:
PoolFactory.setIdleTimeout(long)

getPingInterval

long getPingInterval()
Get the ping interval for this pool.

See Also:
PoolFactory.setPingInterval(long)

getStatisticInterval

int getStatisticInterval()
Get the statistic interval for this pool.

See Also:
PoolFactory.setStatisticInterval(int)

getRetryAttempts

int getRetryAttempts()
Get the retry attempts for this pool.

See Also:
PoolFactory.setRetryAttempts(int)

getThreadLocalConnections

boolean getThreadLocalConnections()
Returns true if thread local connections are enabled on this pool.

See Also:
PoolFactory.setThreadLocalConnections(boolean)

getSubscriptionEnabled

boolean getSubscriptionEnabled()
Returns the true if a server-to-client subscriptions are enabled on this pool.

See Also:
PoolFactory.setSubscriptionEnabled(boolean)

getSubscriptionRedundancy

int getSubscriptionRedundancy()
Returns the subscription redundancy level of this pool.

See Also:
PoolFactory.setSubscriptionRedundancy(int)

getSubscriptionMessageTrackingTimeout

int getSubscriptionMessageTrackingTimeout()
Returns the subscription message tracking timeout of this pool.

See Also:
PoolFactory.setSubscriptionMessageTrackingTimeout(int)

getSubscriptionAckInterval

int getSubscriptionAckInterval()
Returns the subscription ack interval of this pool.

See Also:
PoolFactory.setSubscriptionAckInterval(int)

getServerGroup

String getServerGroup()
Returns the server group of this pool.

See Also:
PoolFactory.setServerGroup(java.lang.String)

getLocators

List getLocators()
Returns an unmodifiable list of InetSocketAddress of the locators this pool is using. Each locator is either one added explicitly when the pool was created or were discovered using the explicit locators.

If a pool has no locators then it can not discover servers or locators at runtime.


getServers

List getServers()
Returns an unmodifiable list of InetSocketAddress of the servers this pool is using. These servers where either added explicitly when the pool was created or were discovered using this pools locators.


destroy

void destroy(boolean keepAlive)
Destroys this pool closing any connections it produced.

Parameters:
keepAlive - whether the server should keep the durable client's subscriptions alive for the timeout period
Throws:
IllegalStateException - if the pool is still in use

destroy

void destroy()
Destroys this pool closing any connections it produced.

Throws:
IllegalStateException - if the pool is still in use

isDestroyed

boolean isDestroyed()
Indicates whether this Pool has been destroyed.

Returns:
true if the pool has been destroyed

releaseThreadLocalConnection

void releaseThreadLocalConnection()
If this pool was configured to to use thread local connections, then this method will release the connection cached for the calling thread. The connection will then be available for use by other threads. If this pool is not using thread local connections, this method will have no effect.


getQueryService

QueryService getQueryService()
Returns the QueryService for this Pool. The query operations performed using this QueryService will be executed on the servers that are associated with this pool. To perform Query operation on the local cache obtain the QueryService instance from the Cache.

Returns:
the QueryService
See Also:
Cache.getQueryService()

GemFire 5.7

Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.