public class DraftCNDB extends Object
JEChangeNumberIndexDB
class.
This is the only class that should have code using the BDB interfaces.Modifier and Type | Class and Description |
---|---|
class |
DraftCNDB.DraftCNDBCursor
This Class implements a cursor that can be used to browse the database.
|
Constructor and Description |
---|
DraftCNDB(ReplicationDbEnv dbenv)
Creates a new database or open existing database that will be used
to store and retrieve changes from an LDAP server.
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(ChangeNumberIndexRecord record)
Add a record to the database.
|
void |
clear()
Clears this change DB from the changes it contains.
|
long |
count()
Return the record count.
|
DraftCNDB.DraftCNDBCursor |
openDeleteCursor()
Create a cursor that can be used to delete some record from this
ReplicationServer database.
|
DraftCNDB.DraftCNDBCursor |
openReadCursor(long changeNumber)
Create a cursor that can be used to search or iterate on this DB.
|
ChangeNumberIndexRecord |
readFirstRecord()
Read the first Change from the database, 0 when none.
|
ChangeNumberIndexRecord |
readLastRecord()
Read the last change number from the database.
|
void |
shutdown()
Shutdown the database.
|
String |
toString() |
public DraftCNDB(ReplicationDbEnv dbenv) throws ChangelogException
dbenv
- The Db environment to use to create the db.ChangelogException
- If a database problem happenedpublic void addRecord(ChangeNumberIndexRecord record) throws ChangelogException
record
- the provided ChangeNumberIndexRecord
to be stored.ChangelogException
- If a database problem happenedpublic void shutdown()
public DraftCNDB.DraftCNDBCursor openReadCursor(long changeNumber) throws ChangelogException
changeNumber
- The change number from which the cursor must start.ChangelogException
- If a database error prevented the cursor
creation.public DraftCNDB.DraftCNDBCursor openDeleteCursor() throws ChangelogException
ChangelogException
- If a database error prevented the cursor
creation.public ChangeNumberIndexRecord readFirstRecord() throws ChangelogException
ChangelogException
- if a database problem occurredpublic long count()
public ChangeNumberIndexRecord readLastRecord() throws ChangelogException
ChangelogException
- if a database problem occurredpublic void clear() throws ChangelogException
ChangelogException
- If a database problem happenedCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.