@ThreadSafe public final 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.
Modifier and Type | Field and Description |
---|---|
static int |
NO_GENERATION_ID
To be used when the generation id is not set.
|
Constructor and Description |
---|
ChangelogState() |
Modifier and Type | Method and Description |
---|---|
void |
addReplica(DomainReplicaId replica)
Adds the provided replica.
|
Map<Dn,Long> |
getDomainToGenerationId()
Returns the Map of domainBaseDN to generationId.
|
Set<DomainReplicaId> |
getReplicas()
Returns all the replicas which have a dedicated replica DB.
|
void |
setDomainGenerationId(Dn baseDn,
long generationId)
Sets the generationId for the supplied replication domain.
|
String |
toString() |
public static final int NO_GENERATION_ID
public void setDomainGenerationId(Dn baseDn, long generationId)
baseDn
- the targeted replication domain baseDNgenerationId
- the generation Id to setpublic void addReplica(DomainReplicaId replica)
replica
- the replica to addpublic Map<Dn,Long> getDomainToGenerationId()
public Set<DomainReplicaId> getReplicas()
The returned value is an unmodifiable set of replicas. If the set of replicas known to this RS does not change,
then the returned set is always the same. This ensures equality tests on the set return true
very quickly
in case nothing changed. The change number indexer uses this trick to avoid spending too much comparing sets of
DomainReplicaId
s that rarely change.
DomainReplicaId
.Copyright 2010-2022 ForgeRock AS.