Interface SnapshotStore


  • public interface SnapshotStore
    SPI for snapshot store.
    • Method Detail

      • createSnapshotWriter

        SnapshotStore.SnapshotStoreWriter createSnapshotWriter​(java.math.BigInteger transactionId)
        Initiate the storage part of a snapshot for a given store. In the end one snapshot will contain parts for every stores, so this method is called once for each store at snapshot time.
        Parameters:
        transactionId - the transaction id of the snapshot to be written.
        Returns:
        the SnapshotStoreWriter to be used to write the store's snapshot content.
      • createSnapshotReader

        org.reactivestreams.Publisher<SnapshotStore.StoreSnapshotReader> createSnapshotReader​(java.math.BigInteger transactionId)
                                                                                       throws java.io.IOException
        Retrieve an existing snapshot in the store.
        Parameters:
        transactionId - the transaction id of the snapshot to be retrieved
        Returns:
        the Publisher<StoreSnapshotReader> to be used to read the snapshot content. The publisher will provide one SnapshotStore.StoreSnapshotReader by store in the snapshot.
        Throws:
        java.io.IOException - in case of error when trying to provide access to the one of the stores snapshots.
      • listSnapshots

        java.util.List<java.math.BigInteger> listSnapshots()
                                                    throws java.io.IOException
        List all the existing snapshots.
        Returns:
        the list of snapshot transactions id.
        Throws:
        java.io.IOException - if an I/O error occurs when listing the snapshots
      • close

        default void close()
        Dispose any resource the store may have open.
      • deleteSnapshot

        void deleteSnapshot​(java.math.BigInteger transactionId)
                     throws java.io.IOException
        Delete a snapshot.
        Parameters:
        transactionId - the transaction id of the snapshot to be deleted.
        Throws:
        java.io.IOException - if an I/O error occurs when deleting the snapshot