|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.server.DbHandler
public class DbHandler
This class is used for managing the replicationServer database for each server in the topology. It is responsible for efficiently saving the updates that is received from each master server into stable storage. This class is also able to generate a ReplicationIterator that can be used to read all changes from a given ChangeNUmber. This class publish some monitoring information below cn=monitor.
Constructor Summary | |
---|---|
DbHandler(short id,
DN baseDn,
ReplicationServer replicationServer,
ReplicationDbEnv dbenv)
Creates a new dbHandler associated to a given LDAP server. |
Method Summary | |
---|---|
void |
add(UpdateMessage update)
Add an update to the list of messages that must be saved to the db managed by this db handler. |
void |
clear()
Clear the changes from this DB (from both memory cache and DB storage). |
ReplicationIterator |
generateIterator(ChangeNumber changeNumber)
Generate a new ReplicationIterator that allows to browse the db managed by this dbHandler and starting at the position defined by a given changeNumber. |
long |
getChangesCount()
Get the number of changes. |
ChangeNumber |
getFirstChange()
Get the firstChange. |
ChangeNumber |
getLastChange()
Get the lastChange. |
void |
run()
Run method for this class. |
void |
setPurgeDelay(long delay)
Set the Purge delay for this db Handler. |
void |
shutdown()
Shutdown this dbHandler. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DbHandler(short id, DN baseDn, ReplicationServer replicationServer, ReplicationDbEnv dbenv) throws com.sleepycat.je.DatabaseException
id
- Identifier of the DB.baseDn
- the baseDn for which this DB was created.replicationServer
- The ReplicationServer that creates this dbHandler.dbenv
- the Database Env to use to create the ReplicationServer DB.
server for this domain.
com.sleepycat.je.DatabaseException
- If a database problem happenedMethod Detail |
---|
public void add(UpdateMessage update)
update
- The update that must be saved to the db managed by this db
handler.public ChangeNumber getFirstChange()
public ChangeNumber getLastChange()
public long getChangesCount()
public ReplicationIterator generateIterator(ChangeNumber changeNumber) throws com.sleepycat.je.DatabaseException, java.lang.Exception
changeNumber
- The position where the iterator must start.
com.sleepycat.je.DatabaseException
- if a database problem happened.
java.lang.Exception
- If there is no other change to push after change
with changeNumber number.public void shutdown()
public void run()
run
in interface java.lang.Runnable
public java.lang.String toString()
toString
in class java.lang.Object
public void setPurgeDelay(long delay)
delay
- The purge delay in Milliseconds.public void clear() throws com.sleepycat.je.DatabaseException, java.lang.Exception
com.sleepycat.je.DatabaseException
- When an exception occurs while removing the
changes from the DB.
java.lang.Exception
- When an exception occurs while accessing a resource
from the DB.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |