SammyVimes commented on a change in pull request #102:
URL: https://github.com/apache/ignite-3/pull/102#discussion_r628176822
##########
File path:
modules/network/src/main/java/org/apache/ignite/network/scalecube/DelegatingTransportFactory.java
##########
@@ -35,50 +34,66 @@
/** */
private final ScaleCubeMessagingService messagingService;
+ /** Delegate transport factory. */
+ private final TransportFactory factory;
+
/**
* @param messagingService Messaging service.
+ * @param factory Delegate transport factory.
*/
- DelegatingTransportFactory(ScaleCubeMessagingService messagingService) {
+ DelegatingTransportFactory(ScaleCubeMessagingService messagingService,
TransportFactory factory) {
this.messagingService = messagingService;
+ this.factory = factory;
}
/** {@inheritDoc} */
@Override public Transport createTransport(TransportConfig config) {
- var delegateFactory = TransportFactory.INSTANCE == null ? new
TcpTransportFactory() : TransportFactory.INSTANCE;
-
- Transport delegate = delegateFactory.createTransport(config);
+ Transport delegate = factory.createTransport(config);
Review comment:
Not sure if it's a good idea: a ScaleCube cluster node doesn't send
messages to itself, so I would prefer to keep the custom transport
implementation clean. Delegating transport is only needed until we implement a
messaging service on top of the connection manager
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]