Distributed KD-Trees implementation using java threads