Search in sources :

Example 1 with ReadConfigJob

use of net.i2p.router.tasks.ReadConfigJob in project i2p.i2p by i2p.

the class BootCommSystemJob method runJob.

public void runJob() {
    // The netDb and the peer manager both take a long time to start up,
    // as they may have to read in ~1000 files or more each
    // So turn on the multiple job queues and start these two first.
    // These two (plus the current job) will consume 3 of the 4 runners,
    // leaving one for everything else, which allows us to start without
    // a huge job lag displayed on the console.
    getContext().jobQueue().allowParallelOperation();
    startupDb();
    getContext().jobQueue().addJob(new BootPeerManagerJob(getContext()));
    // start up the network comm system
    getContext().commSystem().startup();
    getContext().tunnelManager().startup();
    // start I2CP
    getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext()));
    if (!SystemVersion.isAndroid()) {
        Job j = new ReadConfigJob(getContext());
        j.getTiming().setStartAfter(getContext().clock().now() + 2 * 60 * 1000);
        getContext().jobQueue().addJob(j);
    }
    ((RouterClock) getContext().clock()).addShiftListener(getContext().router());
}
Also used : ReadConfigJob(net.i2p.router.tasks.ReadConfigJob) Job(net.i2p.router.Job) ReadConfigJob(net.i2p.router.tasks.ReadConfigJob) RouterClock(net.i2p.router.RouterClock)

Aggregations

Job (net.i2p.router.Job)1 RouterClock (net.i2p.router.RouterClock)1 ReadConfigJob (net.i2p.router.tasks.ReadConfigJob)1