code: public void registerKvState(KeyGroupRange keyGroupRange, KvStateID kvStateId, InetSocketAddress kvStateAddress) {
  
  		if (keyGroupRange.getStartKeyGroup() < 0 || keyGroupRange.getEndKeyGroup() >= numKeyGroups) {
  			throw new IndexOutOfBoundsException("Key group index");
  		}
  
  		for (int kgIdx = keyGroupRange.getStartKeyGroup(); kgIdx <= keyGroupRange.getEndKeyGroup(); ++kgIdx) {
  
  			if (kvStateIds[kgIdx] == null && kvStateAddresses[kgIdx] == null) {
  				numRegisteredKeyGroups++;
  			}
  
  			kvStateIds[kgIdx] = kvStateId;
  			kvStateAddresses[kgIdx] = kvStateAddress;
  		}
  	}
docs: Registers a KvState instance for the given key group index.
  
  @param keyGroupRange  Key group range to register
  @param kvStateId      ID of the KvState instance at the key group index.
  @param kvStateAddress Server address of the KvState instance at the key group index.
  @throws IndexOutOfBoundsException If key group range start < 0 or key group range end >= Number of key groups