VMware Tanzu GemFire Native .NET Reference 10.2.7
|
This interface provides for the configuration and creation of instances of Pool. More...
#include <PoolFactory.hpp>
Public Member Functions | |
PoolFactory ^ | AddLocator (String^ host, Int32 port) |
Add a locator, given its host and port, to this factory. More... | |
PoolFactory ^ | AddServer (String^ host, Int32 port) |
Add a server, given its host and port, to this factory. More... | |
Pool ^ | Create (String^ name) |
Create a new Pool for connecting a client to a set of Geode Cache Servers. More... | |
PoolFactory ^ | Reset () |
Resets the configuration of this factory to its defaults. More... | |
PoolFactory ^ | SetFreeConnectionTimeout (TimeSpan connectionTimeout) |
Sets the free connection timeout for this pool. More... | |
PoolFactory ^ | SetIdleTimeout (TimeSpan idleTimeout) |
Set the amount of time a connection can be idle before expiring the connection. More... | |
PoolFactory ^ | SetLoadConditioningInterval (TimeSpan loadConditioningInterval) |
Sets the load conditioning interval for this pool. More... | |
PoolFactory ^ | SetMaxConnections (Int32 maxConnections) |
Set the max number of client to server connections that the pool will create. More... | |
PoolFactory ^ | SetMinConnections (Int32 minConnections) |
Set the minimum number of connections to keep available at all times. More... | |
PoolFactory ^ | SetMultiuserAuthentication (bool multiuserAuthentication) |
Sets whether pool is in multiuser mode If its in multiuser mode then app needs to get instance of cache from pool.getCache("creds"), to do the operations on cache. More... | |
PoolFactory ^ | SetPingInterval (TimeSpan pingInterval) |
Set how often to ping servers to verify that they are still alive. More... | |
PoolFactory ^ | SetPRSingleHopEnabled (Boolean enabled) |
By default SetPRSingleHopEnabled is true. More... | |
PoolFactory ^ | SetReadTimeout (TimeSpan timeout) |
Sets the time to wait for a response from a server before timing out the operation and trying another server (if any are available). More... | |
PoolFactory ^ | SetRetryAttempts (Int32 retryAttempts) |
Set the number of times to retry a request after timeout/exception. More... | |
PoolFactory ^ | SetServerGroup (String^ group) |
Configures the group that all servers this pool connects to must belong to. More... | |
PoolFactory ^ | SetSniProxy (String^ hostname, Int32 port) |
Set proxy info for SNI connection. More... | |
PoolFactory ^ | SetSocketBufferSize (Int32 bufferSize) |
Sets the socket buffer size for each connection made in this pool. More... | |
PoolFactory ^ | SetStatisticInterval (TimeSpan statisticInterval) |
Set how often to send client statistics to the server. More... | |
PoolFactory ^ | SetSubscriptionAckInterval (TimeSpan ackInterval) |
Sets the is the interval in milliseconds to wait before sending acknowledgements to the bridge server for events received from the server subscriptions. More... | |
PoolFactory ^ | SetSubscriptionEnabled (Boolean enabled) |
Enable subscriptions. More... | |
PoolFactory ^ | SetSubscriptionMessageTrackingTimeout (TimeSpan messageTrackingTimeout) |
Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server. More... | |
PoolFactory ^ | SetSubscriptionRedundancy (Int32 redundancy) |
Sets the redundancy level for this pools server-to-client subscriptions. More... | |
PoolFactory ^ | SetThreadLocalConnections (Boolean enabled) |
Enable ThreadLocalConnection. More... | |
PoolFactory ^ | SetUpdateLocatorListInterval (TimeSpan updateLocatorListInterval) |
Set how often to update locator list from locator More... | |
This interface provides for the configuration and creation of instances of Pool.
PoolFactory ^ Apache::Geode::Client::PoolFactory::AddLocator | ( | String^ | host, |
Int32 | port | ||
) |
Add a locator, given its host and port, to this factory.
The locator must be a server locator and will be used to discover other running bridge servers and locators.
host the host name or ip address that the locator is listening on.
port the port that the locator is listening on
throws IllegalArgumentException if host is an unknown host or if port is outside the valid range of [1..65535] inclusive.
throws IllegalStateException if a locator has already been added to this factory.
PoolFactory ^ Apache::Geode::Client::PoolFactory::AddServer | ( | String^ | host, |
Int32 | port | ||
) |
Add a server, given its host and port, to this factory.
The server must be a bridge server and this client will directly connect to without consulting a server locator.
host the host name or ip address that the server is listening on.
port the port that the server is listening on
throws IllegalArgumentException if host is an unknown host or if port is outside the valid range of [1..65535] inclusive.
throws IllegalStateException if a server has already been added to this factory.
Pool ^ Apache::Geode::Client::PoolFactory::Create | ( | String^ | name | ) |
Create a new Pool for connecting a client to a set of Geode Cache Servers.
using this factory's settings for attributes.
name the name of the pool, used when connecting regions to it
throws IllegalStateException if a pool with name already exists throws IllegalStateException if a locator or server has not been added.
PoolFactory ^ Apache::Geode::Client::PoolFactory::Reset | ( | ) |
Resets the configuration of this factory to its defaults.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetFreeConnectionTimeout | ( | TimeSpan | connectionTimeout | ) |
Sets the free connection timeout for this pool.
If the pool has a max connections setting, operations will block if all of the connections are in use. The free connection timeout specifies how long those operations will block waiting for a free connection before receiving an AllConnectionsInUseException. If max connections is not set this setting has no effect.
connectionTimeout the connection timeout
IllegalArgumentException if connectionTimeout is less than or equal to 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetIdleTimeout | ( | TimeSpan | idleTimeout | ) |
Set the amount of time a connection can be idle before expiring the connection.
If the pool size is greater than the minimum specified, connections which have been idle for longer than the idleTimeout will be closed.
idleTimeout The amount of time that an idle connection should live before expiring. 0 indicates that connections should never expire.
throws IllegalArgumentException if idleTimout is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetLoadConditioningInterval | ( | TimeSpan | loadConditioningInterval | ) |
Sets the load conditioning interval for this pool.
This interval controls how frequently the pool will check to see if a connection to a given server should be moved to a different server to improve the load balance.
loadConditioningInterval the connection lifetime A value of 0 disables load conditioning.
throws IllegalArgumentException if connectionLifetime is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetMaxConnections | ( | Int32 | maxConnections | ) |
Set the max number of client to server connections that the pool will create.
If all of the connections are in use, an operation requiring a client to server connection will block until a connection is available. see setFreeConnectionTimeout(int)
maxConnections the maximum number of connections in the pool. -1 indicates that there is no maximum number of connections.
throws IllegalArgumentException if maxConnections is less than minConnections.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetMinConnections | ( | Int32 | minConnections | ) |
Set the minimum number of connections to keep available at all times.
When the pool is created, it will create this many connections. If 0 then connections will not be made until an actual operation is done that requires client-to-server communication.
minConnections the initial number of connections this pool will create.
throws IllegalArgumentException if minConnections is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetMultiuserAuthentication | ( | bool | multiuserAuthentication | ) |
Sets whether pool is in multiuser mode If its in multiuser mode then app needs to get instance of cache from pool.getCache("creds"), to do the operations on cache.
multiuserAuthentication should be true/false. Default value is false;
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetPingInterval | ( | TimeSpan | pingInterval | ) |
Set how often to ping servers to verify that they are still alive.
Each server will be sent a ping every pingInterval if there has not been any other communication with the server. These pings are used by the server to monitor the health of the client. Make sure that the pingInterval is less than the maximum time between pings allowed by the bridge server. see in CacheServer: setMaximumTimeBetweenPings(int)
pingInterval The amount of time between pings.
throws IllegalArgumentException if pingInterval is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetPRSingleHopEnabled | ( | Boolean | enabled | ) |
By default SetPRSingleHopEnabled is true.
The client is aware of the locations of partitions on servers hosting partitioned regions. Using this information, the client routes the client cache operations directly to the server which is hosting the required partition for the cache operation. If SetPRSingleHopEnabled is false the client can do an extra hop on servers to go to the required partition for that cache operation. The SetPRSingleHopEnabled avoids extra hops only for following cache operations : put, get & destroy operations.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetReadTimeout | ( | TimeSpan | timeout | ) |
Sets the time to wait for a response from a server before timing out the operation and trying another server (if any are available).
timeout to wait for a response from a server
throws IllegalArgumentException if timeout is less than or equal to 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetRetryAttempts | ( | Int32 | retryAttempts | ) |
Set the number of times to retry a request after timeout/exception.
retryAttempts The number of times to retry a request after timeout/exception. -1 indicates that a request should be tried against every available server before failing.
throws IllegalArgumentException if idleTimout is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetServerGroup | ( | String^ | group | ) |
Configures the group that all servers this pool connects to must belong to.
group the server group that this pool will connect to. If null or "" then all servers will be connected to.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSniProxy | ( | String^ | hostname, |
Int32 | port | ||
) |
Set proxy info for SNI connection.
Used for connecting via SNI proxy.
host the host name or ip address that the server is listening on.
port the port that the server is listening on.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSocketBufferSize | ( | Int32 | bufferSize | ) |
Sets the socket buffer size for each connection made in this pool.
Large messages can be received and sent faster when this buffer is larger. Larger buffers also optimize the rate at which servers can send events for client subscriptions.
bufferSize the size of the socket buffers used for reading and writing on each connection in this pool.
throws IllegalArgumentException if bufferSize is less than or equal to 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetStatisticInterval | ( | TimeSpan | statisticInterval | ) |
Set how often to send client statistics to the server.
Doing this allows gfmon to monitor clients. A value of 0 disables the sending of client statistics to the server.
statisticInterval The amount of time between sends of client statistics to the server.
throws IllegalArgumentException if statisticInterval is less than 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSubscriptionAckInterval | ( | TimeSpan | ackInterval | ) |
Sets the is the interval in milliseconds to wait before sending acknowledgements to the bridge server for events received from the server subscriptions.
ackInterval wait before sending event acknowledgements.
throws IllegalArgumentException if ackInterval is less than or equal to 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSubscriptionEnabled | ( | Boolean | enabled | ) |
Enable subscriptions.
If set to true then the created pool will have server-to-client subscriptions enabled. If set to false then all Subscription* attributes are ignored at create time.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSubscriptionMessageTrackingTimeout | ( | TimeSpan | messageTrackingTimeout | ) |
Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server.
It's used to minimize duplicate events. Entries that have not been modified for this amount of time are expired from the list.
messageTrackingTimeout
throws IllegalArgumentException if messageTrackingTimeout is less than or equal to 0.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetSubscriptionRedundancy | ( | Int32 | redundancy | ) |
Sets the redundancy level for this pools server-to-client subscriptions.
If 0 then no redundant copies will be kept on the servers. Otherwise an effort will be made to maintain the requested number of copies of the server-to-client subscriptions. At most one copy per server will be made up to the requested level.
redundancy the number of redundant servers for this client's subscriptions.
throws IllegalArgumentException if redundancyLevel is less than -1.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetThreadLocalConnections | ( | Boolean | enabled | ) |
Enable ThreadLocalConnection.
Sets the thread local connections policy for this pool. If true then any time a thread goes to use a connection from this pool it will check a thread local cache and see if it already has a connection in it. If so it will use it. If not it will get one from this pool and cache it in the thread local. This gets rid of thread contention for the connections but increases the number of connections the servers see. If false then connections are returned to the pool as soon as the operation being done with the connection completes. This allows connections to be shared among multiple threads keeping the number of connections down.
PoolFactory ^ Apache::Geode::Client::PoolFactory::SetUpdateLocatorListInterval | ( | TimeSpan | updateLocatorListInterval | ) |
Set how often to update locator list from locator
updateLocatorListInterval The amount of time between updating locator list. If its set to 0 then client will not update the locator list.
CacheFactory