@ThreadSafe public class ChangelogState extends Object
This class is used during replication initialization to decouple the code that reads the changelogStateDB from the code that makes use of its data.
| Constructor and Description |
|---|
ChangelogState() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOfflineReplica(org.forgerock.opendj.ldap.DN baseDN,
CSN offlineCSN)
Adds the following replica information to the offline list.
|
void |
addServerIdToDomain(int serverId,
org.forgerock.opendj.ldap.DN baseDN)
Adds the serverId to the serverIds list of the supplied replication domain.
|
Map<org.forgerock.opendj.ldap.DN,Long> |
getDomainToGenerationId()
Returns the Map of domainBaseDN => generationId.
|
Map<org.forgerock.opendj.ldap.DN,Set<Integer>> |
getDomainToServerIds()
Returns the Map of domainBaseDN => List<serverId>.
|
MultiDomainServerState |
getOfflineReplicas()
Returns the internal MultiDomainServerState for offline replicas.
|
boolean |
isEqualTo(ChangelogState other)
Returns whether the current ChangelogState is equal to the provided
ChangelogState.
|
void |
removeOfflineReplica(org.forgerock.opendj.ldap.DN baseDN,
int serverId)
Removes the following replica information from the offline list.
|
void |
setDomainGenerationId(org.forgerock.opendj.ldap.DN baseDN,
long generationId)
Sets the generationId for the supplied replication domain.
|
String |
toString() |
public ChangelogState()
public void setDomainGenerationId(org.forgerock.opendj.ldap.DN baseDN, long generationId)
baseDN - the targeted replication domain baseDNgenerationId - the generation Id to setpublic void addServerIdToDomain(int serverId, org.forgerock.opendj.ldap.DN baseDN)
serverId - the serverId to addbaseDN - the targeted replication domain baseDNpublic void addOfflineReplica(org.forgerock.opendj.ldap.DN baseDN, CSN offlineCSN)
baseDN - the baseDN of the offline replicaofflineCSN - the CSN (serverId + timestamp) of the offline replicapublic void removeOfflineReplica(org.forgerock.opendj.ldap.DN baseDN, int serverId)
baseDN - the baseDN of the offline replicaserverId - the serverId that is not offline anymorepublic Map<org.forgerock.opendj.ldap.DN,Long> getDomainToGenerationId()
public Map<org.forgerock.opendj.ldap.DN,Set<Integer>> getDomainToServerIds()
public MultiDomainServerState getOfflineReplicas()
public boolean isEqualTo(ChangelogState other)
Note: Only use for tests!!
This method should only be used by tests because it creates a lot of
intermediate objects which is not suitable for production.
other - the ChangelogState to compare withCopyright © 2010-2018 ForgeRock AS. All Rights Reserved.