Class BaseDNDescriptor
- java.lang.Object
-
- org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor
-
- All Implemented Interfaces:
Comparable<BaseDNDescriptor>
public class BaseDNDescriptor extends Object implements Comparable<BaseDNDescriptor>
This class is used to represent a Base DN / Replica and is aimed to be used by the classes in the BackendTableModel class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseDNDescriptor.TypeAn enumeration describing the type of base DN for a given backend.
-
Constructor Summary
Constructors Constructor Description BaseDNDescriptor(BaseDNDescriptor.Type type, DN baseDn, BackendDescriptor backend, int nEntries, long ageOfOldestMissingChange, int missingChanges)Constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BaseDNDescriptor desc)booleanequals(Object v)longgetAgeOfOldestMissingChange()Returns the age of the oldest missing change in seconds in the replication topology for this base DN.BackendDescriptorgetBackend()Returns the backend where this base DN is defined.DNgetDn()Return the String DN associated with the base DN..intgetEntries()Returns the number of entries in the backend for this base DN.intgetMissingChanges()Returns the number of missing changes in the replication topology for this base DN.intgetReplicaID()Returns the ID of the replication domain associated with this base DN. -1 if this base DN is not replicated.BaseDNDescriptor.TypegetType()Returns the type for this base DN.inthashCode()voidsetAgeOfOldestMissingChange(long ageOfOldestMissingChange)Sets the age of the oldest missing change in seconds in the replication topology for this base DN.voidsetBackend(BackendDescriptor backend)Sets the backend of this base DN.voidsetEntries(int nEntries)Sets the number of entries for this base DN in this database.voidsetMissingChanges(int missingChanges)Sets the number of missing changes in the replication topology for this base DN.voidsetReplicaID(int replicaID)Sets the ID of the replication domain associated with this base DN.voidsetType(BaseDNDescriptor.Type type)Sets the type of this base DN.StringtoString()
-
-
-
Constructor Detail
-
BaseDNDescriptor
public BaseDNDescriptor(BaseDNDescriptor.Type type, DN baseDn, BackendDescriptor backend, int nEntries, long ageOfOldestMissingChange, int missingChanges)
Constructor for this class.- Parameters:
type- the type of replication.baseDn- the base DN associated with the Replication.backend- the backend containing this base DN.nEntries- the number of entries for the base DN.ageOfOldestMissingChange- the number of missing changes.missingChanges- the number of missing changes.
-
-
Method Detail
-
getDn
public DN getDn()
Return the String DN associated with the base DN..- Returns:
- the String DN associated with the base DN.
-
compareTo
public int compareTo(BaseDNDescriptor desc)
- Specified by:
compareToin interfaceComparable<BaseDNDescriptor>
-
getEntries
public int getEntries()
Returns the number of entries in the backend for this base DN.- Returns:
- the number of entries in the backend for this base DN.
-
getMissingChanges
public int getMissingChanges()
Returns the number of missing changes in the replication topology for this base DN.- Returns:
- the number of missing changes in the replication topology for this base DN.
-
setMissingChanges
public void setMissingChanges(int missingChanges)
Sets the number of missing changes in the replication topology for this base DN.- Parameters:
missingChanges- the missing changes.
-
getAgeOfOldestMissingChange
public long getAgeOfOldestMissingChange()
Returns the age of the oldest missing change in seconds in the replication topology for this base DN.- Returns:
- the age of the oldest missing change in seconds in the replication topology for this base DN.
-
setAgeOfOldestMissingChange
public void setAgeOfOldestMissingChange(long ageOfOldestMissingChange)
Sets the age of the oldest missing change in seconds in the replication topology for this base DN.- Parameters:
ageOfOldestMissingChange- the age of the oldest missing change in seconds in the replication topology for this base DN.
-
getType
public BaseDNDescriptor.Type getType()
Returns the type for this base DN.- Returns:
- the type for this base DN.
-
getBackend
public BackendDescriptor getBackend()
Returns the backend where this base DN is defined.- Returns:
- the backend where this base DN is defined.
-
setBackend
public void setBackend(BackendDescriptor backend)
Sets the backend of this base DN.- Parameters:
backend- the backend for this base DN.
-
setType
public void setType(BaseDNDescriptor.Type type)
Sets the type of this base DN.- Parameters:
type- the new type for this base DN.
-
setEntries
public void setEntries(int nEntries)
Sets the number of entries for this base DN in this database.- Parameters:
nEntries- the number of entries.
-
getReplicaID
public int getReplicaID()
Returns the ID of the replication domain associated with this base DN. -1 if this base DN is not replicated.- Returns:
- the ID of the replication domain associated with this base DN.
-
setReplicaID
public void setReplicaID(int replicaID)
Sets the ID of the replication domain associated with this base DN.- Parameters:
replicaID- the ID of the replication domain associated with this base DN.
-
-