net.i2p.router.tasks

## Class Restarter

- java.lang.Object
- - net.i2p.router.tasks.Restarter

- All Implemented Interfaces:
    Runnable

      public class Restarter
      extends Object
      implements Runnable

  Router restarter implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Restarter(RouterContext ctx)` Create a new router restarter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` Perform a soft restart of the router.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Restarter

          public Restarter(RouterContext ctx)

      Create a new router restarter.
      Parameters:
        `ctx` - the router context for accessing router services

  - ### Method Detail

    - #### 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`