Interface ReloadStrategy

All Superinterfaces:
AutoCloseable, CamelContextAware, HasCamelContext, Service, StaticService
All Known Subinterfaces:
ContextReloadStrategy, ResourceReloadStrategy

public interface ReloadStrategy extends StaticService, CamelContextAware
SPI strategy for reloading Camel at runtime when a change is detected.

A reload is triggered via onReload(Object), and the strategy tracks success and failure counts (getReloadCounter(), getFailedCounter()) and the last error. Concrete strategies target different scopes: ContextReloadStrategy reloads routes and property placeholders in the running context, while ResourceReloadStrategy reloads from changed Resources.

See Context Reload in the Camel user manual.

See Also:
  • Method Details

    • onReload

      void onReload(Object source)
      Trigger reload.
      Parameters:
      source - source that triggers the reloading.
    • getReloadCounter

      int getReloadCounter()
      Number of reloads succeeded.
    • getFailedCounter

      int getFailedCounter()
      Number of reloads failed.
    • resetCounters

      void resetCounters()
      Reset the counters.
    • getLastError

      @Nullable Exception getLastError()
      Gets the last error if reloading failed