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 Details

    • initializeDB

      void initializeDB() throws ChangelogException
      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.
      Throws:
      ChangelogException - if initialization fails
    • 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)
      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
    • shutdownDB

      void shutdownDB() throws ChangelogException
      Shutdown the replication database.
      Throws:
      ChangelogException - If a database problem happened
    • removeDB

      void removeDB() throws ChangelogException
      Removes the changelog database directory.
      Throws:
      ChangelogException - If a database problem happened
    • getChangeNumberIndexDB

      ChangeNumberIndexDB getChangeNumberIndexDB()
      Returns the ChangeNumberIndexDB object.
      Returns:
      the ChangeNumberIndexDB object
    • getReplicationDomainDB

      ReplicationDomainDB getReplicationDomainDB()
      Returns the ReplicationDomainDB object.
      Returns:
      the ReplicationDomainDB object
    • getNewestChangeNumber

      long getNewestChangeNumber() throws ChangelogException
      Returns the newest changelog change number.
      Returns:
      returns the newest changelog change number
      Throws:
      ChangelogException - if an error occurs
    • getOldestChangeNumber

      long getOldestChangeNumber() throws ChangelogException
      Returns the oldest changelog change number.
      Returns:
      returns the oldest changelog change number
      Throws:
      ChangelogException - if an error occurs
    • notifyEclExcludedDomainsChanged

      void notifyEclExcludedDomainsChanged()
      Notifies the change number indexer that the list of excluded domains has changed.