anton-vinogradov commented on code in PR #13454:
URL: https://github.com/apache/ignite/pull/13454#discussion_r3751715233


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerReceiverMessage.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.datastreamer;
+
+import org.apache.ignite.internal.Marshalled;
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.internal.UseBinaryMarshaller;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.stream.StreamReceiver;
+
+/** DataStreamer cache receiver/updater message. */
+@UseBinaryMarshaller
+public class DataStreamerReceiverMessage implements Message {
+    /** DataStreamer cache receiver/updater; {@code null} when {@link 
#builtIn} names it. */
+    @Marshalled("rcvrBytes")
+    StreamReceiver<?, ?> rcvr;
+
+    /** Serialized {@link #rcvr}. */
+    @Order(0)
+    volatile byte[] rcvrBytes;
+
+    /** The updater every node has; {@code null} when {@link #rcvr} is a user 
one. */
+    @Order(1)
+    DataStreamerBuiltInUpdater builtIn;
+
+    /** Empty constructor for serialization purposes. */
+    public DataStreamerReceiverMessage() {
+        // No-op.
+    }
+
+    /** @param rcvr User receiver. */
+    DataStreamerReceiverMessage(StreamReceiver<?, ?> rcvr) {
+        assert DataStreamerBuiltInUpdater.of(rcvr) == null : "A built-in 
updater travels by name: " + rcvr;
+
+        this.rcvr = rcvr;
+    }
+
+    /** @param builtIn Updater every node has, named rather than carried. */

Review Comment:
   Done.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerReceiverMessage.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.datastreamer;
+
+import org.apache.ignite.internal.Marshalled;
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.internal.UseBinaryMarshaller;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.stream.StreamReceiver;
+
+/** DataStreamer cache receiver/updater message. */
+@UseBinaryMarshaller
+public class DataStreamerReceiverMessage implements Message {
+    /** DataStreamer cache receiver/updater; {@code null} when {@link 
#builtIn} names it. */
+    @Marshalled("rcvrBytes")
+    StreamReceiver<?, ?> rcvr;
+
+    /** Serialized {@link #rcvr}. */
+    @Order(0)
+    volatile byte[] rcvrBytes;
+
+    /** The updater every node has; {@code null} when {@link #rcvr} is a user 
one. */
+    @Order(1)
+    DataStreamerBuiltInUpdater builtIn;
+
+    /** Empty constructor for serialization purposes. */
+    public DataStreamerReceiverMessage() {
+        // No-op.
+    }
+
+    /** @param rcvr User receiver. */
+    DataStreamerReceiverMessage(StreamReceiver<?, ?> rcvr) {
+        assert DataStreamerBuiltInUpdater.of(rcvr) == null : "A built-in 
updater travels by name: " + rcvr;
+
+        this.rcvr = rcvr;
+    }
+
+    /** @param builtIn Updater every node has, named rather than carried. */
+    DataStreamerReceiverMessage(DataStreamerBuiltInUpdater builtIn) {
+        this.builtIn = builtIn;
+    }
+
+    /** @return {@code True} if the receiver travels with this message rather 
than being named. */
+    boolean user() {

Review Comment:
   Done — the javadoc says "the built-in one this message names".



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerReceiverMessage.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.datastreamer;
+
+import org.apache.ignite.internal.Marshalled;
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.internal.UseBinaryMarshaller;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.stream.StreamReceiver;
+
+/** DataStreamer cache receiver/updater message. */
+@UseBinaryMarshaller
+public class DataStreamerReceiverMessage implements Message {
+    /** DataStreamer cache receiver/updater; {@code null} when {@link 
#builtIn} names it. */
+    @Marshalled("rcvrBytes")
+    StreamReceiver<?, ?> rcvr;
+
+    /** Serialized {@link #rcvr}. */
+    @Order(0)
+    volatile byte[] rcvrBytes;
+
+    /** The updater every node has; {@code null} when {@link #rcvr} is a user 
one. */
+    @Order(1)
+    DataStreamerBuiltInUpdater builtIn;
+
+    /** Empty constructor for serialization purposes. */
+    public DataStreamerReceiverMessage() {
+        // No-op.
+    }
+
+    /** @param rcvr User receiver. */
+    DataStreamerReceiverMessage(StreamReceiver<?, ?> rcvr) {
+        assert DataStreamerBuiltInUpdater.of(rcvr) == null : "A built-in 
updater travels by name: " + rcvr;
+
+        this.rcvr = rcvr;
+    }
+
+    /** @param builtIn Updater every node has, named rather than carried. */
+    DataStreamerReceiverMessage(DataStreamerBuiltInUpdater builtIn) {
+        this.builtIn = builtIn;
+    }
+
+    /** @return {@code True} if the receiver travels with this message rather 
than being named. */
+    boolean user() {
+        return builtIn == null;
+    }
+
+    /** @return Receiver: the one carried here, or the node's own that this 
message names. */

Review Comment:
   Renamed to say exactly that: `custom()`, documented as `{@code True} if this 
is a custom receiver, {@code false} if a built-in one`.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java:
##########
@@ -155,9 +157,14 @@ String cacheName() {
         return cacheName;
     }
 
+    /** @return {@code True} if the updater travelled with the request instead 
of being named. */

Review Comment:
   Renamed to `hasCustomUpdater()`: `{@code True} if the request carries a 
custom updater rather than naming a built-in one`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to