Package io.tarantool.driver.api.metadata
Interface TarantoolMetadataOperations
-
- All Known Implementing Classes:
TarantoolMetadata
public interface TarantoolMetadataOperationsTarantool metadata operations interface (get space by name, get index by name, etc.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<TarantoolIndexMetadata>getIndexById(int spaceId, int indexId)Get metadata for index from the specified space by index IDOptional<TarantoolIndexMetadata>getIndexById(String spaceName, int indexId)Get metadata for index from the specified space by index IDOptional<TarantoolIndexMetadata>getIndexByName(int spaceId, String indexName)Get metadata for index from the specified space by nameOptional<TarantoolIndexMetadata>getIndexByName(String spaceName, String indexName)Get metadata for index from the specified space by nameOptional<TarantoolSpaceMetadata>getSpaceById(int spaceId)Get metadata for the space specified by idOptional<TarantoolSpaceMetadata>getSpaceByName(String spaceName)Get metadata for the space specified by nameOptional<Map<String,TarantoolIndexMetadata>>getSpaceIndexes(int spaceId)Get metadata for all indexes for space specified by idOptional<Map<String,TarantoolIndexMetadata>>getSpaceIndexes(String spaceName)Get metadata for all indexes for space specified by nameCompletableFuture<Void>refresh()Refresh metadata cachevoidscheduleRefresh()Initiates metadata refresh cycle
-
-
-
Method Detail
-
scheduleRefresh
void scheduleRefresh()
Initiates metadata refresh cycle
-
refresh
CompletableFuture<Void> refresh() throws TarantoolClientException
Refresh metadata cache- Returns:
- future with empty value for tracking the refresh progress
- Throws:
TarantoolClientException- if fetching data failed with error
-
getSpaceByName
Optional<TarantoolSpaceMetadata> getSpaceByName(String spaceName)
Get metadata for the space specified by name- Parameters:
spaceName- the space name, must not be null or empty- Returns:
- nullable space metadata wrapped in
Optional
-
getIndexByName
Optional<TarantoolIndexMetadata> getIndexByName(int spaceId, String indexName)
Get metadata for index from the specified space by name- Parameters:
spaceId- the space ID, must be greater than 0indexName- index name, must not be null or empty- Returns:
- nullable index metadata wrapped in
Optional
-
getIndexByName
Optional<TarantoolIndexMetadata> getIndexByName(String spaceName, String indexName)
Get metadata for index from the specified space by name- Parameters:
spaceName- the space name, must not be null or emptyindexName- index name, must not be null or empty- Returns:
- nullable index metadata wrapped in
Optional
-
getIndexById
Optional<TarantoolIndexMetadata> getIndexById(String spaceName, int indexId)
Get metadata for index from the specified space by index ID- Parameters:
spaceName- the space name, must not be null or emptyindexId- index ID, must not be must be greater or equal than 0- Returns:
- nullable index metadata wrapped in
Optional
-
getIndexById
Optional<TarantoolIndexMetadata> getIndexById(int spaceId, int indexId)
Get metadata for index from the specified space by index ID- Parameters:
spaceId- the space ID, must be greater than 0indexId- index ID, must not be must be greater or equal than 0- Returns:
- nullable index metadata wrapped in
Optional
-
getSpaceById
Optional<TarantoolSpaceMetadata> getSpaceById(int spaceId)
Get metadata for the space specified by id- Parameters:
spaceId- the space ID, must be greater than 0- Returns:
- nullable space metadata wrapped in
Optional
-
getSpaceIndexes
Optional<Map<String,TarantoolIndexMetadata>> getSpaceIndexes(int spaceId)
Get metadata for all indexes for space specified by id- Parameters:
spaceId- the space ID, must be greater than 0- Returns:
- nullable map of index names to index metadata wrapped in
Optional
-
-