Class LocalShortcutCommandBusConnectorConfigurationEnhancer

java.lang.Object
io.axoniq.framework.messaging.commandhandling.distributed.LocalShortcutCommandBusConnectorConfigurationEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

@Internal public class LocalShortcutCommandBusConnectorConfigurationEnhancer extends Object implements ConfigurationEnhancer
A ConfigurationEnhancer that when a CommandBusConnector is present in the configuration may decorate it with a LocalShortcutCommandBusConnector wrapping a registered LocalCommandDispatchPredicate.
Since:
5.4.0
Author:
Allard Buijze
See Also:
  • Field Details

    • LOCAL_SHORTCUT_CONNECTOR_ORDER

      public static final int LOCAL_SHORTCUT_CONNECTOR_ORDER
      The order at which the LocalShortcutCommandBusConnector decorates the CommandBusConnector.

      Note that the LocalShortcutCommandBusConnector shortcut short-circuits the connector. On the local path the wrapped connector, and every decorator between this one and it, is never invoked. It must therefore wrap as far outside as practical, so that any decorator acting on a command because it is about to leave this node is bypassed when the command is handled locally.

      Since decorators are applied in ascending order and a higher order wraps a lower one, a value near the top of the range achieves this. Integer.MAX_VALUE is deliberately halved rather than used directly to leave room for other optional decorators.

      See Also:
  • Constructor Details

    • LocalShortcutCommandBusConnectorConfigurationEnhancer

      public LocalShortcutCommandBusConnectorConfigurationEnhancer()
  • Method Details