public interface ReplicationDomainDB
In particular, the getCursorFom()
methods allow to obtain a cursor at any level:
MultiDomainServerState
ServerState
DBCursor.KeyMatchingStrategy
and
a DBCursor.PositionStrategy
.Modifier and Type | Method and Description |
---|---|
DBCursor<UpdateMsg> |
getCursorFrom(org.forgerock.opendj.ldap.Dn baseDN,
int serverId,
CSN startCSN,
DBCursor.CursorOptions options)
|
DBCursor<UpdateMsg> |
getCursorFrom(org.forgerock.opendj.ldap.Dn baseDN,
ServerState startState,
DBCursor.CursorOptions options)
Generates a
DBCursor across all the replicaDBs for the specified
replication domain starting before, at or after the provided
ServerState for each replicaDB, depending on the provided matching
and positioning strategies. |
MultiDomainDBCursor |
getCursorFrom(MultiDomainServerState startState,
DBCursor.CursorOptions options)
Generates a
DBCursor across all the domains starting before, at or
after the provided MultiDomainServerState for each domain,
depending on the provided matching and positioning strategies. |
MultiDomainDBCursor |
getCursorFrom(MultiDomainServerState startState,
DBCursor.CursorOptions options,
Set<org.forgerock.opendj.ldap.Dn> excludedDomainDns)
Generates a
DBCursor across all the domains starting before, at or
after the provided MultiDomainServerState for each domain,
excluding a provided set of domain DNs. |
ServerState |
getDomainNewestCSNs(org.forgerock.opendj.ldap.Dn baseDN)
Returns the newest
CSN s from the replicaDBs for each serverId in
the specified replication domain. |
ServerState |
getDomainOldestCSNs(org.forgerock.opendj.ldap.Dn baseDN)
Returns the oldest
CSN s from the replicaDBs for each serverId in
the specified replication domain. |
void |
notifyReplicaOffline(org.forgerock.opendj.ldap.Dn baseDN,
CSN offlineCSN)
Let the DB know this replica is going down.
|
boolean |
publishUpdateMsg(org.forgerock.opendj.ldap.Dn baseDN,
UpdateMsg updateMsg)
Publishes the provided change to the changelog DB for the specified
serverId and replication domain.
|
void |
removeDomain(org.forgerock.opendj.ldap.Dn baseDN)
Removes all the data relating to the specified replication domain and
shutdown all its replica databases.
|
void |
replicaHeartbeat(org.forgerock.opendj.ldap.Dn baseDN,
CSN heartbeatCSN)
Let the DB know this replica is alive.
|
void |
unregisterCursor(DBCursor<?> cursor)
Unregisters the provided cursor from this replication domain.
|
ServerState getDomainOldestCSNs(org.forgerock.opendj.ldap.Dn baseDN)
CSN
s from the replicaDBs for each serverId in
the specified replication domain.baseDN
- the replication domain baseDNServerState getDomainNewestCSNs(org.forgerock.opendj.ldap.Dn baseDN)
CSN
s from the replicaDBs for each serverId in
the specified replication domain.baseDN
- the replication domain baseDNvoid removeDomain(org.forgerock.opendj.ldap.Dn baseDN) throws ChangelogException
baseDN
- the replication domain baseDNChangelogException
- If a database problem happenedMultiDomainDBCursor getCursorFrom(MultiDomainServerState startState, DBCursor.CursorOptions options) throws ChangelogException
DBCursor
across all the domains starting before, at or
after the provided MultiDomainServerState
for each domain,
depending on the provided matching and positioning strategies.
When the cursor is not used anymore, client code MUST call the
DBCursor.close()
method to free the resources and locks used by the
cursor.
startState
- Starting point for each domain cursor. If any ServerState
for a domain is null, then start from the oldest CSN for each
replicaDBsoptions
- The cursor optionsDBCursor
ChangelogException
- If a database problem happened#getCursorFrom(Dn, ServerState, CursorOptions)
MultiDomainDBCursor getCursorFrom(MultiDomainServerState startState, DBCursor.CursorOptions options, Set<org.forgerock.opendj.ldap.Dn> excludedDomainDns) throws ChangelogException
DBCursor
across all the domains starting before, at or
after the provided MultiDomainServerState
for each domain,
excluding a provided set of domain DNs.
When the cursor is not used anymore, client code MUST call the
DBCursor.close()
method to free the resources and locks used by the
cursor.
startState
- Starting point for each domain cursor. If any ServerState
for a domain is null, then start from the oldest CSN for each
replicaDBsoptions
- The cursor optionsexcludedDomainDns
- Every domain appearing in this set is excluded from the cursorDBCursor
ChangelogException
- If a database problem happened#getCursorFrom(Dn, ServerState, CursorOptions)
DBCursor<UpdateMsg> getCursorFrom(org.forgerock.opendj.ldap.Dn baseDN, ServerState startState, DBCursor.CursorOptions options) throws ChangelogException
DBCursor
across all the replicaDBs for the specified
replication domain starting before, at or after the provided
ServerState
for each replicaDB, depending on the provided matching
and positioning strategies.
When the cursor is not used anymore, client code MUST call the
DBCursor.close()
method to free the resources and locks used by the
cursor.
baseDN
- the replication domain baseDNstartState
- Starting point for each ReplicaDB cursor. If any CSN for a
replicaDB is null, then start from the oldest CSN for this
replicaDBoptions
- The cursor optionsDBCursor
ChangelogException
- If a database problem happened#getCursorFrom(Dn, int, CSN, CursorOptions)
DBCursor<UpdateMsg> getCursorFrom(org.forgerock.opendj.ldap.Dn baseDN, int serverId, CSN startCSN, DBCursor.CursorOptions options) throws ChangelogException
DBCursor
for one replicaDB for the specified
replication domain and serverId starting before, at or after the provided
CSN
, depending on the provided matching and positioning strategies.
When the cursor is not used anymore, client code MUST call the
DBCursor.close()
method to free the resources and locks used by the
cursor.
baseDN
- the replication domain baseDN of the replicaDBserverId
- the serverId of the replicaDBstartCSN
- Starting point for the ReplicaDB cursor. If the CSN is null, then
start from the oldest CSN for this replicaDBoptions
- The cursor optionsDBCursor
ChangelogException
- If a database problem happenedvoid unregisterCursor(DBCursor<?> cursor)
cursor
- the cursor to unregister.boolean publishUpdateMsg(org.forgerock.opendj.ldap.Dn baseDN, UpdateMsg updateMsg) throws ChangelogException
baseDN
- the replication domain baseDNupdateMsg
- the update message to publish to the replicaDBChangelogException
- If a database problem happenedvoid replicaHeartbeat(org.forgerock.opendj.ldap.Dn baseDN, CSN heartbeatCSN) throws ChangelogException
This method allows the medium consistency point to move forward in case this replica did not publish new changes.
baseDN
- the replication domain baseDNheartbeatCSN
- The CSN heartbeat sent by this replica (contains the serverId and
timestamp of the heartbeat)ChangelogException
- If a database problem happenedvoid notifyReplicaOffline(org.forgerock.opendj.ldap.Dn baseDN, CSN offlineCSN) throws ChangelogException
This method allows to let the medium consistency point move forward while this replica is offline.
Note: This method must not be called to let the DB know the replica is not sending heartbeats anymore, i.e. it must not be used in case of suspected network partition.
baseDN
- the replication domain baseDNofflineCSN
- The CSN (serverId and timestamp) for the replica's going offlineChangelogException
- If a database problem happenedCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.