Class LocalShortcutQueryBusConnectorConfigurationEnhancer

java.lang.Object
io.axoniq.framework.messaging.queryhandling.distributed.LocalShortcutQueryBusConnectorConfigurationEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

@Internal public class LocalShortcutQueryBusConnectorConfigurationEnhancer extends Object implements ConfigurationEnhancer
A ConfigurationEnhancer that when a QueryBusConnector is present in the configuration may decorate it with a LocalShortcutQueryBusConnector wrapping a registered LocalQueryDispatchPredicate.
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 LocalShortcutQueryBusConnector decorates the QueryBusConnector.

      Note that the LocalShortcutQueryBusConnector 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 query because it is about to leave this node is bypassed when the query 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

    • LocalShortcutQueryBusConnectorConfigurationEnhancer

      public LocalShortcutQueryBusConnectorConfigurationEnhancer()
  • Method Details