Package io.kroxylicious.proxy.reload
Interface ReconfigureResult
public interface ReconfigureResult
Outcome of a
KafkaProxy.reconfigure(Configuration) call. Reports the per-component
failures encountered while reconfiguring; an empty errors() collection indicates
the reconfigure succeeded with no failed components.
The interface is deliberately minimal: it only enumerates what failed and
why, and leaves any reaction to the caller. Failure-handling policy (whether to
shut down on partial failure, attempt a rollback, alert, or retry) is expressed by the
caller via the CompletableFuture.whenComplete(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>) pattern on the
future returned by reconfigure(); the proxy itself takes no policy action based
on errors().
-
Method Summary
Modifier and TypeMethodDescriptionerrors()Returns the per-component failures encountered while reconfiguring.default booleanConvenience predicate equivalent to!errors().isEmpty().static ReconfigureResultof(Collection<ReconfigureError> errors) Returns aReconfigureResultbacked by an immutable copy of the given errors.
-
Method Details
-
errors
Collection<ReconfigureError> errors()Returns the per-component failures encountered while reconfiguring. One entry per failed component (e.g. one virtual cluster, one referenced filter). Empty when the reconfigure succeeded with no failed components.The returned collection is immutable; iteration order is unspecified.
-
hasErrors
default boolean hasErrors()Convenience predicate equivalent to!errors().isEmpty(). -
of
Returns aReconfigureResultbacked by an immutable copy of the given errors. Intended for testing and for the proxy's internal implementation; embedders normally receiveReconfigureResultinstances via the future returned fromKafkaProxy.reconfigure(Configuration)and do not construct their own.- Parameters:
errors- per-component failures; must not benull, but may be empty- Returns:
- an immutable result whose
errors()reflects the supplied collection - Throws:
NullPointerException- iferrorsisnull
-