Class IndexBuildStatusStorage

    • Constructor Detail

      • IndexBuildStatusStorage

        public IndexBuildStatusStorage​(GridKernalContext ctx)
        Constructor.
        Parameters:
        ctx - Kernal context.
    • Method Detail

      • onCacheKernalStart

        public void onCacheKernalStart()
        Callback on start of GridCacheProcessor.
      • stop

        public void stop()
        Callback on kernel stop.
      • onStartRebuildIndexes

        public void onStartRebuildIndexes​(GridCacheContext cacheCtx,
                                          boolean recreate)
        Callback on the start of rebuilding cache indexes.

        Registers the start of rebuilding cache indexes, for persistent cache writes a entry to the MetaStorage so that if a failure occurs, the indexes are automatically rebuilt.

        Parameters:
        cacheCtx - Cache context.
        recreate - True if index.bin recreating, otherwise building a new index.
        See Also:
        onFinishRebuildIndexes(java.lang.String)
      • onStartBuildNewIndex

        public void onStartBuildNewIndex​(GridCacheContext cacheCtx)
        Callback on the start of building a new cache index.

        Registers the start of building a new cache index, for persistent cache writes a entry to the MetaStorage so that if a failure occurs, the indexes are automatically rebuilt.

        Parameters:
        cacheCtx - Cache context.
        See Also:
        onFinishBuildNewIndex(java.lang.String)
      • markIndexRecreate

        public void markIndexRecreate​(GridCacheContext<?,​?> cacheCtx)
        Mark that index.bin recreate in progress.
      • onFinishRebuildIndexes

        public void onFinishRebuildIndexes​(String cacheName)
        Callback on the finish of rebuilding cache indexes.

        Registers the finish of rebuilding cache indexes, if all operations have been completed for persistent cache, then the entry will be deleted from the MetaStorage at the end of the checkpoint, otherwise for the in-memory cache the status will be deleted immediately.

        Parameters:
        cacheName - Cache name.
        See Also:
        onStartRebuildIndexes(org.apache.ignite.internal.processors.cache.GridCacheContext, boolean)
      • onFinishBuildNewIndex

        public void onFinishBuildNewIndex​(String cacheName)
        Callback on the finish of building a new cache index.

        Registers the finish of building a new cache index, if all operations have been completed for persistent cache, then the entry will be deleted from the MetaStorage at the end of the checkpoint, otherwise for the in-memory cache the status will be deleted immediately.

        Parameters:
        cacheName - Cache name.
        See Also:
        onStartBuildNewIndex(org.apache.ignite.internal.processors.cache.GridCacheContext)
      • rebuildCompleted

        public boolean rebuildCompleted​(String cacheName)
        Check if rebuilding of indexes for the cache has been completed.
        Parameters:
        cacheName - Cache name.
        Returns:
        True if completed.
      • recreateCompleted

        public boolean recreateCompleted​(String cacheName)
        Check if index.bin recreating for the cache has been completed.
        Parameters:
        cacheName - Cache name.
        Returns:
        True if index.bin recreate completed.
      • onReadyForReadWrite

        public void onReadyForReadWrite​(ReadWriteMetastorage metastorage)
        Fully functional metastore capable of performing reading and writing operations. Components interested in using metastore are allowed to keep reference passed into the method in their fields.
        Specified by:
        onReadyForReadWrite in interface MetastorageLifecycleListener
        Parameters:
        metastorage - Fully functional meta storage.
      • onReadyForRead

        public void onReadyForRead​(ReadOnlyMetastorage metastorage)
        Is called when metastorage is made ready for read-only operations very early on node startup phase. Reference for read-only metastorage should be used only within this method and shouldn't be stored to any field.
        Specified by:
        onReadyForRead in interface MetastorageLifecycleListener
        Parameters:
        metastorage - Read-only meta storage.