|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.server.ReplicationDB
public class ReplicationDB
This class implements the interface between the underlying database and the dbHandler class. This is the only class that should have code using the BDB interfaces.
Nested Class Summary | |
---|---|
class |
ReplicationDB.ReplServerDBCursor
This Class implements a cursor that can be used to browse a replicationServer database. |
Constructor Summary | |
---|---|
ReplicationDB(java.lang.Short serverId,
DN baseDn,
ReplicationServer replicationServer,
ReplicationDbEnv dbenv)
Creates a new database or open existing database that will be used to store and retrieve changes from an LDAP server. |
Method Summary | |
---|---|
void |
addEntries(java.util.List<UpdateMessage> changes)
add a list of changes to the underlying db. |
void |
clear()
Clears this change DB from the changes it contains. |
ReplicationDB.ReplServerDBCursor |
openDeleteCursor()
Create a cursor that can be used to delete some record from this ReplicationServer database. |
ReplicationDB.ReplServerDBCursor |
openReadCursor(ChangeNumber changeNumber)
Create a cursor that can be used to search or iterate on this ReplicationServer DB. |
ChangeNumber |
readFirstChange()
Read the first Change from the database. |
ChangeNumber |
readLastChange()
Read the last Change from the database. |
void |
shutdown()
Shutdown the database. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReplicationDB(java.lang.Short serverId, DN baseDn, ReplicationServer replicationServer, ReplicationDbEnv dbenv) throws com.sleepycat.je.DatabaseException
serverId
- The identifier of the LDAP server.baseDn
- The baseDn of the replication domain.replicationServer
- The ReplicationServer that needs to be shutdown.dbenv
- The Db environment to use to create the db.
com.sleepycat.je.DatabaseException
- If a database problem happened.Method Detail |
---|
public void addEntries(java.util.List<UpdateMessage> changes)
changes
- The list of changes to add to the underlying db.public void shutdown()
public ReplicationDB.ReplServerDBCursor openReadCursor(ChangeNumber changeNumber) throws com.sleepycat.je.DatabaseException, java.lang.Exception
changeNumber
- The ChangeNumber from which the cursor must start.
com.sleepycat.je.DatabaseException
- If a database error prevented the cursor
creation.
java.lang.Exception
- if the ReplServerDBCursor creation failed.public ReplicationDB.ReplServerDBCursor openDeleteCursor() throws com.sleepycat.je.DatabaseException, java.lang.Exception
com.sleepycat.je.DatabaseException
- If a database error prevented the cursor
creation.
java.lang.Exception
- if the ReplServerDBCursor creation failed.public ChangeNumber readFirstChange()
public ChangeNumber readLastChange()
public java.lang.String toString()
toString
in class java.lang.Object
public void clear() throws java.lang.Exception, com.sleepycat.je.DatabaseException
java.lang.Exception
- Throws an exception it occurs.
com.sleepycat.je.DatabaseException
- Throws a DatabaseException when it occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |