Interface ReloadStrategy
- All Superinterfaces:
AutoCloseable, CamelContextAware, HasCamelContext, Service, StaticService
- All Known Subinterfaces:
ContextReloadStrategy, ResourceReloadStrategy
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 Summary
Modifier and TypeMethodDescriptionintNumber of reloads failed.@Nullable ExceptionGets the last error if reloading failedintNumber of reloads succeeded.voidTrigger reload.voidReset the counters.Methods inherited from interface CamelContextAware
setCamelContextMethods inherited from interface HasCamelContext
getCamelContext
-
Method Details
-
onReload
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
-