Class GUIDHelper.GUIDResolver

  • Enclosing class:
    GUIDHelper

    public static class GUIDHelper.GUIDResolver
    extends Base
    Resolver used during a recovery to discover the newest available GUID for a given partition.
    • Field Detail

      • f_mapGUID

        protected final Map<Member,​String[]> f_mapGUID
        The Map of registered GUIDs, keyed by member.
      • m_cPartitions

        protected int m_cPartitions
        The partition-count.
      • m_asGUIDNewest

        protected String[] m_asGUIDNewest
        The resolved list of the newest GUIDs, indexed by partition-id.
      • m_mapResolved

        protected Map<Member,​PartitionSet> m_mapResolved
        The resolved map of members to the associated set of partitions.
      • m_partsUnresolved

        protected PartitionSet m_partsUnresolved
        The PartitionSet containing partitions that don't have corresponding GUIDs.
      • m_fSharedStorage

        protected boolean m_fSharedStorage
        Specifies whether or not the storage is shared. If true, every member can see all the newest partition stores.
    • Constructor Detail

      • GUIDResolver

        public GUIDResolver​(int cPartitions)
        Construct a GUIDResolver for the specified partition-count.
        Parameters:
        cPartitions - the partition-count
    • Method Detail

      • registerGUIDs

        public void registerGUIDs​(Member member,
                                  String[] asGUID)
        Register the specified list of GUIDs from the specified member.
        Parameters:
        member - the member
        asGUID - the list of GUIDs
      • getNewestGUID

        public String getNewestGUID​(int nPartition)
        Return the newest GUID for the specified partition.
        Parameters:
        nPartition - the partition to return a GUID for
        Returns:
        the newest GUIDs
      • getNewestGUIDs

        public String[] getNewestGUIDs​(PartitionSet parts)
        Return the list of the newest GUIDs for the specified set of partitions.
        Parameters:
        parts - the set of partitions to return GUIDs for
        Returns:
        the list of newest GUIDs
      • getUnresolvedPartitions

        public PartitionSet getUnresolvedPartitions()
        Retrieve a PartitionSet containing all partitions that don't have any corresponding GUIDs.
        Returns:
        a PartitionSet of all unresolved partitions
      • getMemberGUIDs

        public Map<Integer,​String[]> getMemberGUIDs()
        Return a Map of member id to an array of GUIDs.
        Returns:
        a Map of member id to an array of GUIDs
      • isSharedStorage

        public boolean isSharedStorage()
        Check whether ior not all the partition stores visible by every member.
        Returns:
        true iff all the partition stores visible by every member
      • resolve

        public Map<Member,​PartitionSet> resolve()
        Resolve the registered GUIDs and return a map associating each member to the set of partitions that it had registered as having the newest GUID for.
        Returns:
        a map associating each member to the set of partitions it has the latest GUID for