public interface ChangeNumberIndexDB
ChangeNumberIndexRecord
s. The records are sorted by a global
ordering as defined in the CSN class. The index links a
changeNumber
to the corresponding CSN. The CSN then links to a
corresponding change in one of the ReplicaDBs.Modifier and Type | Method and Description |
---|---|
long |
addRecord(ChangeNumberIndexRecord record)
Add an update to the list of messages that must be saved to this DB managed
by this DB and return the changeNumber associated to this record.
|
DBCursor<ChangeNumberIndexRecord> |
getCursorFrom(long startChangeNumber)
Generate a new
DBCursor that allows to browse the db managed by
this object and starting at the position defined by a given changeNumber. |
long |
getLastGeneratedChangeNumber()
Returns the last generated change number.
|
ChangeNumberIndexRecord |
getNewestRecord()
Get the newest record stored in this DB.
|
ChangeNumberIndexRecord |
getOldestRecord()
Get the oldest record stored in this DB.
|
void |
resetChangeNumberTo(long newFirstCN,
org.forgerock.opendj.ldap.Dn baseDN,
CSN newFirstCSN)
Resets ChangeNumber index to the given number and CSN.
|
long getLastGeneratedChangeNumber()
ChangeNumberIndexRecord getOldestRecord() throws ChangelogException
ChangeNumberIndexRecord
in this DB, null
when the DB is empty or closedChangelogException
- if a database problem occurs.ChangeNumberIndexRecord getNewestRecord() throws ChangelogException
ChangeNumberIndexRecord
in this DB, null
when the DB is empty or closedChangelogException
- if a database problem occurs.long addRecord(ChangeNumberIndexRecord record) throws ChangelogException
Note: this method disregards the changeNumber in the provided record.
record
- The ChangeNumberIndexRecord
to add to this DB.ChangelogException
- if a database problem occurs.DBCursor<ChangeNumberIndexRecord> getCursorFrom(long startChangeNumber) throws ChangelogException
DBCursor
that allows to browse the db managed by
this object and starting at the position defined by a given changeNumber.startChangeNumber
- The position where the iterator must start.ChangelogException
- if a database problem occurs.void resetChangeNumberTo(long newFirstCN, org.forgerock.opendj.ldap.Dn baseDN, CSN newFirstCSN) throws ChangelogException
newFirstCN
- the new change number to appear as first change in the external changelogbaseDN
- the new record for the first changenewFirstCSN
- the CSN of the new first changeChangelogException
- if an error occurs during resetCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.