Class AbstractCassandraTable<RECORD>

java.lang.Object
com.dtsx.astra.sdk.cassio.AbstractCassandraTable<RECORD>
Type Parameters:
RECORD - object in use with Cassandra
Direct Known Subclasses:
ClusteredMetadataVectorTable, MetadataVectorTable

public abstract class AbstractCassandraTable<RECORD> extends Object
Abstract class for table management at Cassandra level.
  • Field Details Link icon

    • SAI_INDEX_CLASSNAME Link icon

      public static final String SAI_INDEX_CLASSNAME
      Class needed to create a SAI Index.
      See Also:
    • PARTITION_ID Link icon

      public static final String PARTITION_ID
      Table column names.
      See Also:
    • ROW_ID Link icon

      public static final String ROW_ID
      Table column names.
      See Also:
    • ATTRIBUTES_BLOB Link icon

      public static final String ATTRIBUTES_BLOB
      Table column names.
      See Also:
    • BODY_BLOB Link icon

      public static final String BODY_BLOB
      Table column names.
      See Also:
    • METADATA_S Link icon

      public static final String METADATA_S
      Table column names.
      See Also:
    • VECTOR Link icon

      public static final String VECTOR
      Table column names.
      See Also:
    • COLUMN_SIMILARITY Link icon

      public static final String COLUMN_SIMILARITY
      Table column names.
      See Also:
    • DEFAULT_RECORD_COUNT Link icon

      public static final int DEFAULT_RECORD_COUNT
      Default Number of item retrieved
      See Also:
    • cqlSession Link icon

      protected final com.datastax.oss.driver.api.core.CqlSession cqlSession
      Session to Cassandra.
    • keyspaceName Link icon

      protected final String keyspaceName
      Destination keyspace.
    • tableName Link icon

      protected final String tableName
      Destination table.
  • Constructor Details Link icon

    • AbstractCassandraTable Link icon

      public AbstractCassandraTable(com.datastax.oss.driver.api.core.CqlSession session, String keyspaceName, String tableName)
      Default cosntructor.
      Parameters:
      session - cassandra session
      keyspaceName - keyspace
      tableName - table Name
  • Method Details Link icon

    • create Link icon

      public abstract void create()
      Create table if not exist.
    • put Link icon

      public abstract void put(RECORD row)
      Upsert a row of the table.
      Parameters:
      row - current row
    • mapRow Link icon

      public abstract RECORD mapRow(com.datastax.oss.driver.api.core.cql.Row row)
      Should be table to map from a Cassandra row to a record.
      Parameters:
      row - current cassandra row
      Returns:
      current record
    • putAsync Link icon

      public CompletableFuture<Void> putAsync(RECORD inputRow)
      Insert a row asynchronously.
      Parameters:
      inputRow - current row
      Returns:
      output
    • delete Link icon

      public void delete()
      Delete the table.
    • clear Link icon

      public void clear()
      Empty a table
    • getCqlSession Link icon

      public com.datastax.oss.driver.api.core.CqlSession getCqlSession()
      Gets cqlSession
      Returns:
      value of cqlSession