Class CassIO

java.lang.Object
com.dtsx.astra.sdk.cassio.CassIO

public class CassIO extends Object
Utility to work with CassIO and Astra
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.datastax.oss.driver.api.core.CqlSession
    Accessing the session.
    static com.datastax.oss.driver.api.core.CqlSession
    init(com.datastax.oss.driver.api.core.CqlSession cqlSession)
    Initialization from db is and region.
    static com.datastax.oss.driver.api.core.CqlSession
    init(String token, UUID dbId, String dbRegion)
    Initialization from db is and region.
    static com.datastax.oss.driver.api.core.CqlSession
    init(String token, UUID dbId, String dbRegion, String keyspace)
    Initialization from db is and region.
    static com.datastax.oss.driver.api.core.CqlSession
    init(String token, UUID dbId, String dbRegion, String keyspace, AstraEnvironment env)
    Initialization from db is and region.
    metadataVectorTable(String tableName, int vectorDimension)
    Create a new table to store vectors.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CassIO

      public CassIO()
      Default constructor.
  • Method Details

    • getCqlSession

      public static com.datastax.oss.driver.api.core.CqlSession getCqlSession()
      Accessing the session.
      Returns:
      the cassandra session
    • init

      public static com.datastax.oss.driver.api.core.CqlSession init(com.datastax.oss.driver.api.core.CqlSession cqlSession)
      Initialization from db is and region.
      Parameters:
      cqlSession - cassandra connection
      Returns:
      the cassandra session initialized
    • init

      public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion)
      Initialization from db is and region.
      Parameters:
      token - astra token
      dbId - database identifier.
      dbRegion - database region,
      Returns:
      the cassandra session initialized
    • init

      public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion, String keyspace)
      Initialization from db is and region.
      Parameters:
      token - astra token
      dbId - database identifier.
      dbRegion - database region,
      keyspace - destination keyspace
      Returns:
      the cassandra session initialized
    • init

      public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion, String keyspace, AstraEnvironment env)
      Initialization from db is and region.
      Parameters:
      token - astra token
      dbId - database identifier.
      dbRegion - database region,
      keyspace - destination keyspace
      env - destination environment
      Returns:
      the cassandra session initialized
    • metadataVectorTable

      public static MetadataVectorTable metadataVectorTable(String tableName, int vectorDimension)
      Create a new table to store vectors.
      Parameters:
      tableName - table name
      vectorDimension - vector dimension
      Returns:
      table to store vector