Package io.tarantool.driver.api.metadata
Interface TarantoolIndexMetadata
-
public interface TarantoolIndexMetadata
Represents Tarantool index metadata (index ID, name, etc.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getIndexId()
Get index ID in the corresponding space on the Tarantool serverString
getIndexName()
Get index nameTarantoolIndexOptions
getIndexOptions()
Get index optionsOptional<Integer>
getIndexPartPositionByFieldPosition(int fieldPosition)
Get map of field positions to index parts positionsList<TarantoolIndexPartMetadata>
getIndexParts()
Get index partsMap<Integer,TarantoolIndexPartMetadata>
getIndexPartsByPosition()
Get index parts by field indexesTarantoolIndexType
getIndexType()
Get index typeint
getSpaceId()
Get ID of a space that this index is defined onboolean
isPrimary()
Returns true if this is a primary index, false otherwise.boolean
isUnique()
Returns true if this is a unique index, false otherwise.void
setIndexOptions(TarantoolIndexOptions indexOptions)
Set index optionsvoid
setIndexParts(List<TarantoolIndexPartMetadata> indexParts)
Set index partsvoid
setIndexType(TarantoolIndexType indexType)
Set index type
-
-
-
Method Detail
-
getSpaceId
int getSpaceId()
Get ID of a space that this index is defined on- Returns:
- a number
-
getIndexId
int getIndexId()
Get index ID in the corresponding space on the Tarantool server- Returns:
- a natural number
-
getIndexName
String getIndexName()
Get index name- Returns:
- a non-empty
String
-
getIndexType
TarantoolIndexType getIndexType()
Get index type- Returns:
- the index type
-
setIndexType
void setIndexType(TarantoolIndexType indexType)
Set index type- Parameters:
indexType
- a non-emptyTarantoolIndexType
-
getIndexOptions
TarantoolIndexOptions getIndexOptions()
Get index options- Returns:
- index options
-
setIndexOptions
void setIndexOptions(TarantoolIndexOptions indexOptions)
Set index options- Parameters:
indexOptions
- a not-emptyTarantoolIndexOptions
-
setIndexParts
void setIndexParts(List<TarantoolIndexPartMetadata> indexParts)
Set index parts- Parameters:
indexParts
- a not-empty list ofTarantoolIndexPartMetadata
-
getIndexParts
List<TarantoolIndexPartMetadata> getIndexParts()
Get index parts- Returns:
- a not-empty list of
TarantoolIndexPartMetadata
-
getIndexPartsByPosition
Map<Integer,TarantoolIndexPartMetadata> getIndexPartsByPosition()
Get index parts by field indexes- Returns:
- a not-empty map of index positions to
TarantoolIndexPartMetadata
-
getIndexPartPositionByFieldPosition
Optional<Integer> getIndexPartPositionByFieldPosition(int fieldPosition)
Get map of field positions to index parts positions- Parameters:
fieldPosition
- field position in tuple, starting from 0- Returns:
- field position
-
isPrimary
boolean isPrimary()
Returns true if this is a primary index, false otherwise.- Returns:
- true if this is a primary index, false otherwise.
-
isUnique
boolean isUnique()
Returns true if this is a unique index, false otherwise.- Returns:
- true if this is a unique index, false otherwise.
-
-