#include <gridclientconfiguration.hpp>
Classes | |
| class | Impl |
Public Types | |
| enum | { DFLT_TOP_REFRESH_FREQ = 5000, DFLT_THREAD_POOL_SIZE = 4, DFLT_MAX_CONN_IDLE_TIME = 30000 } |
Public Member Functions | |
| GridClientConfiguration () | |
| GridClientConfiguration (const GridClientConfiguration &other) | |
| GridClientConfiguration & | operator= (const GridClientConfiguration &rhs) |
| virtual | ~GridClientConfiguration () |
| bool | isEnableTopologyCache () const |
| void | enableTopologyCache (bool enable) |
| long | topologyRefreshFrequency () const |
| void | topologyRefreshFrequency (long frequency) |
| TGridClientLoadBalancerPtr | loadBalancer () const |
| void | loadBalancer (TGridClientLoadBalancerPtr balancer) |
| std::vector < GridClientSocketAddress > | servers () const |
| void | servers (const std::vector< GridClientSocketAddress > &servers) |
| GridClientProtocolConfiguration | protocolConfiguration () const |
| void | protocolConfiguration (const GridClientProtocolConfiguration &config) |
| size_t | threadPoolSize () const |
| void | threadPoolSize (size_t size) |
| std::vector < GridClientSocketAddress > | routers () const |
| void | routers (const std::vector< GridClientSocketAddress > &routers) |
| TGridClientRouterBalancerPtr | routerBalancer () const |
| void | routerBalancer (TGridClientRouterBalancerPtr routerBalancerPtr) |
| int64_t | maxConnectionIdleTime () const |
| void | maxConnectionIdleTime (int64_t time) |
| TGridClientTopologyListenerList | topologyListeners () const |
| void | topologyListeners (const TGridClientTopologyListenerList &topLsnrs) |
| std::vector < GridClientDataConfiguration > | dataConfiguration () const |
| void | dataConfiguration (const std::vector< GridClientDataConfiguration > &cfgs) |
Client configuration class.
| anonymous enum |
Default topology refresh frequency in milliseconds.
| GridClientConfiguration::GridClientConfiguration | ( | ) |
Default public constructor.
| GridClientConfiguration::GridClientConfiguration | ( | const GridClientConfiguration & | other | ) |
Copy constructor.
| other | Another instance of GridClientConfiguration. |
| GridClientConfiguration::~GridClientConfiguration | ( | ) | [virtual] |
Destructor.
| std::vector<GridClientDataConfiguration> GridClientConfiguration::dataConfiguration | ( | ) | const |
Gets the client configuration for caches.
| void GridClientConfiguration::dataConfiguration | ( | const std::vector< GridClientDataConfiguration > & | cfgs | ) |
Sets the client configuration for caches.
| cfgs | Client configuration for caches. |
| void GridClientConfiguration::enableTopologyCache | ( | bool | enable | ) |
Sets a new value for topologyCacheEnabled flag.
| bool GridClientConfiguration::isEnableTopologyCache | ( | ) | const |
Enables client to cache topology internally, so it does not have to be always refreshed. Topology cache will be automatically refreshed in the background every getTopologyRefreshFrequency() interval.
| TGridClientLoadBalancerPtr GridClientConfiguration::loadBalancer | ( | ) | const |
Default balancer to be used for the compute grid client. It can be overridden for different compute instances.
Default balancer to be used for computational client. It can be overridden for different compute instances.
| void GridClientConfiguration::loadBalancer | ( | TGridClientLoadBalancerPtr | balancer | ) |
Sets a new balancer.
| void GridClientConfiguration::maxConnectionIdleTime | ( | int64_t | time | ) |
Sets maximum amount of time that client connection can be idle before it is closed.
| time | Maximum idle time in milliseconds. |
| int64_t GridClientConfiguration::maxConnectionIdleTime | ( | ) | const |
Gets maximum amount of time that client connection can be idle before it is closed.
| GridClientConfiguration & GridClientConfiguration::operator= | ( | const GridClientConfiguration & | rhs | ) |
Assignment operator override.
| rhs | Right-hand side of the assignment operator. |
| void GridClientConfiguration::protocolConfiguration | ( | const GridClientProtocolConfiguration & | config | ) |
Sets a new value for a protocol configuration.
| GridClientProtocolConfiguration GridClientConfiguration::protocolConfiguration | ( | ) | const |
Returns configuration parameters used to establish the connection to the remote node.
@ return GridClientProtocolConfiguration - The class defines the main parameters used to establish the connection with the remote node.
| void GridClientConfiguration::routerBalancer | ( | TGridClientRouterBalancerPtr | routerBalancerPtr | ) |
Sets a router balancer implementation for this client configuration.
| routerBalancerPtr | A router balancer implementation. |
| TGridClientRouterBalancerPtr GridClientConfiguration::routerBalancer | ( | ) | const |
Returns a router balancer implementation for this client configuration.
| void GridClientConfiguration::routers | ( | const std::vector< GridClientSocketAddress > & | routers | ) |
Sets a new collection of routers to communicate with.
| routers | New routers list. |
| std::vector<GridClientSocketAddress> GridClientConfiguration::routers | ( | ) | const |
Collection of GridClientSocketAddress 'host:port' pairs representing routers used to establish initial connection to the grid. This configuration parameter will not be used and direct grid connection will be established if getServers() returns empty value.
| std::vector<GridClientSocketAddress> GridClientConfiguration::servers | ( | ) | const |
Collection of GridClientSocketAddress 'host:port' pairs representing remote grid servers used to establish initial connection to the grid. Once connection is established, GridGain will get a full view on grid topology and will be able to connect to any available remote node.
| void GridClientConfiguration::servers | ( | const std::vector< GridClientSocketAddress > & | servers | ) |
Sets a new collection of servers to communicate with.
| void GridClientConfiguration::threadPoolSize | ( | size_t | size | ) |
Sets the number of threads in the client thread pool, used to perform async operations.
| size_t GridClientConfiguration::threadPoolSize | ( | ) | const |
Returns a number of threads in the client thread pool, used to perform async operations.
| void GridClientConfiguration::topologyListeners | ( | const TGridClientTopologyListenerList & | topLsnrs | ) |
Sets initial list of topology listeners, that are added to the client before it starts.
After the client has started, the listener list can be managed with addTopologyListener() and removeToplogyListener() client methods.
| topLsnr | Toplogy listeners list to add to the client. |
| TGridClientTopologyListenerList GridClientConfiguration::topologyListeners | ( | ) | const |
Gets the initial toplogy listener list for the client.
| long GridClientConfiguration::topologyRefreshFrequency | ( | ) | const |
Returns topology refresh frequency.
Gets topology refresh frequency.
| void GridClientConfiguration::topologyRefreshFrequency | ( | long | frequency | ) |
Sets a new value for topology refresh frequency in milliseconds.
1.7.1