/** * DHT - get random keys to explore */ public List<NID> getExploreKeys() { return _kad.getExploreKeys(MAX_BUCKET_AGE); }
/** * Run through all kbuckets with too few routers and generate a random key * for it, with a maximum number of keys limited by the exploration pool size * */ private Collection<Hash> selectKeysToExplore() { Set<Hash> alreadyQueued = _facade.getExploreKeys(); if (alreadyQueued.size() > KademliaNetworkDatabaseFacade.MAX_EXPLORE_QUEUE) return null; return _facade.getKBuckets().getExploreKeys(OLD_BUCKET_TIME); }
/** @since 0.9.10 */ public void testExplore() { List<Hash> keys = set.getExploreKeys(-1000); assertTrue(keys.size() > 0); }