code: @Override
      public int compareTo(HandlerHolder holderToCompare) {
  
          if (holderToCompare == this || this.serviceId == holderToCompare.serviceId)
              return 0;
  
          // service ranking is higher to lower
          int compare = holderToCompare.serviceRanking - this.serviceRanking;
          if (compare == 0) {
              // service id is lower to higher
              return holderToCompare.serviceId > this.serviceId ? -1 : 1;
          }
  
          // service ranking is higher to lower
          // Can't get here with equal ranking, falls into compare block w/
          // non-equal service ids.
          return holderToCompare.serviceRanking > this.serviceRanking ? 1 : -1;
      }
docs: Compare two handlers: if there are somehow two handlerholders for the
  same service (by instance of holder, or by service id), 0 will be
  returned.
  
  Holders are otherwise sorted by service ranking (higher .. lower), and
  then by service id (lower .. higher).
  
  Compares this object with the specified object for order. Returns a
  negative integer, zero, or a positive integer as this object is less
  than, equal to, or greater than the specified object.