Class HectorCassandraClientConfigurer

java.lang.Object
org.openspaces.persistency.cassandra.HectorCassandraClientConfigurer

public class HectorCassandraClientConfigurer extends Object
A configurer for creating HectorCassandraClient instances.
Since:
9.1.1
Author:
Dan Kilman
  • Field Details

  • Constructor Details

    • HectorCassandraClientConfigurer

      public HectorCassandraClientConfigurer()
  • Method Details

    • hosts

      Cassandra hosts
      Parameters:
      hosts - Command delimited list of Cassandra hosts (hostnames or ipaddresses)
      Returns:
      this instance.
    • port

      Sets the port matching the host name of the Cassandra cluster to connect to.
      Parameters:
      port - The cassandra port. Set null to use the default port number CassandraHost.DEFAULT_PORT
      Returns:
      this instance.
    • keyspaceName

      public HectorCassandraClientConfigurer keyspaceName(String keyspaceName)
      Sets the keyspaceName of the keyspace to connect to.
      Parameters:
      keyspaceName - The keyspace name.
      Returns:
      this instance.
    • clusterName

      public HectorCassandraClientConfigurer clusterName(String clusterName)
      (Optional) Sets the cluster name used internally by the hector library. Use this if you plan to connect to more than one cassandra cluster in the same JVM.
      Parameters:
      clusterName - The cluster 'tag' name.
      Returns:
      this instance.
    • columnFamilyGcGraceSeconds

      public HectorCassandraClientConfigurer columnFamilyGcGraceSeconds(Integer columnFamilyGcGraceSeconds)
      (Optional) Sets the gcGraceSeconds that will be used when creating column families for types. If null will use default value
      Returns:
      this instance.
    • readConsistencyLevel

      public HectorCassandraClientConfigurer readConsistencyLevel(CassandraConsistencyLevel readConsistencyLevel)
      (Optional)
      Parameters:
      readConsistencyLevel - The consistencly level used for read by id operations. (default: CassandraConsistencyLevel.QUORUM)
      Returns:
      this instance.
    • writeConsistencyLevel

      public HectorCassandraClientConfigurer writeConsistencyLevel(CassandraConsistencyLevel writeConsistencyLevel)
      (Optional)
      Parameters:
      writeConsistencyLevel - The consistencly level used for write/update/remove operations. (default: CassandraConsistencyLevel.QUORUM)
      Returns:
      HectorCassandraClientConfigurer
    • create

      public HectorCassandraClient create()
      Returns:
      An instance of HectorCassandraClient matching this configurer configuration.