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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe order at which theLocalShortcutQueryBusConnectordecorates theQueryBusConnector. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.common.configuration.ConfigurationEnhancer
order
-
Field Details
-
LOCAL_SHORTCUT_CONNECTOR_ORDER
public static final int LOCAL_SHORTCUT_CONNECTOR_ORDERThe order at which theLocalShortcutQueryBusConnectordecorates theQueryBusConnector.Note that the
LocalShortcutQueryBusConnectorshortcut 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_VALUEis deliberately halved rather than used directly to leave room for other optional decorators.- See Also:
-
-
Constructor Details
-
LocalShortcutQueryBusConnectorConfigurationEnhancer
public LocalShortcutQueryBusConnectorConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
componentRegistry- The registry instance to enhance.
-