org.apache.ignite.spi.checkpoint.noop

## Class NoopCheckpointSpi

- java.lang.Object
- - org.apache.ignite.spi.IgniteSpiAdapter
  - - org.apache.ignite.spi.checkpoint.noop.NoopCheckpointSpi

- All Implemented Interfaces:
    CheckpointSpi, IgniteSpi

      @IgniteSpiNoop
       @IgniteSpiMultipleInstancesSupport(value=true)
      public class NoopCheckpointSpi
      extends IgniteSpiAdapter
      implements CheckpointSpi

  No-op implementation of `CheckpointSpi`. This is default implementation since `4.5.0` version.

- - ### Field Summary

    - ### Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapter

      `ignite, igniteInstanceName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoopCheckpointSpi()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `@Nullable byte[]` | `loadCheckpoint(String key)` Loads checkpoint from storage by its unique key.
    `boolean` | `removeCheckpoint(String key)` This method instructs the checkpoint provider to clean saved data for a given `key`.
    `boolean` | `saveCheckpoint(String key, byte[] state, long timeout, boolean overwrite)` Saves checkpoint to the storage.
    `void` | `setCheckpointListener(CheckpointListener lsnr)` Sets the checkpoint listener.
    `NoopCheckpointSpi` | `setName(String name)` Sets SPI name.
    `void` | `spiStart(@Nullable String igniteInstanceName)` This method is called to start SPI.
    `void` | `spiStop()` This method is called to stop SPI.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapter

      `addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, started, startInfo, startStopwatch, stopInfo, unregisterMBean`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ignite.spi.IgniteSpi

      `getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized`

- - ### Constructor Detail

    - #### NoopCheckpointSpi

          public NoopCheckpointSpi()

  - ### Method Detail

    - #### spiStart

          public void spiStart(@Nullable
                               @Nullable String igniteInstanceName)
                        throws IgniteSpiException

      This method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.
      Specified by:
        `spiStart` in interface `IgniteSpi`
      Parameters:
        `igniteInstanceName` - Name of Ignite instance this SPI is being started for (`null` for default Ignite instance).
      Throws:
        `IgniteSpiException` - Throws in case of any error during SPI start.

    - #### spiStop

          public void spiStop()
                       throws IgniteSpiException

      This method is called to stop SPI. After this method returns kernel assumes that this SPI is finished and all resources acquired by it are released.

      Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.

      Specified by:
        `spiStop` in interface `IgniteSpi`
      Throws:
        `IgniteSpiException` - Thrown in case of any error during SPI stop.

    - #### loadCheckpoint

          @Nullable
          public @Nullable byte[] loadCheckpoint(String key)
                                                    throws IgniteSpiException

      Loads checkpoint from storage by its unique key.
      Specified by:
        `loadCheckpoint` in interface `CheckpointSpi`
      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

          public boolean saveCheckpoint(String key,
                                        byte[] state,
                                        long timeout,
                                        boolean overwrite)

      Saves checkpoint to the storage.
      Specified by:
        `saveCheckpoint` in interface `CheckpointSpi`
      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.

    - #### removeCheckpoint

          public boolean removeCheckpoint(String key)

      This method instructs the checkpoint provider to clean saved data for a given `key`.
      Specified by:
        `removeCheckpoint` in interface `CheckpointSpi`
      Parameters:
        `key` - Key for the checkpoint to remove.
      Returns:
        `true` if data has been actually removed, `false` otherwise.

    - #### setCheckpointListener

          public void setCheckpointListener(CheckpointListener lsnr)

      Sets the checkpoint listener.
      Specified by:
        `setCheckpointListener` in interface `CheckpointSpi`
      Parameters:
        `lsnr` - The listener to set or `null`.

    - #### setName

          public NoopCheckpointSpi setName(String name)

      Sets SPI name.
      Overrides:
        `setName` in class `IgniteSpiAdapter`
      Parameters:
        `name` - SPI name.
      Returns:
        `this` for chaining.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022