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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe order at which theLocalShortcutCommandBusConnectordecorates theCommandBusConnector. -
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 theLocalShortcutCommandBusConnectordecorates theCommandBusConnector.Note that the
LocalShortcutCommandBusConnectorshortcut 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_VALUEis deliberately halved rather than used directly to leave room for other optional decorators.- See Also:
-
-
Constructor Details
-
LocalShortcutCommandBusConnectorConfigurationEnhancer
public LocalShortcutCommandBusConnectorConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
componentRegistry- The registry instance to enhance.
-