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(String mdss)
Create an object from a string representation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empty the object..
|
boolean |
cover(DN baseDN,
CSN csn)
Test if this object covers the provided CSN for the provided baseDN.
|
boolean |
cover(MultiDomainServerState covered)
Test if this object covers the provided covered object.
|
boolean |
equalsTo(MultiDomainServerState other)
Test if this object equals the provided other object.
|
CSN |
getCSN(DN baseDN,
int serverId)
Returns the CSN associated to the provided replication domain's baseDN and
serverId.
|
org.forgerock.util.Pair<DN,CSN> |
getOldestCSNExcluding(MultiDomainServerState excludedCSNs)
Returns the oldest Pair<DN, CSN> held in current object, excluding
the provided CSNs.
|
ServerState |
getServerState(DN baseDN)
Returns the ServerState associated to the provided replication domain's
baseDN.
|
Map<DN,List<CSN>> |
getSnapshot()
Returns a snapshot of this object.
|
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()
Returns a string representation of this object.
|
void |
toString(StringBuilder buffer)
Dump a string representation in the provided buffer.
|
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.
|
void |
update(MultiDomainServerState state)
Update the current object with the provided multi domain server state.
|
public MultiDomainServerState()
public MultiDomainServerState(String mdss) throws DirectoryException
mdss - The provided string representation of the state.DirectoryException - when the string has an invalid formatpublic void clear()
public 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 void update(MultiDomainServerState state)
state - The provided multi domain server state.public Map<DN,List<CSN>> getSnapshot()
public void toString(StringBuilder buffer)
buffer - The provided buffer.public boolean isEmpty()
public ServerState getServerState(DN baseDN)
baseDN - the replication domain's baseDNpublic CSN getCSN(DN baseDN, int serverId)
baseDN - the replication domain's baseDNserverId - the serverIdpublic org.forgerock.util.Pair<DN,CSN> getOldestCSNExcluding(MultiDomainServerState excludedCSNs)
excludedCSNs - the CSNs that cannot be returnedPair.EMPTY if no such
older CSN exists.public boolean removeCSN(DN baseDN, CSN expectedCSN)
baseDN - the replication domain's baseDNexpectedCSN - the CSN to be removedpublic boolean equalsTo(MultiDomainServerState other)
other - The other object with which we want to test equality.public boolean cover(MultiDomainServerState covered)
covered - The provided object.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.