code: public ConsistentHashRing getRing(String type) {
  		ConsistentHashRing ring = rings.get(type);
  		if (ring != null) {
  			return ring;
  		}
  		if (type == null) {
  			//If there's no ring without a type, then any type will do
  			//Use weighted random among the types, based on how many servers are serving each type
  			int selection = rand.nextInt() % totalServers;
  			for (ConsistentHashRing candidateRing: rings.values()) {
  				if (selection <= 0) {
  					return candidateRing;
  				} else {
  					selection -= candidateRing.size();
  				}
  			}
  			//It's possible there are no rings
  			Preconditions.checkState(totalServers == 0, "It shouldn't be possible to get here, " +
  					"unless there are no rings");
  			return null;
  		} else {
  			//If there's no server for this type, then pick one without a type
  			return rings.get(null);
  		}
  	}
docs: Get the server ring for a particular type.
  
  Notes on running time:
  if type != null: O(1)
  if type == null and there is at least 1 service with null type: O(1)
  otherwise: O(N) where N is the number of types
  
  @param type
  @return