Interface IndexStorage

  • All Known Implementing Classes:
    IndexStorageImpl

    public interface IndexStorage
    Meta store.
    • 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:
        RootPage that 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.
      • 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 null if 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.
      • 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).