Interface IgnitePageStoreManager

    • Method Detail

      • beginRecover

        void beginRecover()
        Invoked before starting checkpoint recover.
      • shutdownForCacheGroup

        void shutdownForCacheGroup​(CacheGroupContext grp,
                                   boolean destroy)
                            throws IgniteCheckedException
        Callback called when a cache is stopping. After this callback is invoked, no data associated with the given cache will be stored on disk.
        Parameters:
        grp - Cache group being stopped.
        destroy - Flag indicating if the cache is being destroyed and data should be cleaned.
        Throws:
        IgniteCheckedException - If failed to handle cache destroy callback.
      • truncate

        void truncate​(int grpId,
                      int partId,
                      int tag)
               throws IgniteCheckedException
        Callback called when a partition for the given cache is evicted from the local node. After this callback is invoked, no data associated with the partition will be stored on disk.
        Parameters:
        grpId - Cache group ID of the evicted partition.
        partId - Partition ID.
        tag - Partition tag (growing 1-based partition file version).
        Throws:
        IgniteCheckedException - If failed to handle partition destroy callback.
      • exists

        boolean exists​(int grpId,
                       int partId)
                throws IgniteCheckedException
        Checks if partition store exists.
        Parameters:
        grpId - Cache group ID.
        partId - Partition ID.
        Returns:
        True if partition store exists.
        Throws:
        IgniteCheckedException - If failed.
      • pageOffset

        long pageOffset​(int grpId,
                        long pageId)
                 throws IgniteCheckedException
        Gets page offset within the page store file.
        Parameters:
        grpId - Cache group ID.
        pageId - Page ID.
        Returns:
        Page offset.
        Throws:
        IgniteCheckedException - If failed.
      • sync

        void sync​(int grpId,
                  int partId)
           throws IgniteCheckedException
        Makes sure that all previous writes to the store has been written to disk.
        Parameters:
        grpId - Cache group ID to sync.
        partId - Partition ID to sync.
        Throws:
        IgniteCheckedException - If IO error occurred while running sync.
      • pages

        int pages​(int grpId,
                  int partId)
           throws IgniteCheckedException
        Gets total number of allocated pages for the given space.
        Parameters:
        grpId - Cache group ID.
        partId - Partition ID.
        Returns:
        Number of allocated pages.
        Throws:
        IgniteCheckedException - If failed.
      • hasIndexStore

        boolean hasIndexStore​(int grpId)
        Parameters:
        grpId - Cache group ID.
        Returns:
        True if index store for given cache group existed before node started.
      • pagesAllocated

        long pagesAllocated​(int grpId)
        Calculates number of pages currently allocated for given cache group.
        Parameters:
        grpId - cache group id.
        Returns:
        number of pages.
      • cleanupPageStoreIfMatch

        void cleanupPageStoreIfMatch​(Predicate<Integer> cacheGrpPred,
                                     boolean cleanFiles)
        Cleanup cache store whether it matches the provided predicate and if matched store was previously initizlized.
        Parameters:
        cacheGrpPred - Predicate to match by id cache group stores to clean.
        cleanFiles - True to delete all persisted files related to particular store.