net.corda.node.services.persistence

## Class DBCheckpointStorage

- net.corda.node.services.persistence.DBCheckpointStorage

- All Implemented Interfaces:
    CheckpointStorage

      public class DBCheckpointStorage
      implements CheckpointStorage

  Simple checkpoint key value storage in DB using the underlying JDBCHashMap and transactional context of the call sites.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBCheckpointStorage()` Simple checkpoint key value storage in DB using the underlying JDBCHashMap and transactional context of the call sites.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCheckpoint(Checkpoint checkpoint)` Add a new checkpoint to the store.
    `void` | `forEach(kotlin.jvm.functions.Function1<? super net.corda.node.services.api.Checkpoint,java.lang.Boolean> block)` Allows the caller to process safely in a thread safe fashion the set of all checkpoints. The checkpoints are only valid during the lifetime of a single call to the block, to allow memory management. Return false from the block to terminate further iteration.
    `void` | `removeCheckpoint(Checkpoint checkpoint)` Remove existing checkpoint from the store. It is an error to attempt to remove a checkpoint which doesn't exist in the store. Doing so will throw an IllegalArgumentException.

    - ### Methods inherited from interface net.corda.node.services.api.CheckpointStorage

      `addCheckpoint, forEach, removeCheckpoint`

- - ### Constructor Detail

    - #### DBCheckpointStorage

          public DBCheckpointStorage()

      Simple checkpoint key value storage in DB using the underlying JDBCHashMap and transactional context of the call sites.

  - ### Method Detail

    - #### addCheckpoint

          public void addCheckpoint(Checkpoint checkpoint)

      Add a new checkpoint to the store.

    - #### removeCheckpoint

          public void removeCheckpoint(Checkpoint checkpoint)

      Remove existing checkpoint from the store. It is an error to attempt to remove a checkpoint which doesn't exist in the store. Doing so will throw an IllegalArgumentException.

      See Also:
        IllegalArgumentException

    - #### forEach

          public void forEach(kotlin.jvm.functions.Function1<? super net.corda.node.services.api.Checkpoint,java.lang.Boolean> block)

      Allows the caller to process safely in a thread safe fashion the set of all checkpoints. The checkpoints are only valid during the lifetime of a single call to the block, to allow memory management. Return false from the block to terminate further iteration.