@NotThreadSafe public class MultiDomainDBCursor extends Object
DBCursor.CursorOptions, DBCursor.KeyMatchingStrategy, DBCursor.PositionStrategy
Constructor and Description |
---|
MultiDomainDBCursor(ReplicationDomainDB domainDB,
DBCursor.CursorOptions options)
Builds a MultiDomainDBCursor instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCursor(DBCursor<UpdateMsg> cursor,
T data)
Adds a cursor to this composite cursor.
|
void |
addDomain(org.forgerock.opendj.ldap.Dn baseDN,
ServerState startAfterState)
Adds a replication domain for this cursor to iterate over.
|
void |
close()
Release the resources and locks used by this Iterator.
|
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.
|
protected void |
removeCursor(T dataToFind)
Removes the cursor matching the provided data.
|
void |
removeDomain(org.forgerock.opendj.ldap.Dn baseDN)
Removes a replication domain from this cursor and stops iterating over it.
|
String |
toString() |
public MultiDomainDBCursor(ReplicationDomainDB domainDB, DBCursor.CursorOptions options)
domainDB
- the replication domain management DBoptions
- The cursor optionspublic void addDomain(org.forgerock.opendj.ldap.Dn baseDN, ServerState startAfterState)
next()
.baseDN
- the replication domain's baseDNstartAfterState
- the ServerState
after which to start iteratingprotected void incorporateNewCursors() throws ChangelogException
addCursor(DBCursor, Object)
to do so.ChangelogException
- if a database problem occurredpublic void removeDomain(org.forgerock.opendj.ldap.Dn baseDN)
next()
.baseDN
- the replication domain's baseDNpublic void close()
public boolean next() throws ChangelogException
next
in interface DBCursor<UpdateMsg>
ChangelogException
- When database exception raised.protected void removeCursor(T dataToFind)
dataToFind
- the data for which the cursor must be found and removedprotected 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 T getData()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.