gemfire::Pool Class Reference

Inherits gemfire::SharedBase.


Detailed Description

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

Instances of this interface are created using PoolFactory#create.

Existing instances can be found using PoolFactory#find and PoolFactory#getAll.

The pool name must be configured on the client regions that will use this pool by calling AttributeFactory#setPoolName.

Public Member Functions

virtual void destroy (bool keepAlive=false)=0
 Destroys this pool closing any connections it produced.
int getFreeConnectionTimeout () const
 Returns the connection timeout of this pool.
long getIdleTimeout () const
 Gets the idle connection timeout for this pool.
int getLoadConditioningInterval () const
 Returns the load conditioning interval of this pool.
virtual const
CacheableStringArrayPtr 
getLocators () const =0
 Returns an unmodifiable list locators that this pool is using.
int getMaxConnections () const
 Gets the maximum connections for this pool.
int getMinConnections () const
 Gets the minimum connections for this pool.
bool getMultiuserAuthentication () const
 Returns true if multiuser authentication is enabled on this pool.
virtual const char * getName () const =0
 Gets the name of the connection pool.
long getPingInterval () const
 Gets the ping interval for this pool.
bool getPRSingleHopEnabled () const
 Returns true if single-hop optimisation is enabled on this pool.
virtual QueryServicePtr getQueryService ()=0
 Returns the QueryService for this Pool.
int getReadTimeout () const
 Returns the read timeout of this pool.
int getRetryAttempts () const
 Gets the retry attempts for this pool.
const char * getServerGroup () const
 Returns the server group of this pool.
virtual const
CacheableStringArrayPtr 
getServers ()=0
 Returns an unmodifiable list of servers this pool is using.
int getSocketBufferSize () const
 Returns the socket buffer size of this pool.
int getStatisticInterval () const
 Gets the statistic interval for this pool.
int getSubscriptionAckInterval () const
 Returns the subscription ack interval of this pool.
bool getSubscriptionEnabled () const
 Returns the true if a server-to-client subscriptions are enabled on this pool.
int getSubscriptionMessageTrackingTimeout () const
 Returns the subscription message tracking timeout of this pool.
int getSubscriptionRedundancy () const
 Returns the subscription redundancy level of this pool.
bool getThreadLocalConnections () const
 Returns true if thread local connections are enabled on this pool.
virtual bool isDestroyed () const =0
 Indicates whether this Pool has been destroyed.
void preserveSB () const
 Atomically increment reference count.
int32_t refCount ()
 
Returns:
the reference count

void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
virtual void releaseThreadLocalConnection ()=0
 If this pool was configured to use threadlocalconnections, then this method will release the connection cached for the calling thread.


Member Function Documentation

virtual void gemfire::Pool::destroy ( bool  keepAlive = false  )  [pure virtual]

Destroys this pool closing any connections it produced.

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

int gemfire::Pool::getFreeConnectionTimeout (  )  const

Returns the connection timeout of this pool.

See also:
PoolFactory::setFreeConnectionTimeout

long gemfire::Pool::getIdleTimeout (  )  const

Gets the idle connection timeout for this pool.

See also:
PoolFactory::setIdleTimeout(long)

int gemfire::Pool::getLoadConditioningInterval (  )  const

Returns the load conditioning interval of this pool.

See also:
PoolFactory::setLoadConditioningInterval

virtual const CacheableStringArrayPtr gemfire::Pool::getLocators (  )  const [pure virtual]

Returns an unmodifiable list locators that this pool is using.

Each locator was either added explicitly when the pool was created or was discovered using the explicit locators.

If a pool has no locators, then it cannot discover servers or locators at runtime.

int gemfire::Pool::getMaxConnections (  )  const

Gets the maximum connections for this pool.

See also:
PoolFactory::setMaxConnections(int)

int gemfire::Pool::getMinConnections (  )  const

Gets the minimum connections for this pool.

See also:
PoolFactory::setMinConnections(int)

bool gemfire::Pool::getMultiuserAuthentication (  )  const

Returns true if multiuser authentication is enabled on this pool.

See also:
PoolFactory::setMultiuserAuthentication

virtual const char* gemfire::Pool::getName (  )  const [pure virtual]

Gets the name of the connection pool.

Returns:
the name of the pool
See also:
PoolFactory::create

long gemfire::Pool::getPingInterval (  )  const

Gets the ping interval for this pool.

See also:
PoolFactory::setPingInterval(long)

bool gemfire::Pool::getPRSingleHopEnabled (  )  const

Returns true if single-hop optimisation is enabled on this pool.

See also:
PoolFactory::setPRSingleHopEnabled

virtual QueryServicePtr gemfire::Pool::getQueryService (  )  [pure virtual]

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.

Exceptions:
unSupported Exception when Pool is in multi user mode.
See also:
Cache::getQueryService
Returns:
the QueryService

int gemfire::Pool::getReadTimeout (  )  const

Returns the read timeout of this pool.

See also:
PoolFactory::setReadTimeout

int gemfire::Pool::getRetryAttempts (  )  const

Gets the retry attempts for this pool.

See also:
PoolFactory::setRetryAttempts(int)

const char* gemfire::Pool::getServerGroup (  )  const

Returns the server group of this pool.

See also:
PoolFactory::setServerGroup

virtual const CacheableStringArrayPtr gemfire::Pool::getServers (  )  [pure virtual]

Returns an unmodifiable list of servers this pool is using.

These servers where either added explicitly when the pool was created or were discovered using this pools locators.

int gemfire::Pool::getSocketBufferSize (  )  const

Returns the socket buffer size of this pool.

See also:
PoolFactory::setSocketBufferSize

int gemfire::Pool::getStatisticInterval (  )  const

Gets the statistic interval for this pool.

See also:
PoolFactory::setStatisticInterval(int)

int gemfire::Pool::getSubscriptionAckInterval (  )  const

Returns the subscription ack interval of this pool.

See also:
PoolFactory::setSubscriptionAckInterval(int)

bool gemfire::Pool::getSubscriptionEnabled (  )  const

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

See also:
PoolFactory::setSubscriptionEnabled

int gemfire::Pool::getSubscriptionMessageTrackingTimeout (  )  const

Returns the subscription message tracking timeout of this pool.

See also:
PoolFactory::setSubscriptionMessageTrackingTimeout

int gemfire::Pool::getSubscriptionRedundancy (  )  const

Returns the subscription redundancy level of this pool.

See also:
PoolFactory::setSubscriptionRedundancy

bool gemfire::Pool::getThreadLocalConnections (  )  const

Returns true if thread local connections are enabled on this pool.

See also:
PoolFactory::setThreadLocalConnections

virtual bool gemfire::Pool::isDestroyed (  )  const [pure virtual]

Indicates whether this Pool has been destroyed.

Returns:
true if the pool has been destroyed.

void gemfire::SharedBase::preserveSB (  )  const [inherited]

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount (  )  [inline, inherited]

Returns:
the reference count

void gemfire::SharedBase::releaseSB (  )  const [inherited]

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

virtual void gemfire::Pool::releaseThreadLocalConnection (  )  [pure virtual]

If this pool was configured to use threadlocalconnections, 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 threadlocalconnections, this method will have no effect.


GemFire C++ Cache API Documentation