Class TableIndexDescriptor<DEF extends TableIndexDefinition<?>>
java.lang.Object
com.datastax.astra.client.tables.definition.indexes.TableIndexDescriptor<DEF>
- Type Parameters:
DEF
- the type of index definition.
- Direct Known Subclasses:
TableRegularIndexDescriptor
,TableTextIndexDescriptor
,TableVectorIndexDescriptor
Represents a descriptor for a table index, including the table's name and associated index options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Function
<DEF, ? extends TableIndexDescriptor<DEF>> Function to create a new instance of the subclass.protected DEF
The options defining the table's index characteristics.protected String
The type of index (vector, regular)protected String
The name of the table. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TableIndexDescriptor
(Function<DEF, ? extends TableIndexDescriptor<DEF>> constructor) Constructor that accepts a function for instance creation. -
Method Summary
Modifier and TypeMethodDescriptiondefinition
(DEF def) Sets the index definition for the table.protected TableIndexDescriptor
<DEF> mapImpl
(Consumer<TableIndexDescriptor<DEF>> updater) Generic method to create a new instance with modified properties.Sets the name of the table.toString()
Converts the object to a string using theRowSerializer
.
-
Field Details
-
name
The name of the table. -
indexType
The type of index (vector, regular) -
definition
The options defining the table's index characteristics. -
constructor
protected final Function<DEF extends TableIndexDefinition<?>,? extends TableIndexDescriptor<DEF extends TableIndexDefinition<?>>> constructorFunction to create a new instance of the subclass.
-
-
Constructor Details
-
TableIndexDescriptor
Constructor that accepts a function for instance creation.- Parameters:
constructor
- the function to create a new instance of the subclass.
-
-
Method Details
-
mapImpl
Generic method to create a new instance with modified properties.- Parameters:
updater
- Consumer function to modify the new instance.- Returns:
- A new modified instance.
-
name
Sets the name of the table.- Parameters:
name
- the name of the table.- Returns:
- a new instance with the updated table name.
-
definition
Sets the index definition for the table.- Parameters:
def
- theTableIndexDefinition
defining the index options for the table.- Returns:
- a new instance with the updated definition.
-
toString
Converts the object to a string using theRowSerializer
.
-