@NotThreadSafe public class DomainDBCursor extends Object
DBCursor.CursorOptions, DBCursor.PositionStrategy
Constructor and Description |
---|
DomainDBCursor(Dn baseDN,
ReplicationDomainDB domainDB,
DBCursor.CursorOptions options)
Builds a DomainDBCursor instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCursor(DBCursor<UpdateMsg> cursor,
T data)
Adds a cursor to this composite cursor.
|
void |
addReplicaDB(int serverId,
CSN startCSN)
Adds a replicaDB for this cursor to iterate over.
|
void |
close()
Release the resources and locks used by this Iterator.
|
Dn |
getBaseDN()
Returns the replication domain baseDN of this cursor.
|
T |
getData()
Returns the data associated to the cursor that returned the current record.
|
UpdateMsg |
getRecord()
Getter for the current record.
|
protected void |
incorporateNewCursors()
Called when implementors should incorporate new cursors into the current composite DBCursor.
|
boolean |
next()
Skip to the next record of the database.
|
String |
toString() |
public DomainDBCursor(Dn baseDN, ReplicationDomainDB domainDB, DBCursor.CursorOptions options)
baseDN
- the replication domain baseDN of this cursordomainDB
- the DB for the provided replication domainoptions
- The cursor optionspublic Dn getBaseDN()
public void addReplicaDB(int serverId, CSN startCSN)
next()
.serverId
- the serverId of the replicastartCSN
- the CSN to use as a starting pointprotected void incorporateNewCursors() throws ChangelogException
addCursor(DBCursor, Object)
to do so.ChangelogException
- if a database problem occurredpublic void close()
DBCursor
public boolean next() throws ChangelogException
DBCursor
next
in interface DBCursor<UpdateMsg>
ChangelogException
- When database exception raised.protected void addCursor(DBCursor<UpdateMsg> cursor, T data) throws ChangelogException
DBCursor.next()
to verify whether it is exhausted
or not.cursor
- the cursor to add to this compositedata
- the data associated to the provided cursorChangelogException
- if a database problem occurredpublic UpdateMsg getRecord()
DBCursor
This method will always return null
when
DBCursor.next()
returns false
DBCursor.next()
.public T getData()
Copyright 2010-2018 ForgeRock AS.