public INeighborDeterminator getNeighbors() {
return new INeighborDeterminator() {
@Override
public Collection<OverlayContact> getNeighbors() {
if (routingTable == null)
return Collections.emptySet();
return routingTable.getNeighbors();
}
};
}
The new INeighborDeterminator will always return an empty set since
the routingTable variable is not used by the ChordNode class. I think
this problem could be resolved by using the getter for the routing
table. This way it is possible to get content of the routingTable
variable of the ChordNode class.
Am I right that the current implementation is wrong?
Does anybody see any issues with my proposed fix for this problem?
I'm talking about the ChordNode class from the package
de.tud.kom.p2psim.impl.overlay.dht.chord.chord.components.
the problem seems to exist and your workaround helps.
Good point, you idea will be included in the next version of the
simulator.
public INeighborDeterminator getNeighbors() {
return new INeighborDeterminator() {
@Override
public Collection<OverlayContact> getNeighbors() {
if (getChordRoutingTable() == null)
return Collections.emptySet();
return getChordRoutingTable().getNeighbors();
}
};