RoutingKeyGenerator:

- Move from core to RouterKeyGenerator in router.jar
  - Leave RoutingKeyGenerator as a simple abstract class
  - DatabaseEntry now uses timestamp instead of mod data
    to determine if mod data has changed. Don't expose
    mod data to DatabaseEntry any more.
  - I2PAppContext.routingKeyGenerator() now returns null;
    you must be in RouterContext to get a generator.
This commit is contained in:
zzz
2014-09-15 18:23:01 +00:00
parent f248a33eaa
commit c1e8ea0e4a
9 changed files with 309 additions and 219 deletions

View File

@ -199,10 +199,10 @@ public class NetDbRenderer {
FloodfillNetworkDatabaseFacade netdb = (FloodfillNetworkDatabaseFacade)_context.netDb();
buf.append("<p><b>Total Leasesets: ").append(leases.size());
buf.append("</b></p><p><b>Published (RAP) Leasesets: ").append(netdb.getKnownLeaseSets());
buf.append("</b></p><p><b>Mod Data: \"").append(DataHelper.getUTF8(_context.routingKeyGenerator().getModData()))
.append("\" Last Changed: ").append(new Date(_context.routingKeyGenerator().getLastChanged()));
buf.append("</b></p><p><b>Next Mod Data: \"").append(DataHelper.getUTF8(_context.routingKeyGenerator().getNextModData()))
.append("\" Change in: ").append(DataHelper.formatDuration(_context.routingKeyGenerator().getTimeTillMidnight()));
buf.append("</b></p><p><b>Mod Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getModData()))
.append("\" Last Changed: ").append(new Date(_context.routerKeyGenerator().getLastChanged()));
buf.append("</b></p><p><b>Next Mod Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getNextModData()))
.append("\" Change in: ").append(DataHelper.formatDuration(_context.routerKeyGenerator().getTimeTillMidnight()));
int ff = _context.peerManager().getPeersByCapability(FloodfillNetworkDatabaseFacade.CAPABILITY_FLOODFILL).size();
buf.append("</b></p><p><b>Known Floodfills: ").append(ff);
buf.append("</b></p><p><b>Currently Floodfill? ");