Class SyncConsistentHashFactory.Builder

    • Field Detail

      • hashFunction

        protected final org.infinispan.commons.hash.Hash hashFunction
      • numOwners

        protected final int numOwners
      • actualNumOwners

        protected final int actualNumOwners
      • numSegments

        protected final int numSegments
      • sortedMembers

        protected final List<Address> sortedMembers
      • segmentSize

        protected final int segmentSize
      • segmentOwners

        protected final List<Address>[] segmentOwners
      • ignoreMaxSegments

        protected boolean ignoreMaxSegments
    • Constructor Detail

      • Builder

        protected Builder​(org.infinispan.commons.hash.Hash hashFunction,
                          int numOwners,
                          int numSegments,
                          List<Address> members,
                          Map<Address,​Float> capacityFactors)
    • Method Detail

      • addOwnerNoCheck

        protected void addOwnerNoCheck​(int segment,
                                       Address owner)
      • computeTotalCapacity

        protected float computeTotalCapacity()
      • copyOwners

        protected void copyOwners()
      • doCopyOwners

        protected void doCopyOwners()
      • canAddOwners

        protected boolean canAddOwners​(List<Address> owners)
      • nextSegment

        protected int nextSegment​(int segment)
      • populateOwners

        protected void populateOwners​(int numSegments)
      • populateExtraOwners

        protected void populateExtraOwners​(int numSegments)
      • getExpectedPrimarySegments

        protected double getExpectedPrimarySegments​(Address node)
      • getExpectedOwnedSegments

        protected double getExpectedOwnedSegments​(Address node)
      • addPrimaryOwner

        protected boolean addPrimaryOwner​(int segment,
                                          Address candidate)
      • addBackupOwner

        protected boolean addBackupOwner​(int segment,
                                         Address candidate)
      • normalizedHash

        protected int normalizedHash​(org.infinispan.commons.hash.Hash hashFunction,
                                     int hashcode)