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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionChangeNumberIndexer(ChangelogDB changelogDB, ChangelogStateProvider changelogStateProvider, Predicate<Dn> isEclEnabledDomain, ServerContext serverContext) Builds a ChangeNumberIndexer object. -
Method Summary
Modifier and TypeMethodDescriptionvoidUpdates the list of monitored replicas when the list of excluded domains changes.voidInstructs the current thread to initiate the shutdown process.voidnotifyHeartbeat(Dn baseDn, CSN heartbeatCsn) Ensures the medium consistency point is updated by heartbeats.voidnotifyUpdateMsg(Dn baseDn, UpdateMsg updateMsg) Ensures the medium consistency point is updated by UpdateMsg.voidrun()Methods inherited from class org.opends.server.api.DirectoryThread
checkForShutdownOrWait, checkForShutdownOrWait, getAssociatedTask, getServerContext, interrupt, isShutdownInitiated, isStarted, isStarting, setAssociatedTask, wakeupMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
ChangeNumberIndexer
public ChangeNumberIndexer(ChangelogDB changelogDB, ChangelogStateProvider changelogStateProvider, Predicate<Dn> isEclEnabledDomain, ServerContext serverContext) Builds a ChangeNumberIndexer object.- Parameters:
changelogDB- the changelogDBchangelogStateProvider- the replication environment information for access to changelog stateisEclEnabledDomain- predicate to indicates if ECL is enabled for a domainserverContext- the server context
-
-
Method Details
-
notifyHeartbeat
Ensures the medium consistency point is updated by heartbeats.- Parameters:
baseDn- the baseDN of the domain for which the heartbeat is publishedheartbeatCsn- the CSN coming from the heartbeat
-
notifyUpdateMsg
Ensures the medium consistency point is updated by UpdateMsg.- Parameters:
baseDn- the baseDN of the domain for which the heartbeat is publishedupdateMsg- 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:DirectoryThreadInstructs 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 theThread.run()method.- Overrides:
initiateShutdownin classDirectoryThread
-
run
public void run()
-