public synchronized List<KeyRegistrationRecord> getNearestPeers( final String inBase64Key, final int inNumber, boolean updateRefreshTime ) {
		
		if( isRegistered(inBase64Key) == false ) {
			return null;
		}
		
		if( updateRefreshTime ) {
			updateRefreshTime(inBase64Key);
		}
		
		Set<KeyRegistrationRecord> out = new HashSet<KeyRegistrationRecord>();
		
		int ourIndex = Collections.binarySearch(peers, new KeyRegistrationRecord(inBase64Key));
		if( ourIndex < 0 ) {
			System.err.println("Inconsist DB/memory state wrt peer: " + inBase64Key);
			return null;
		}
		
		for( int i=1; i<=inNumber/2; i++ ) {
			int plus = (ourIndex+i) % peers.size();
			if( plus != ourIndex ) {
				out.add(peers.get(plus));
			}
			
			int minus = (ourIndex-i) % peers.size();
			if( minus != ourIndex ) {	
				out.add(peers.get(minus >= 0 ? minus : (peers.size() - 1 + minus)));
			}
		}
		
		return Arrays.asList(out.toArray(new KeyRegistrationRecord[0]));
	}