shishkovilja commented on code in PR #12867:
URL: https://github.com/apache/ignite/pull/12867#discussion_r2911054670


##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;

Review Comment:
   ```suggestion
       private final MessageType valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final Class clazz;

Review Comment:
   ```suggestion
       private final Class<?> clazz;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final Class clazz;
+
+    /**
+     * @param valueType Value type.
+     * @param clazz Class.
+     */
+    public MessageArrayType(MessageType valueType, Class clazz) {

Review Comment:
   ```suggestion
       public MessageArrayType(MessageType valType, Class<?> clazz) {
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinityChangeMessage.java:
##########


Review Comment:
   Missing `id = IgniteUuid.randomUuid();` here?



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCollectionType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageCollectionType implements MessageType {
+    /** */
+    private final MessageType valueType;

Review Comment:
   ```suggestion
       private final MessageType valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCollectionType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageCollectionType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean set;
+
+    /**
+     * @param valueType Value type.
+     * @param set Is set.
+     */
+    public MessageCollectionType(MessageType valueType, boolean set) {

Review Comment:
   ```suggestion
       public MessageCollectionType(MessageType valType, boolean set) {
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCollectionType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageCollectionType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean set;
+
+    /**
+     * @param valueType Value type.
+     * @param set Is set.
+     */
+    public MessageCollectionType(MessageType valueType, boolean set) {
+        this.valueType = valueType;

Review Comment:
   ```suggestion
           this.valType = valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCollectionType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageCollectionType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean set;
+
+    /**
+     * @param valueType Value type.
+     * @param set Is set.
+     */
+    public MessageCollectionType(MessageType valueType, boolean set) {
+        this.valueType = valueType;
+        this.set = set;
+    }
+
+    /** @return Value type. */
+    public MessageType valueType() {
+        return valueType;

Review Comment:
   ```suggestion
           return valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageMapType.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageMapType implements MessageType {
+    /** */
+    private final MessageType keyType;
+
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean linked;
+
+    /**
+     * @param keyType Key type.
+     * @param valueType Value type.
+     * @param linked Is linked hash map.
+     */
+    public MessageMapType(MessageType keyType, MessageType valueType, boolean 
linked) {

Review Comment:
   ```suggestion
       public MessageMapType(MessageType keyType, MessageType valType, boolean 
linked) {
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageMapType.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageMapType implements MessageType {
+    /** */
+    private final MessageType keyType;
+
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean linked;
+
+    /**
+     * @param keyType Key type.
+     * @param valueType Value type.
+     * @param linked Is linked hash map.
+     */
+    public MessageMapType(MessageType keyType, MessageType valueType, boolean 
linked) {
+        this.keyType = keyType;
+        this.valueType = valueType;

Review Comment:
   ```suggestion
           this.valType = valType;
   ```



##########
modules/core/src/test/java/org/apache/ignite/internal/managers/communication/AbstractMessageSerializationTest.java:
##########
@@ -551,30 +549,23 @@ private void readField(Class<?> type) {
         }
 
         /** {@inheritDoc} */
-        @Override public <T> T[] readObjectArray(MessageCollectionItemType 
itemType, Class<T> itemCls) {
+        @Override public <T> T[] readObjectArray(MessageArrayType type) {
             readField(Object[].class);
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public <C extends Collection<?>> C 
readCollection(MessageCollectionItemType itemType) {
-            readField(Collection.class);
+        @Override public <C extends Collection<?>> C 
readCollection(MessageCollectionType type) {
+            readField(type.set() ? Set.class : Collection.class);
 
             return null;
         }
 

Review Comment:
   Redundant line.



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageMapType.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageMapType implements MessageType {
+    /** */
+    private final MessageType keyType;
+
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final boolean linked;
+
+    /**
+     * @param keyType Key type.
+     * @param valueType Value type.
+     * @param linked Is linked hash map.
+     */
+    public MessageMapType(MessageType keyType, MessageType valueType, boolean 
linked) {
+        this.keyType = keyType;
+        this.valueType = valueType;
+        this.linked = linked;
+    }
+
+    /** @return Key type. */
+    public MessageType keyType() {
+        return keyType;
+    }
+
+    /** @return Value type. */
+    public MessageType valueType() {
+        return valueType;

Review Comment:
   ```suggestion
           return valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final Class clazz;
+
+    /**
+     * @param valueType Value type.
+     * @param clazz Class.
+     */
+    public MessageArrayType(MessageType valueType, Class clazz) {
+        this.valueType = valueType;
+        this.clazz = clazz;
+    }
+
+    /** @return Value type. */
+    public MessageType valueType() {
+        return valueType;
+    }
+
+    /** {@inheritDoc} */
+    @Override public MessageCollectionItemType type() {
+        return MessageCollectionItemType.ARRAY;
+    }
+
+    /** @return Class. */
+    public Class clazz() {

Review Comment:
   ```suggestion
       public Class<?> clazz() {
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final Class clazz;
+
+    /**
+     * @param valueType Value type.
+     * @param clazz Class.
+     */
+    public MessageArrayType(MessageType valueType, Class clazz) {
+        this.valueType = valueType;
+        this.clazz = clazz;
+    }
+
+    /** @return Value type. */
+    public MessageType valueType() {
+        return valueType;

Review Comment:
   ```suggestion
           return valType;
   ```



##########
modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageArrayType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.plugin.extensions.communication;
+
+/** */
+public class MessageArrayType implements MessageType {
+    /** */
+    private final MessageType valueType;
+
+    /** */
+    private final Class clazz;
+
+    /**
+     * @param valueType Value type.
+     * @param clazz Class.
+     */
+    public MessageArrayType(MessageType valueType, Class clazz) {
+        this.valueType = valueType;

Review Comment:
   ```suggestion
           this.valType = valType;
   ```



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