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.
-
-
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
Constructors Constructor Description ChangeNumberIndexer(ChangelogDB changelogDB, ChangelogStateProvider changelogStateProvider, Predicate<Dn> isEclEnabledDomain, ServerContext serverContext)
Builds a ChangeNumberIndexer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initiateShutdown()
Instructs the current thread to initiate the shutdown process.void
notifyHeartbeat(Dn baseDn, CSN heartbeatCsn)
Ensures the medium consistency point is updated by heartbeats.void
notifyUpdateMsg(Dn baseDn, UpdateMsg updateMsg)
Ensures the medium consistency point is updated by UpdateMsg.void
run()
-
Methods inherited from class org.opends.server.api.DirectoryThread
checkForShutdownOrWait, checkForShutdownOrWait, getAssociatedTask, getServerContext, interrupt, isShutdownInitiated, isStarted, isStarting, setAssociatedTask, wakeup
-
Methods 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 Detail
-
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 Detail
-
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 publishedheartbeatCsn
- 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 publishedupdateMsg
- the updateMsg that will update the medium consistency point
-
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 theThread.run()
method.- Overrides:
initiateShutdown
in classDirectoryThread
-
-