Interface CheckpointSpi

    • Method Detail

      • loadCheckpoint

        @Nullable
        @org.jetbrains.annotations.Nullable byte[] loadCheckpoint​(String key)
                                                           throws IgniteSpiException
        Loads checkpoint from storage by its unique key.
        Parameters:
        key - Checkpoint key.
        Returns:
        Loaded data or null if there is no data for a given key.
        Throws:
        IgniteSpiException - Thrown in case of any error while loading checkpoint data. Note that in case when given key is not found this method will return null.
      • saveCheckpoint

        boolean saveCheckpoint​(String key,
                               byte[] state,
                               long timeout,
                               boolean overwrite)
                        throws IgniteSpiException
        Saves checkpoint to the storage.
        Parameters:
        key - Checkpoint unique key.
        state - Saved data.
        timeout - Every intermediate data stored by checkpoint provider should have a timeout. Timeout allows for effective resource management by checkpoint provider by cleaning saved data that are not needed anymore. Generally, the user should choose the minimum possible timeout to avoid long-term resource acquisition by checkpoint provider. Value 0 means that timeout will never expire.
        overwrite - Whether or not overwrite checkpoint if it already exists.
        Returns:
        true if checkpoint has been actually saved, false otherwise.
        Throws:
        IgniteSpiException - Thrown in case of any error while saving checkpoint data.
      • removeCheckpoint

        boolean removeCheckpoint​(String key)
        This method instructs the checkpoint provider to clean saved data for a given key.
        Parameters:
        key - Key for the checkpoint to remove.
        Returns:
        true if data has been actually removed, false otherwise.
      • setCheckpointListener

        void setCheckpointListener​(CheckpointListener lsnr)
        Sets the checkpoint listener.
        Parameters:
        lsnr - The listener to set or null.