io.vertx.cassandra

## Class CassandraClientOptions

- java.lang.Object
- - io.vertx.cassandra.CassandraClientOptions

-     public class CassandraClientOptions
      extends Object

  Eclipse Vert.x Cassandra client options.
  Author:
    Pavel Drankou, Thomas Segismont

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_HOST` Default host for connecting with Cassandra service.
    `static int` | `DEFAULT_PORT` Default port for connecting with Cassandra service.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CassandraClientOptions()` Default constructor.
    `CassandraClientOptions(CassandraClientOptions other)` Copy constructor.
    `CassandraClientOptions(com.datastax.oss.driver.api.core.CqlSessionBuilder builder)` Constructor using an existing `CqlSessionBuilder` instance.
    `CassandraClientOptions(JsonObject json)` Constructor to create options from JSON.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CassandraClientOptions` | `addContactPoint(InetSocketAddress address)` Adds a contact point to use for the initial connection to the cluster
    `CassandraClientOptions` | `addContactPoint(String host, int port)` Adds a contact point to use for the initial connection to the cluster
    `com.datastax.oss.driver.api.core.CqlSessionBuilder` | `dataStaxClusterBuilder()`
    `String` | `getKeyspace()`
    `CassandraClientOptions` | `setKeyspace(String keyspace)` Set the keyspace to use when creating the Cassandra session.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      Default port for connecting with Cassandra service.
      See Also:
        Constant Field Values

    - #### DEFAULT_HOST

          public static final String DEFAULT_HOST

      Default host for connecting with Cassandra service.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CassandraClientOptions

          public CassandraClientOptions()

      Default constructor.

    - #### CassandraClientOptions

          public CassandraClientOptions(CassandraClientOptions other)

      Copy constructor.
      Parameters:
        `other` - The other client to copy from.

    - #### CassandraClientOptions

          public CassandraClientOptions(com.datastax.oss.driver.api.core.CqlSessionBuilder builder)

      Constructor using an existing `CqlSessionBuilder` instance.

    - #### CassandraClientOptions

          public CassandraClientOptions(JsonObject json)

      Constructor to create options from JSON.
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Returns:
        a JSON representation of these options

    - #### addContactPoint

          public CassandraClientOptions addContactPoint(InetSocketAddress address)

      Adds a contact point to use for the initial connection to the cluster
      Parameters:
        `address` - the address
      Returns:
        a reference to this, so the API can be used fluently

    - #### addContactPoint

          public CassandraClientOptions addContactPoint(String host,
                                                        int port)

      Adds a contact point to use for the initial connection to the cluster
      Parameters:
        `host` - the address
        `port` - the port
      Returns:
        a reference to this, so the API can be used fluently

    - #### dataStaxClusterBuilder

          public com.datastax.oss.driver.api.core.CqlSessionBuilder dataStaxClusterBuilder()

      Returns:
        a cluster builder, which will be used by the client

    - #### getKeyspace

          public String getKeyspace()

      Returns:
        the keyspace to use when creating the Cassandra session

    - #### setKeyspace

          public CassandraClientOptions setKeyspace(String keyspace)

      Set the keyspace to use when creating the Cassandra session. Defaults to `null`.
      Parameters:
        `keyspace` - the keyspace to use when creating the Cassandra session
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2020 Eclipse. All rights reserved.