Class ConfigurationReloadOrchestrator
java.lang.Object
io.kroxylicious.proxy.internal.reload.ConfigurationReloadOrchestrator
Internal class that owns the
KafkaProxy.reconfigure(Configuration) pipeline.
Not part of any public API; embedders interact with the proxy only via
KafkaProxy.reconfigure(), which delegates here privately.
This class is a coordinator. The mechanics of applying changes to individual virtual
clusters live in ClusterOperation implementations under the operations
subpackage. The orchestrator's job is sequencing:
- Concurrency control — serialise overlapping reconfigure calls via
ReentrantLock.tryLock(); a second concurrent call getsConcurrentReconfigureExceptionimmediately. - Pre-flight validation — reject submissions that differ in any static section
via
StaticSectionDiffer, surfacingStaticConfigurationChangedException. - Change detection — delegate to the
ChangeDetectorpipeline to compute the set of per-VC adds/removes/modifies. - Planning — delegate to
OperationsPlannerfor the ordered list of per-VC operations. - Execution — apply each operation, aggregating per-cluster errors into the
ReconfigureResult. - Commit — advance
currentConfigurationto the submitted value.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationReloadOrchestrator(Configuration initialConfiguration, VirtualClusterRegistry virtualClusterRegistry, EndpointRegistry endpointRegistry, List<io.kroxylicious.proxy.internal.reload.ChangeDetector> detectors) -
Method Summary
Modifier and TypeMethodDescriptionstatic List<io.kroxylicious.proxy.internal.reload.ChangeDetector> The production-default set of change detectors:VirtualClusterChangeDetectorandFilterChangeDetector.reconfigure(Configuration newConfig) ApplynewConfigto the running proxy.
-
Constructor Details
-
ConfigurationReloadOrchestrator
public ConfigurationReloadOrchestrator(Configuration initialConfiguration, VirtualClusterRegistry virtualClusterRegistry, EndpointRegistry endpointRegistry, List<io.kroxylicious.proxy.internal.reload.ChangeDetector> detectors)
-
-
Method Details
-
defaultDetectors
The production-default set of change detectors:VirtualClusterChangeDetectorandFilterChangeDetector. -
reconfigure
ApplynewConfigto the running proxy.- Returns:
- a future that completes:
- successfully with an empty-errors
ReconfigureResulton a no-op reconfigure (currentConfigurationstill advances) - successfully with a
ReconfigureResult(possibly with per-cluster errors) on any reconfigure (currentConfigurationadvances unconditionally — seecommit(io.kroxylicious.proxy.config.Configuration, java.util.List<io.kroxylicious.proxy.reload.ReconfigureError>)for rationale) - exceptionally with
StaticConfigurationChangedExceptionon static-section diff - exceptionally with
ConcurrentReconfigureExceptionon concurrent submission
- successfully with an empty-errors
-