Package com.dtsx.astra.sdk.cassio
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
Abstract class for table management at Cassandra level.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTable column names.static final StringTable column names.static final StringTable column names.protected final com.datastax.oss.driver.api.core.CqlSessionSession to Cassandra.static final intDefault Number of item retrievedprotected final StringDestination keyspace.static final StringTable column names.static final StringTable column names.static final StringTable column names.static final StringClass needed to create a SAI Index.protected final StringDestination table.static final StringTable column names. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCassandraTable(com.datastax.oss.driver.api.core.CqlSession session, String keyspaceName, String tableName) Default cosntructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Empty a tableabstract voidcreate()Create table if not exist.voiddelete()Delete the table.com.datastax.oss.driver.api.core.CqlSessionGets cqlSessionabstract RECORDmapRow(com.datastax.oss.driver.api.core.cql.Row row) Should be table to map from a Cassandra row to a record.abstract voidUpsert a row of the table.Insert a row asynchronously.
-
Field Details
-
SAI_INDEX_CLASSNAME
Class needed to create a SAI Index.- See Also:
-
PARTITION_ID
Table column names.- See Also:
-
ROW_ID
Table column names.- See Also:
-
ATTRIBUTES_BLOB
Table column names.- See Also:
-
BODY_BLOB
Table column names.- See Also:
-
METADATA_S
Table column names.- See Also:
-
VECTOR
Table column names.- See Also:
-
COLUMN_SIMILARITY
Table column names.- See Also:
-
DEFAULT_RECORD_COUNT
public static final int DEFAULT_RECORD_COUNTDefault Number of item retrieved- See Also:
-
cqlSession
protected final com.datastax.oss.driver.api.core.CqlSession cqlSessionSession to Cassandra. -
keyspaceName
Destination keyspace. -
tableName
Destination table.
-
-
Constructor Details
-
Method Details
-
create
public abstract void create()Create table if not exist. -
put
Upsert a row of the table.- Parameters:
row- current row
-
mapRow
Should be table to map from a Cassandra row to a record.- Parameters:
row- current cassandra row- Returns:
- current record
-
putAsync
Insert a row asynchronously.- Parameters:
inputRow- current row- Returns:
- output
-
delete
public void delete()Delete the table. -
clear
public void clear()Empty a table -
getCqlSession
public com.datastax.oss.driver.api.core.CqlSession getCqlSession()Gets cqlSession- Returns:
- value of cqlSession
-