} catch (ClassNotFoundException e) {
throw new RuntimeException("Wrong DistanceMeasurer implementation "
+ distanceClass + " provided");
}
} else {
distanceMeasurer = new EuclidianDistance();
}
maxIterations = peer.getConfiguration().getInt(MAX_ITERATIONS_KEY, -1);
// normally we want to rely on OS caching, but if not, we can cache in heap
if (peer.getConfiguration().getBoolean(CACHING_ENABLED_KEY, false)) {