public class MultiDomainServerState extends Object implements Iterable<Dn>
MultiDomainServerState is also known as "cookie" and is used with the cookie-based changelog.
Constructor and Description |
---|
MultiDomainServerState()
Creates a new empty object.
|
MultiDomainServerState(MultiDomainServerState cookie)
Copy constructor.
|
MultiDomainServerState(String cookie)
Create an object from a string representation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cover(Dn baseDN,
CSN csn)
Test if this object covers the provided CSN for the provided baseDN.
|
boolean |
equals(Object obj) |
CSN |
getCSN(Dn baseDN,
ReplicaId replicaId)
Returns the CSN associated to the provided replication domain's baseDN and replicaId.
|
ServerState |
getServerState(Dn baseDN)
Returns the ServerState associated to the provided replication domain's baseDN.
|
Map<Dn,Set<CSN>> |
getSnapshot()
Returns a snapshot of this object.
|
int |
hashCode() |
boolean |
isEmpty()
Tests if the state is empty.
|
Iterator<Dn> |
iterator() |
boolean |
removeCSN(Dn baseDN,
CSN expectedCSN)
Removes the mapping to the provided CSN if it is present in this MultiDomainServerState.
|
void |
replace(Dn baseDN,
ServerState serverState)
Replace the ServerState of the provided baseDN with the provided server state.
|
String |
toString() |
boolean |
update(Dn baseDN,
CSN csn)
Update the ServerState of the provided baseDN with the replication
CSN provided. |
void |
update(Dn baseDN,
ServerState serverState)
Update the ServerState of the provided baseDN with the provided server state.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public MultiDomainServerState()
public MultiDomainServerState(MultiDomainServerState cookie)
cookie
- the cookie to copypublic MultiDomainServerState(String cookie) throws LdapException
cookie
- The provided string representation of the state.LdapException
- when the string has an invalid formatpublic boolean update(Dn baseDN, CSN csn)
CSN
provided.baseDN
- The provided baseDN.csn
- The provided CSN.public void update(Dn baseDN, ServerState serverState)
baseDN
- The provided baseDN.serverState
- The provided serverState.public void replace(Dn baseDN, ServerState serverState)
baseDN
- The provided baseDN.serverState
- The provided serverState.public Map<Dn,Set<CSN>> getSnapshot()
public boolean isEmpty()
public ServerState getServerState(Dn baseDN)
baseDN
- the replication domain's baseDNpublic CSN getCSN(Dn baseDN, ReplicaId replicaId)
baseDN
- the replication domain's baseDNreplicaId
- the replicaIdpublic boolean removeCSN(Dn baseDN, CSN expectedCSN)
baseDN
- the replication domain's baseDNexpectedCSN
- the CSN to be removedCopyright 2010-2022 ForgeRock AS.