Class ChangeNumberIndexer

java.lang.Object
java.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.replication.server.changelog.file.ChangeNumberIndexer
All Implemented Interfaces:
Runnable

public final class ChangeNumberIndexer extends DirectoryThread
Thread responsible for inserting replicated updates into the ChangeNumber Index DB (CNIndexDB for short).

Only updates older than the medium consistency point are inserted in the CNIndexDB. As a consequence this class is also responsible for maintaining the medium consistency point.

  • Constructor Details

    • ChangeNumberIndexer

      public ChangeNumberIndexer(ChangelogDB changelogDB, ChangelogStateProvider changelogStateProvider, Predicate<Dn> isEclEnabledDomain, ServerContext serverContext)
      Builds a ChangeNumberIndexer object.
      Parameters:
      changelogDB - the changelogDB
      changelogStateProvider - the replication environment information for access to changelog state
      isEclEnabledDomain - predicate to indicates if ECL is enabled for a domain
      serverContext - the server context
  • Method Details

    • notifyHeartbeat

      public void notifyHeartbeat(Dn baseDn, CSN heartbeatCsn)
      Ensures the medium consistency point is updated by heartbeats.
      Parameters:
      baseDn - the baseDN of the domain for which the heartbeat is published
      heartbeatCsn - the CSN coming from the heartbeat
    • notifyUpdateMsg

      public void notifyUpdateMsg(Dn baseDn, UpdateMsg updateMsg)
      Ensures the medium consistency point is updated by UpdateMsg.
      Parameters:
      baseDn - the baseDN of the domain for which the heartbeat is published
      updateMsg - the updateMsg that will update the medium consistency point
    • excludedDomainsChanged

      public void excludedDomainsChanged()
      Updates the list of monitored replicas when the list of excluded domains changes.
    • initiateShutdown

      public void initiateShutdown()
      Description copied from class: DirectoryThread
      Instructs the current thread to initiate the shutdown process. The actual shutdown of the thread is a best effort and is dependent on the implementation of the Thread.run() method.
      Overrides:
      initiateShutdown in class DirectoryThread
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread