public class ChangeNumberIndexer extends DirectoryThread
Only changes 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 (indirectly through an
ECLMultiDomainDBCursor).
DirectoryThread.FactoryThread.State, Thread.UncaughtExceptionHandlerDIRECTORY_THREAD_GROUPMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ChangeNumberIndexer(ChangelogDB changelogDB,
ChangelogState changelogState)
Builds a ChangeNumberIndexer object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(DN baseDN)
Asks the current thread to clear its state for the specified domain.
|
void |
initiateShutdown()
Instructs the current thread to initiate the shutdown process.
|
boolean |
isReplicaOffline(DN domainDN,
int serverId)
Indicates if the replica corresponding to provided domain DN and server id
is offline.
|
protected void |
notifyEntryAddedToChangelog(DN baseDN,
long changeNumber,
MultiDomainServerState cookie,
UpdateMsg msg)
Notifies the
ChangelogBackend that a new entry has been added. |
void |
publishHeartbeat(DN baseDN,
CSN heartbeatCSN)
Ensures the medium consistency point is updated by heartbeats.
|
void |
publishUpdateMsg(DN baseDN,
UpdateMsg updateMsg)
Ensures the medium consistency point is updated by UpdateMsg.
|
void |
replicaOffline(DN baseDN,
CSN offlineCSN)
Signals a replica went offline.
|
void |
run() |
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, isShutdownInitiated, setAssociatedTask, startWork, stopWorkactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic ChangeNumberIndexer(ChangelogDB changelogDB, ChangelogState changelogState)
changelogDB - the changelogDBchangelogState - the changelog state used for initializationpublic void publishHeartbeat(DN baseDN, CSN heartbeatCSN)
baseDN - the baseDN of the domain for which the heartbeat is publishedheartbeatCSN - the CSN coming from the heartbeatpublic boolean isReplicaOffline(DN domainDN, int serverId)
domainDN - base DN of the replicaserverId - server id of the replicatrue if replica is offline, false otherwisepublic void publishUpdateMsg(DN baseDN, UpdateMsg updateMsg) throws ChangelogException
baseDN - the baseDN of the domain for which the heartbeat is publishedupdateMsg - the updateMsg that will update the medium consistency pointChangelogException - If a database problem happenedpublic void replicaOffline(DN baseDN, CSN offlineCSN)
baseDN - the replica's replication domainofflineCSN - the serverId and time of the replica that went offlinepublic void initiateShutdown()
Thread.run() method.initiateShutdown in class DirectoryThreadprotected void notifyEntryAddedToChangelog(DN baseDN, long changeNumber, MultiDomainServerState cookie, UpdateMsg msg) throws ChangelogException
ChangelogBackend that a new entry has been added.baseDN - the baseDN of the newly added entry.changeNumber - the change number of the newly added entry. It will be greater
than zero for entries added to the change number index and less
than or equal to zero for entries added to any replica DBcookie - the cookie of the newly added entry. This is only meaningful for
entries added to the change number indexmsg - the update message of the newly added entryChangelogException - If a problem occurs while notifying of the newly added entry.public void clear(DN baseDN)
Note: This method blocks the current thread until state is cleared.
baseDN - the baseDN to be cleared from this thread's state.
null and DN.NULL_DN mean "clear all domains".Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.