Sybil: Refactoring part 5

Make Analysis class singleton, hang off ClientAppManager
prep for offline scheduling
This commit is contained in:
zzz
2018-12-16 14:44:37 +00:00
parent fa0d63f40f
commit 2a805dddf5
4 changed files with 110 additions and 7 deletions

View File

@@ -34,6 +34,7 @@ import net.i2p.jetty.I2PLogger;
import net.i2p.router.RouterContext;
import net.i2p.router.app.RouterApp;
import net.i2p.router.news.NewsManager;
import net.i2p.router.sybil.Analysis;
import net.i2p.router.update.ConsoleUpdateManager;
import net.i2p.util.Addresses;
import net.i2p.util.FileSuffixFilter;
@@ -865,6 +866,13 @@ public class RouterConsoleRunner implements RouterApp {
if (_mgr == null)
_context.addShutdownTask(new ServerShutdown());
ConfigServiceHandler.registerSignalHandler(_context);
if (_mgr != null &&
_context.getBooleanProperty(HelperBase.PROP_ADVANCED) &&
_context.getProperty(Analysis.PROP_FREQUENCY, 0L) > 0) {
// registers and starts itself
Analysis.getInstance(_context);
}
}
/**