rpuch commented on a change in pull request #670:
URL: https://github.com/apache/ignite-3/pull/670#discussion_r810815886



##########
File path: 
modules/network/src/main/java/org/apache/ignite/internal/network/message/ClassDescriptorMessage.java
##########
@@ -29,6 +28,17 @@
 /** Message for the {@link ClassDescriptor}. */
 @Transferable(NetworkMessageTypes.CLASS_DESCRIPTOR_MESSAGE)
 public interface ClassDescriptorMessage extends NetworkMessage {
+    int IS_PRIMITIVE_MASK = 1;

Review comment:
       This seems like a matter of taste, but why not :) Fixed

##########
File path: 
modules/network/src/main/java/org/apache/ignite/internal/network/serialization/FieldDescriptor.java
##########
@@ -44,35 +44,115 @@
      */
     private final boolean unshared;
 
+    private final boolean isPrimitive;
+    private final boolean isRuntimeTypeKnownUpfront;
+
     /**
      * Accessor for accessing this field.
      */
     private final FieldAccessor accessor;
 
+    /**
+     * Creates a {@link FieldDescriptor} from a local {@link Field}.
+     */
+    public static FieldDescriptor local(Field field, int typeDescriptorId) {
+        return new FieldDescriptor(field, typeDescriptorId);
+    }
+
+    /**
+     * Creates a {@link FieldDescriptor} from a field defined by name, but 
having local class.
+     */
+    public static FieldDescriptor local(
+            String fieldName,
+            Class<?> fieldClazz,
+            int typeDescriptorId,
+            boolean unshared,
+            Class<?> declaringClass) {
+        return new FieldDescriptor(
+                fieldName,
+                fieldClazz,
+                typeDescriptorId,
+                unshared,
+                fieldClazz.isPrimitive(),
+                Classes.isRuntimeTypeKnownUpfront(fieldClazz),
+                declaringClass
+        );
+    }
+
+    /**
+     * Creates a {@link FieldDescriptor} from a possibly remote field.

Review comment:
       Rephrased it




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