Class InstanceCleanup

All Implemented Interfaces:
Closeable, AutoCloseable

public class InstanceCleanup extends Object implements Closeable
A background task that purges stale registrations. You should allocate a singleton of this class, call start() and then call close() when your application is shutting down.
  • Constructor Details

    • InstanceCleanup

      public InstanceCleanup(ServiceDiscovery<?> discovery, int instanceRefreshMs)
      discovery - the service being monitored
      instanceRefreshMs - time in milliseconds to consider a registration stale
  • Method Details