Interface IndexStorage
-
- All Known Implementing Classes:
IndexStorageImpl
public interface IndexStorageMeta store.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RootPageallocateCacheIndex(Integer cacheId, String idxName, int segment)Allocate page for cache index.RootPageallocateIndex(String idxName)Get or allocate initial page for an index.voiddestroy()Destroy this meta store.@Nullable RootPagedropCacheIndex(Integer cacheId, String idxName, int segment)Deallocate index page and remove from tree.@Nullable RootPagedropIndex(String idxName)Deallocate index page and remove from tree.@Nullable RootPagefindCacheIndex(Integer cacheId, String idxName, int segment)Find index root.Collection<String>getIndexNames()booleannameIsAssosiatedWithCache(String idxName, int cacheId)@Nullable RootPagerenameCacheIndex(Integer cacheId, String oldIdxName, String newIdxName, int segment)Renaming the root page of the index tree.
-
-
-
Method Detail
-
allocateCacheIndex
RootPage allocateCacheIndex(Integer cacheId, String idxName, int segment) throws IgniteCheckedException
Allocate page for cache index. Index name will be masked if needed.- Parameters:
cacheId- Cache ID.idxName- Index name.segment- Segment.- Returns:
- Root page.
- Throws:
IgniteCheckedException- If failed.
-
allocateIndex
RootPage allocateIndex(String idxName) throws IgniteCheckedException
Get or allocate initial page for an index.- Parameters:
idxName- Index name.- Returns:
RootPagethat keeps pageId, allocated flag that shows whether the page was newly allocated, and rootId that is counter which increments each time new page allocated.- Throws:
IgniteCheckedException- If failed.
-
findCacheIndex
@Nullable @Nullable RootPage findCacheIndex(Integer cacheId, String idxName, int segment) throws IgniteCheckedException
Find index root.- Parameters:
cacheId- Cache ID.idxName- Index name.segment- Segment.- Returns:
- Root ID or null if no page was found.
- Throws:
IgniteCheckedException- If failed.
-
dropCacheIndex
@Nullable @Nullable RootPage dropCacheIndex(Integer cacheId, String idxName, int segment) throws IgniteCheckedException
Deallocate index page and remove from tree.- Parameters:
cacheId- Cache ID.idxName- Index name.segment- Segment number.- Returns:
- Root ID or
nullif no page was removed. - Throws:
IgniteCheckedException- If failed.
-
dropIndex
@Nullable @Nullable RootPage dropIndex(String idxName) throws IgniteCheckedException
Deallocate index page and remove from tree.- Parameters:
idxName- Index name.- Returns:
- Root ID or
nullif no page was removed. - Throws:
IgniteCheckedException- If failed.
-
renameCacheIndex
@Nullable @Nullable RootPage renameCacheIndex(Integer cacheId, String oldIdxName, String newIdxName, int segment) throws IgniteCheckedException
Renaming the root page of the index tree.- Parameters:
cacheId- Cache id.oldIdxName- Old name of the index tree.newIdxName- New name of the index tree.segment- Segment index.- Returns:
- Renamed root page of the index tree.
- Throws:
IgniteCheckedException- If failed.
-
destroy
void destroy() throws IgniteCheckedExceptionDestroy this meta store.- Throws:
IgniteCheckedException- If failed.
-
getIndexNames
Collection<String> getIndexNames() throws IgniteCheckedException
- Returns:
- Index names of all indexes which this storage keeps.
- Throws:
IgniteCheckedException- If failed.
-
nameIsAssosiatedWithCache
boolean nameIsAssosiatedWithCache(String idxName, int cacheId)
- Parameters:
idxName- Index name to check.cacheId- Cache id to check.- Returns:
- True if the given idxName could be assosiated with the given cacheId (existing is not checked).
-
-