public static interface Cluster.Initializer
Cluster
instances.
If you want to create a new Cluster
instance programmatically,
then it is advised to use Cluster.Builder
which can be obtained from the
Cluster.builder()
method.
But it is also possible to implement a custom Initializer
that
retrieves initialization from a web-service or from a configuration file.
Modifier and Type | Method and Description |
---|---|
Configuration |
getConfiguration()
The configuration to use for the new cluster.
|
List<InetAddress> |
getContactPoints()
Returns the initial Cassandra hosts to connect to.
|
List<InetAddress> getContactPoints()
Cluster.Builder.addContactPoint(java.lang.String)
for more details on contact points.Configuration getConfiguration()
Note that some configuration can be modified after the cluster initialization but some others cannot. In particular, the ones that cannot be changed afterwards includes:
ProtocolOptions
).Policies
).Configuration
).Configuration
).Copyright © 2014. All Rights Reserved.