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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -50,62 +46,52 @@ public class CacheContinuousQueryEntry implements 
GridCacheDeployable, Message {
     private static final byte KEEP_BINARY = 0b0100;
 
     /** */
-    private static final EventType[] EVT_TYPE_VALS = EventType.values();
+    @Order(0)
+    EventType evtType;
 
-    /**
-     * @param ord Event type ordinal value.
-     * @return Event type.
-     */
-    @Nullable public static EventType eventTypeFromOrdinal(int ord) {
-        return ord >= 0 && ord < EVT_TYPE_VALS.length ? EVT_TYPE_VALS[ord] : 
null;
-    }
-
-    /** */
-    @GridCodegenConverter(
-        type = byte.class,
-        get = "evtType != null ? (byte)evtType.ordinal() : -1",
-        set = "eventTypeFromOrdinal($val$)"
-    )
-    private EventType evtType;
+    /** Flags. */
+    @Order(1)
+    byte flags;
 
     /** Key. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : key")
-    private KeyCacheObject key;
+    @Order(value = 2, method = "keySerialization")
+    KeyCacheObject key;
 
     /** New value. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : newVal")
-    private CacheObject newVal;
+    @Order(value = 3, method = "newValueSerialization")
+    CacheObject newVal;
 
     /** Old value. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : oldVal")
-    private CacheObject oldVal;
+    @Order(value = 4, method = "oldValueSerialization")

Review Comment:
   ```suggestion
       @Order(value = 4, method = "serializedOldValue")
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -50,62 +46,52 @@ public class CacheContinuousQueryEntry implements 
GridCacheDeployable, Message {
     private static final byte KEEP_BINARY = 0b0100;
 
     /** */
-    private static final EventType[] EVT_TYPE_VALS = EventType.values();
+    @Order(0)
+    EventType evtType;
 
-    /**
-     * @param ord Event type ordinal value.
-     * @return Event type.
-     */
-    @Nullable public static EventType eventTypeFromOrdinal(int ord) {
-        return ord >= 0 && ord < EVT_TYPE_VALS.length ? EVT_TYPE_VALS[ord] : 
null;
-    }
-
-    /** */
-    @GridCodegenConverter(
-        type = byte.class,
-        get = "evtType != null ? (byte)evtType.ordinal() : -1",
-        set = "eventTypeFromOrdinal($val$)"
-    )
-    private EventType evtType;
+    /** Flags. */
+    @Order(1)
+    byte flags;
 
     /** Key. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : key")
-    private KeyCacheObject key;
+    @Order(value = 2, method = "keySerialization")
+    KeyCacheObject key;
 
     /** New value. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : newVal")
-    private CacheObject newVal;
+    @Order(value = 3, method = "newValueSerialization")

Review Comment:
   ```suggestion
       @Order(value = 3, method = "serializedNewValue")
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -50,62 +46,52 @@ public class CacheContinuousQueryEntry implements 
GridCacheDeployable, Message {
     private static final byte KEEP_BINARY = 0b0100;
 
     /** */
-    private static final EventType[] EVT_TYPE_VALS = EventType.values();
+    @Order(0)
+    EventType evtType;
 
-    /**
-     * @param ord Event type ordinal value.
-     * @return Event type.
-     */
-    @Nullable public static EventType eventTypeFromOrdinal(int ord) {
-        return ord >= 0 && ord < EVT_TYPE_VALS.length ? EVT_TYPE_VALS[ord] : 
null;
-    }
-
-    /** */
-    @GridCodegenConverter(
-        type = byte.class,
-        get = "evtType != null ? (byte)evtType.ordinal() : -1",
-        set = "eventTypeFromOrdinal($val$)"
-    )
-    private EventType evtType;
+    /** Flags. */
+    @Order(1)
+    byte flags;
 
     /** Key. */
     @GridToStringInclude
-    @GridCodegenConverter(get = "isFiltered() ? null : key")
-    private KeyCacheObject key;
+    @Order(value = 2, method = "keySerialization")

Review Comment:
   ```suggestion
       @Order(value = 2, method = "serializedKey")
   ```



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