Class ConfigurationReloadOrchestrator

java.lang.Object
io.kroxylicious.proxy.internal.reload.ConfigurationReloadOrchestrator

public class ConfigurationReloadOrchestrator extends Object
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 gets ConcurrentReconfigureException immediately.
  • Pre-flight validation — reject submissions that differ in any static section via StaticSectionDiffer, surfacing StaticConfigurationChangedException.
  • Change detection — delegate to the ChangeDetector pipeline to compute the set of per-VC adds/removes/modifies.
  • Planning — delegate to OperationsPlanner for the ordered list of per-VC operations.
  • Execution — apply each operation, aggregating per-cluster errors into the ReconfigureResult.
  • Commit — advance currentConfiguration to the submitted value.
  • Constructor Details

  • Method Details

    • defaultDetectors

      public static List<io.kroxylicious.proxy.internal.reload.ChangeDetector> defaultDetectors()
      The production-default set of change detectors: VirtualClusterChangeDetector and FilterChangeDetector.
    • reconfigure

      public CompletableFuture<ReconfigureResult> reconfigure(Configuration newConfig)
      Apply newConfig to the running proxy.
      Returns:
      a future that completes:
      • successfully with an empty-errors ReconfigureResult on a no-op reconfigure (currentConfiguration still advances)
      • successfully with a ReconfigureResult (possibly with per-cluster errors) on any reconfigure (currentConfiguration advances unconditionally — see commit(io.kroxylicious.proxy.config.Configuration, java.util.List<io.kroxylicious.proxy.reload.ReconfigureError>) for rationale)
      • exceptionally with StaticConfigurationChangedException on static-section diff
      • exceptionally with ConcurrentReconfigureException on concurrent submission