Interface ChangelogDB

  • All Known Implementing Classes:
    FileChangelogDB

    public interface ChangelogDB
    This interface is the entry point for the changelog database which stores the replication data on persistent storage. It allows to control the overall database or access more specialized interfaces.
    • Method Detail

      • initializeDB

        void initializeDB()
        Initializes the replication database by reading its previous state and building the relevant ReplicaDBs according to the previous state. This method must be called once before using the ChangelogDB.
      • setPurgeDelay

        void setPurgeDelay​(Duration purgeDelay)
        Sets the purge delay for the replication database. Can be called while the database is running.

        Purging happens on a best effort basis, i.e. the purge delay is used by the replication database to know which data can be purged, but there are no guarantees on when the purging will actually happen.

        Parameters:
        purgeDelay - the purge delay. Duration.ZERO disables purging.
      • setComputeChangeNumber

        void setComputeChangeNumber​(boolean computeChangeNumber)
                             throws ChangelogException
        Sets whether the replication database must compute change numbers for replicated changes. Change numbers are computed using a separate new thread.
        Parameters:
        computeChangeNumber - whether to compute change numbers for replicated changes
        Throws:
        ChangelogException - If a database problem happened