Class FailoverGroups.ErrorInfo

java.lang.Object
com.isode.dsapi.config.FailoverGroups.ErrorInfo
Enclosing class:
FailoverGroups

public static class FailoverGroups.ErrorInfo extends Object
Contains information about something that's not right. Various factory methods are used to create ErrorInfo objects describing different types of error
  • Method Details

    • getErrorType

      public FailoverGroups.ErrorType getErrorType()
      Determine what type of error it is
      Returns:
      an ErrorType
    • getErrorTypeString

      public String getErrorTypeString()
      Get the error type as a label.
      Returns:
      User friendly label representing error type.
      Since:
      16.3
    • dsaInMultipleGroups

      public static FailoverGroups.ErrorInfo dsaInMultipleGroups(DN dsaDN)
      Create an ErrorInfo object for SAME_DSA_IN_MULTIPLE_GROUPS
      Parameters:
      dsaDN - the DSA
      Returns:
      the ErrorInfo object
    • membershipDisputed

      public static FailoverGroups.ErrorInfo membershipDisputed(DN groupDN, DN dsaDN)
      Create an ErrorInfo object for MEMBERSHIP_DISPUTED
      Parameters:
      groupDN - the group DN
      dsaDN - the DSA
      Returns:
      the ErrorInfo object
    • multipleMasters

      public static FailoverGroups.ErrorInfo multipleMasters(DN groupDN, Set<DN> masters)
      Create an ErrorInfo object for GROUP_HAS_MULTIPLE_MASTERS
      Parameters:
      groupDN - the group in question
      masters - the DSAs that people are claiming are masters
      Returns:
      the ErrorInfo object
    • inconsistentMemberShip

      public static FailoverGroups.ErrorInfo inconsistentMemberShip(DN groupDN)
      Create an ErrorInfo object for GROUP_HAS_INCONSISTENT_MEMBERSHIP
      Parameters:
      groupDN - the group in question
      Returns:
      the ErrorInfo object
    • groupWithoutMaster

      public static FailoverGroups.ErrorInfo groupWithoutMaster(DN groupDN)
      Create an ErrorInfo object for GROUP_HAS_NO_MASTER
      Parameters:
      groupDN - the group in question
      Returns:
      the ErrorInfo object
    • groupWithNoMembers

      public static FailoverGroups.ErrorInfo groupWithNoMembers(DN groupDN)
      Create an ErrorInfo object for GROUP_HAS_NO_MEMBERS
      Parameters:
      groupDN - the group in question
      Returns:
      the ErrorInfo object
    • groupWithNonMemberMaster

      public static FailoverGroups.ErrorInfo groupWithNonMemberMaster(DN groupDN, DN masterDN)
      Create an ErrorInfo object for GROUP_HAS_MASTER_WHICH_IS_NOT_MEMBER
      Parameters:
      groupDN - the group in question
      masterDN - the supposed master of the group
      Returns:
      the ErrorInfo object
    • memberWithIncorrectMemberList

      public static FailoverGroups.ErrorInfo memberWithIncorrectMemberList(DN groupDN, DN memberDN)
      Create an ErrorInfo object for MEMBER_HAS_INCORRECT_MEMBERLIST
      Parameters:
      groupDN - the group DN
      memberDN - the member in question
      Returns:
      the ErrorInfo object
    • memberHasMasterWhichIsNotMember

      public static FailoverGroups.ErrorInfo memberHasMasterWhichIsNotMember(DN memberDN, DN masterDN)
      Create an ErrorInfo object for MEMBER_HAS_MASTER_WHICH_IS_NOT_MEMBER
      Parameters:
      memberDN - the member with the problem
      masterDN - the master which the member names
      Returns:
      the ErrorInfo object
    • memberReportsWrongMaster

      public static FailoverGroups.ErrorInfo memberReportsWrongMaster(DN memberDN, DN masterDN)
      Create an ErrorInfo object for MEMBER_REPORTS_WRONG_MASTER
      Parameters:
      memberDN - the member with the problem
      masterDN - the person who it thinks is the master
      Returns:
      the ErrorInfo object
    • getGroupWithError

      public DN getGroupWithError()
      Return the DN of the group which this error relates to.
      Returns:
      a DN, which will be null for an error that isn't about a group (e.g. SAME_DSA_IN_MULTIPLE_GROUPS)
    • getMemberWithError

      public DN getMemberWithError()
      Return the DN of the member which this error relates to.
      Returns:
      a DN, which will be null for an error that isn't about a member (e.g. GROUP_HAS_NO_MASTER)
    • toString

      public String toString()
      Return string representation of this object, for debugging
      Overrides:
      toString in class Object
      Returns:
      String representation