Class ParserTable.TestIIOPPrimaryToContactInfo

    • Constructor Detail

      • TestIIOPPrimaryToContactInfo

        public TestIIOPPrimaryToContactInfo()
    • Method Detail

      • hasNext

        public boolean hasNext​(ContactInfo primary,
                               ContactInfo previous,
                               java.util.List contactInfos)
        Specified by:
        hasNext in interface IIOPPrimaryToContactInfo
        Parameters:
        primary - the key.
        previous - if null return true. Otherwise, find previous in contactInfos and if another ContactInfo follows it in the list then return true. Otherwise false.
        contactInfos - the list of replicas associated with the primary.
        Returns:
        if there is another
      • next

        public ContactInfo next​(ContactInfo primary,
                                ContactInfo previous,
                                java.util.List contactInfos)
        Specified by:
        next in interface IIOPPrimaryToContactInfo
        Parameters:
        primary - the key.
        previous - if null then map primary to failover. If failover is empty then map primary to first ContactInfo in contactInfos and mapped entry. If failover is non-empty then return failover. If previous is non-null that indicates that the previous failed. Therefore, find previous in contactInfos. Map the ContactInfo following previous to primary and return that ContactInfo.
        contactInfos - the list of replicas associated with the primary.
        Returns:
        the next ContactInfo