-/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2012-2019. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
Msg.debug("Adding " + id + " to my routing table");
bucket.add(id);
if (bucket.size() > Common.BUCKET_SIZE) {
- //TODO: Ping the least seen guy and remove him if he is offline.
+ // TODO
+ Msg.debug("Should ping the least seen guy and remove him if he is offline.");
}
}
}
//We sort the list
Collections.sort(answer.getNodes());
//We trim the list
- while (answer.size() > Common.BUCKET_SIZE) {
- answer.remove(answer.size() - 1); //TODO: Not the best thing.
- }
+ answer.trim();
+
return answer;
}