org.opends.server.replication.server
Class MonitorData

java.lang.Object
  extended by org.opends.server.replication.server.MonitorData

public class MonitorData
extends java.lang.Object

This class defines the Monitor Data that are consolidated across the whole replication topology.


Constructor Summary
MonitorData()
           
 
Method Summary
 void completeComputing()
          Build the monitor data that are computed from the collected ones.
 long getApproxDelay(short serverId)
          Get an approximation of the latency delay of the replication.
 long getApproxFirstMissingDate(short serverId)
          Get an approximation of the date of the first missing update.
 long getBuildDate()
          Returns the build date of the data.
 ServerState getLDAPServerState(short serverId)
          Get the state of the LDAP server with the provided serverId.
 ChangeNumber getMaxCN(short serverId)
          Get the highest know change number of the LDAP server with the provided serverId.
 long getMissingChanges(short serverId)
          Get the number of missing changes.
 void setBuildDate(long buildDate)
          Sets the build date of the data.
 void setFirstMissingDate(short serverId, java.lang.Long newFmd)
          Set the state of the LDAP server with the provided serverId.
 void setLDAPServerState(short serverId, ServerState state)
          Set the state of the LDAP server with the provided serverId.
 void setMaxCN(short serverId, ChangeNumber newCN)
          For the provided serverId, sets the provided CN as the max if it is newer than the current max.
 void setMaxCNs(ServerState state)
          From a provided state, sets the max CN of the monitor data.
 java.lang.String toString()
          Returns a String object representing this object's value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitorData

public MonitorData()
Method Detail

getApproxDelay

public long getApproxDelay(short serverId)
Get an approximation of the latency delay of the replication.

Parameters:
serverId - The server ID.
Returns:
The delay

getApproxFirstMissingDate

public long getApproxFirstMissingDate(short serverId)
Get an approximation of the date of the first missing update.

Parameters:
serverId - The server ID.
Returns:
The date.

getMissingChanges

public long getMissingChanges(short serverId)
Get the number of missing changes.

Parameters:
serverId - The server ID.
Returns:
The number of missing changes.

completeComputing

public void completeComputing()
Build the monitor data that are computed from the collected ones.


toString

public java.lang.String toString()
Returns a String object representing this object's value.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the value of this object in

setBuildDate

public void setBuildDate(long buildDate)
Sets the build date of the data.

Parameters:
buildDate - The date.

getBuildDate

public long getBuildDate()
Returns the build date of the data.

Returns:
The date.

setMaxCNs

public void setMaxCNs(ServerState state)
From a provided state, sets the max CN of the monitor data.

Parameters:
state - the provided state.

setMaxCN

public void setMaxCN(short serverId,
                     ChangeNumber newCN)
For the provided serverId, sets the provided CN as the max if it is newer than the current max.

Parameters:
serverId - the provided serverId
newCN - the provided new CN

getMaxCN

public ChangeNumber getMaxCN(short serverId)
Get the highest know change number of the LDAP server with the provided serverId.

Parameters:
serverId - The server ID.
Returns:
The highest change number.

getLDAPServerState

public ServerState getLDAPServerState(short serverId)
Get the state of the LDAP server with the provided serverId.

Parameters:
serverId - The server ID.
Returns:
The server state.

setLDAPServerState

public void setLDAPServerState(short serverId,
                               ServerState state)
Set the state of the LDAP server with the provided serverId.

Parameters:
serverId - The server ID.
state - The server state.

setFirstMissingDate

public void setFirstMissingDate(short serverId,
                                java.lang.Long newFmd)
Set the state of the LDAP server with the provided serverId.

Parameters:
serverId - The server ID.
newFmd - The first missing date.