java.lang.Object
net.i2p.util.SimpleTimer2.TimedEvent
net.i2p.router.tunnel.pool.RequestThrottler.Cleaner
All Implemented Interfaces:
Runnable
Enclosing class:
RequestThrottler

private class RequestThrottler.Cleanerextends SimpleTimer2.TimedEvent
Periodic timer event that clears the request counts to reset throttling. Reschedules itself each run so the counter is cleared every CLEAN_TIME; without the reschedule the counter would clear only once then grow unbounded, leaking memory and eventually rejecting requests on stale accumulated counts.
  • Constructor Details

    • Cleaner

      public Cleaner()
      Schedules the periodic counter cleanup.
  • Method Details

    • timeReached

      public void timeReached()
      Description copied from class: SimpleTimer2.TimedEvent
      Called when this event's scheduled time arrives. Must NOT block. For periodic events, call schedule(period) at the end to self-reschedule.
      Specified by:
      timeReached in class SimpleTimer2.TimedEvent