com.basho.riak.client.raw.config
Class ClusterConfig<T extends Configuration>
java.lang.Object
com.basho.riak.client.raw.config.ClusterConfig<T>
- Type Parameters:
T - concrete Configuration type
- All Implemented Interfaces:
- Configuration
- Direct Known Subclasses:
- HTTPClusterConfig, PBClusterConfig
public abstract class ClusterConfig<T extends Configuration>
- extends Object
- implements Configuration
Abstract parent Configuration for a "cluster" of clients.
Holds a collection of Configurations, one for each node in a cluster.
Currently only supports homogeneous clusters.
- Author:
- russell
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNLIMITED_CONNECTIONS
public static final int UNLIMITED_CONNECTIONS
- Constant for specifying unlimited maximum connection
- See Also:
- Constant Field Values
ClusterConfig
public ClusterConfig(int totalMaximumConnections)
- Parameters:
totalMaximumConnections - the upper limit of connections for all nodes in the config
NOTE: set individual client limits in each client config
getTotalMaximumConnections
public int getTotalMaximumConnections()
- Returns:
- the totalMaximumConnections
addClient
public ClusterConfig<T> addClient(T clientConfig)
- Add a new client config to the collection of client in the cluster config
- Parameters:
nodeConfig - a node config to add
- Returns:
- this, updated
- See Also:
HTTPClientConfig,
PBClientConfig
getClients
public List<T> getClients()
- Returns:
- an *unmodifiable* view of the client
Configurations in
the cluster configuration
Copyright © 2011. All Rights Reserved.