java.lang.Object
net.i2p.router.tasks.Restarter
All Implemented Interfaces:
Runnable

public class Restarterextends Object implements Runnable
Router restarter implementation.
  • Field Details

    • _context

      private final RouterContext _context
      The router to restart.
  • Constructor Details

    • Restarter

      public Restarter(RouterContext ctx)
      Create a new router restarter.
      Parameters:
      ctx - the router context for accessing router services
  • Method Details

    • run

      public void run()
      Perform a soft restart of the router.

      This method gracefully restarts all major router components in sequence:

      • Stops the client manager
      • Reinitializes the bandwidth limiter
      • Restarts the message registry and communication system
      • Restarts the tunnel manager
      • Waits for components to stabilize
      • Restarts the client manager and message pool
      • Rebuilds router info and marks router as alive

      The restart process is designed to minimize downtime and maintain network connectivity where possible.

      Specified by:
      run in interface Runnable