VMware VMware GemFire Native C++ Reference 10.4.3
|
A pool of connections to connect from a client to a set of Geode Cache Servers. More...
#include <Pool.hpp>
Inherits std::enable_shared_from_this< Pool >.
Public Member Functions | |
virtual void | destroy (bool keepAlive=false)=0 |
Destroys this pool closing any connections it produced. | |
std::chrono::milliseconds | getFreeConnectionTimeout () const |
Returns the connection timeout of this pool. | |
std::chrono::milliseconds | getIdleTimeout () const |
Gets the idle connection timeout for this pool. | |
std::chrono::milliseconds | getLoadConditioningInterval () const |
Returns the load conditioning interval of this pool. | |
virtual const std::shared_ptr< CacheableStringArray > | 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 std::string & | getName () const =0 |
Gets the name of the connection pool. | |
int | getPendingEventCount () const |
Returns the approximate number of pending subscription events maintained at server for this durable client pool at the time it (re)connected to the server. | |
std::chrono::milliseconds | getPingInterval () const |
Gets the ping interval for this pool. | |
bool | getPRSingleHopEnabled () const |
Returns true if single-hop optimization is enabled on this pool. | |
virtual std::shared_ptr< QueryService > | getQueryService ()=0 |
Returns the QueryService for this Pool. | |
std::chrono::milliseconds | getReadTimeout () const |
Returns the read timeout of this pool. | |
int | getRetryAttempts () const |
Gets the retry attempts for this pool. | |
const std::string & | getServerGroup () const |
Returns the server group of this pool. | |
virtual const std::shared_ptr< CacheableStringArray > | getServers ()=0 |
Returns an unmodifiable list of servers this pool is using. | |
const std::string & | getSniProxyHost () const |
Gets the host name of the SniProxy. | |
uint16_t | getSniProxyPort () const |
Gets the port of the SniProxy. | |
int | getSocketBufferSize () const |
Returns the socket buffer size of this pool. | |
std::chrono::milliseconds | getStatisticInterval () const |
Gets the statistic interval for this pool. | |
std::chrono::milliseconds | 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. | |
std::chrono::milliseconds | 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. | |
std::chrono::milliseconds | getUpdateLocatorListInterval () const |
Gets the update locator list interval for this pool. | |
virtual bool | isDestroyed () const =0 |
Indicates whether this Pool has been destroyed. | |
virtual void | releaseThreadLocalConnection ()=0 |
If this pool was configured to use threadlocalconnections , then this method will release the connection cached for the calling thread. | |
A pool of connections to connect from a client to a set of Geode 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
.
|
pure virtual |
Destroys this pool closing any connections it produced.
keepAlive | defines whether the server should keep the durable client's subscriptions alive for the timeout period. |
IllegalStateException | if the pool is still in use. |
std::chrono::milliseconds apache::geode::client::Pool::getFreeConnectionTimeout | ( | ) | const |
Returns the connection timeout of this pool.
std::chrono::milliseconds apache::geode::client::Pool::getIdleTimeout | ( | ) | const |
Gets the idle connection timeout for this pool.
std::chrono::milliseconds apache::geode::client::Pool::getLoadConditioningInterval | ( | ) | const |
Returns the load conditioning interval of this pool.
|
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 apache::geode::client::Pool::getMaxConnections | ( | ) | const |
Gets the maximum connections for this pool.
int apache::geode::client::Pool::getMinConnections | ( | ) | const |
Gets the minimum connections for this pool.
bool apache::geode::client::Pool::getMultiuserAuthentication | ( | ) | const |
Returns true
if multiuser authentication is enabled on this pool.
|
pure virtual |
int apache::geode::client::Pool::getPendingEventCount | ( | ) | const |
Returns the approximate number of pending subscription events maintained at server for this durable client pool at the time it (re)connected to the server.
Server would start dispatching these events to this durable client pool when it receives Cache#readyForEvents()
from it.
Durable clients can call this method on reconnect to assess the amount of 'stale' data i.e. events accumulated at server while this client was away and, importantly, before calling Cache#readyForEvents()
.
Any number of invocations of this method during a single session will return the same value.
It may return a zero value if there are no events pending at server for this client pool. A negative value returned tells us that no queue was available at server for this client pool.
A value -1 indicates that this client pool reconnected to server after its 'durable-client-timeout' period elapsed and hence its subscription queue at server was removed, possibly causing data loss.
A value -2 indicates that this client pool connected to server for the first time.
IllegalStateException | If called by a non-durable client or if invoked any time after invocation of Cache#readyForEvents() . |
std::chrono::milliseconds apache::geode::client::Pool::getPingInterval | ( | ) | const |
Gets the ping interval for this pool.
bool apache::geode::client::Pool::getPRSingleHopEnabled | ( | ) | const |
Returns true if single-hop optimization is enabled on this pool.
|
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.
std::chrono::milliseconds apache::geode::client::Pool::getReadTimeout | ( | ) | const |
Returns the read timeout of this pool.
int apache::geode::client::Pool::getRetryAttempts | ( | ) | const |
Gets the retry attempts for this pool.
const std::string & apache::geode::client::Pool::getServerGroup | ( | ) | const |
Returns the server group of this pool.
|
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
.
const std::string & apache::geode::client::Pool::getSniProxyHost | ( | ) | const |
Gets the host name of the SniProxy.
uint16_t apache::geode::client::Pool::getSniProxyPort | ( | ) | const |
Gets the port of the SniProxy.
int apache::geode::client::Pool::getSocketBufferSize | ( | ) | const |
Returns the socket buffer size of this pool.
std::chrono::milliseconds apache::geode::client::Pool::getStatisticInterval | ( | ) | const |
Gets the statistic interval for this pool.
std::chrono::milliseconds apache::geode::client::Pool::getSubscriptionAckInterval | ( | ) | const |
Returns the subscription ack interval of this pool.
bool apache::geode::client::Pool::getSubscriptionEnabled | ( | ) | const |
Returns the true if a server-to-client subscriptions are enabled on this pool.
std::chrono::milliseconds apache::geode::client::Pool::getSubscriptionMessageTrackingTimeout | ( | ) | const |
Returns the subscription message tracking timeout of this pool.
int apache::geode::client::Pool::getSubscriptionRedundancy | ( | ) | const |
Returns the subscription redundancy level of this pool.
bool apache::geode::client::Pool::getThreadLocalConnections | ( | ) | const |
Returns true
if thread local connections are enabled on this pool.
std::chrono::milliseconds apache::geode::client::Pool::getUpdateLocatorListInterval | ( | ) | const |
Gets the update locator list interval for this pool.
|
pure virtual |
Indicates whether this Pool has been destroyed.
|
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.