This is an automated email from the ASF dual-hosted git repository.

av pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 993afb0ee2f IGNITE-27795 Use MessageSerializer for 
GridCacheQueryRequest (#12719)
993afb0ee2f is described below

commit 993afb0ee2fca21915662d8f454920702e065026
Author: Dmitry Werner <[email protected]>
AuthorDate: Wed Feb 11 18:11:42 2026 +0500

    IGNITE-27795 Use MessageSerializer for GridCacheQueryRequest (#12719)
---
 .../communication/GridIoMessageFactory.java        |   3 +-
 .../query/GridCacheDistributedQueryFuture.java     |   4 +-
 .../cache/query/GridCacheQueryRequest.java         | 598 ++++++++-------------
 3 files changed, 219 insertions(+), 386 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index c0317adec9f..de56befa844 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -52,6 +52,7 @@ import 
org.apache.ignite.internal.codegen.ErrorMessageSerializer;
 import org.apache.ignite.internal.codegen.ExchangeInfoSerializer;
 import 
org.apache.ignite.internal.codegen.GenerateEncryptionKeyRequestSerializer;
 import org.apache.ignite.internal.codegen.GridCacheEntryInfoSerializer;
+import org.apache.ignite.internal.codegen.GridCacheQueryRequestSerializer;
 import org.apache.ignite.internal.codegen.GridCacheQueryResponseSerializer;
 import org.apache.ignite.internal.codegen.GridCacheReturnSerializer;
 import org.apache.ignite.internal.codegen.GridCacheSqlQuerySerializer;
@@ -410,7 +411,7 @@ public class GridIoMessageFactory implements 
MessageFactoryProvider {
         factory.register((short)55, GridNearTxPrepareRequest::new, new 
GridNearTxPrepareRequestSerializer());
         factory.register((short)56, GridNearTxPrepareResponse::new, new 
GridNearTxPrepareResponseSerializer());
         factory.register((short)57, GridNearUnlockRequest::new, new 
GridNearUnlockRequestSerializer());
-        factory.register((short)58, GridCacheQueryRequest::new);
+        factory.register((short)58, GridCacheQueryRequest::new, new 
GridCacheQueryRequestSerializer());
         factory.register((short)59, GridCacheQueryResponse::new, new 
GridCacheQueryResponseSerializer());
         factory.register((short)61, GridContinuousMessage::new);
         factory.register((short)62, DataStreamerRequest::new);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryFuture.java
index 2b12a3b784c..9ed56f805c5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryFuture.java
@@ -262,7 +262,7 @@ public class GridCacheDistributedQueryFuture<K, V, R> 
extends GridCacheQueryFutu
      */
     private void requestPages(UUID nodeId) {
         try {
-            GridCacheQueryRequest req = 
GridCacheQueryRequest.pageRequest(cctx, reqId, query().query(), fields());
+            GridCacheQueryRequest req = 
GridCacheQueryRequest.pageRequest(cctx, reqId, query().query());
 
             qryMgr.sendRequest(this, req, Collections.singletonList(nodeId));
         }
@@ -279,7 +279,7 @@ public class GridCacheDistributedQueryFuture<K, V, R> 
extends GridCacheQueryFutu
     // TODO IGNITE-15731: Refactor how CacheQueryReducer handles remote nodes.
     private void cancelPages(UUID nodeId) {
         try {
-            GridCacheQueryRequest req = 
GridCacheQueryRequest.cancelRequest(cctx, reqId, fields());
+            GridCacheQueryRequest req = 
GridCacheQueryRequest.cancelRequest(cctx, reqId);
 
             if (nodeId.equals(cctx.localNodeId())) {
                 // Process cancel query directly (without sending) for local 
node,
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index 132d11b356f..84a0a6ec0cb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -17,11 +17,9 @@
 
 package org.apache.ignite.internal.processors.cache.query;
 
-import java.nio.ByteBuffer;
 import java.util.Collection;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -38,9 +36,6 @@ import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteReducer;
 import org.apache.ignite.marshaller.Marshaller;
-import 
org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 import org.jetbrains.annotations.Nullable;
 
 import static 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.INDEX;
@@ -64,94 +59,107 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     private static final int FLAG_DATA_PAGE_SCAN_MASK = 0b11;
 
     /** */
+    @Order(4)
     private long id;
 
     /** */
+    @Order(5)
     private String cacheName;
 
     /** */
+    @Order(6)
     private GridCacheQueryType type;
 
     /** */
-    private boolean fields;
-
-    /** */
+    @Order(7)
     @GridToStringInclude(sensitive = true)
     private String clause;
 
     /** */
-    @GridDirectTransient
     private IndexQueryDesc idxQryDesc;
 
     /** */
+    @Order(value = 8, method = "indexQueryDescriptionBytes")
     private byte[] idxQryDescBytes;
 
     /** */
+    @Order(9)
     private int limit;
 
     /** */
+    @Order(value = 10, method = "className")
     private String clsName;
 
     /** */
-    @GridDirectTransient
     private IgniteBiPredicate<Object, Object> keyValFilter;
 
     /** */
+    @Order(value = 11, method = "keyValueFilterBytes")
     private byte[] keyValFilterBytes;
 
     /** */
-    @GridDirectTransient
     private IgniteReducer<Object, Object> rdc;
 
     /** */
+    @Order(value = 12, method = "reducerBytes")
     private byte[] rdcBytes;
 
     /** */
-    @GridDirectTransient
     private IgniteClosure<?, ?> trans;
 
     /** */
+    @Order(value = 13, method = "transformerBytes")
     private byte[] transBytes;
 
     /** */
-    @GridDirectTransient
     private Object[] args;
 
     /** */
+    @Order(value = 14, method = "argumentsBytes")
     private byte[] argsBytes;
 
     /** */
+    @Order(15)
     private int pageSize;
 
     /** */
+    @Order(value = 16, method = "includeBackups")
     private boolean incBackups;
 
     /** */
+    @Order(17)
     private boolean cancel;
 
     /** */
+    @Order(value = 18, method = "includeMetaData")
     private boolean incMeta;
 
     /** */
+    @Order(value = 19, method = "allPages")
     private boolean all;
 
     /** */
+    @Order(20)
     private boolean keepBinary;
 
     /** */
+    @Order(21)
     private int taskHash;
 
     /** Partition. */
+    @Order(value = 22, method = "partition")
     private int part = -1;
 
     /** */
+    @Order(value = 23, method = "topologyVersion")
     private AffinityTopologyVersion topVer;
 
     /** Set of keys that must be skiped during iteration. */
-    @GridDirectCollection(KeyCacheObject.class)
+    @Order(24)
     private Collection<KeyCacheObject> skipKeys;
 
     /** */
+    @Order(25)
     private byte flags;
 
     /**
@@ -164,10 +172,11 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     /**
      * Send initial query request to specified nodes.
      *
+     * @param cctx Cache context.
      * @param reqId Request (cache query) ID.
      * @param fut Cache query future, contains query info.
      */
-    public static GridCacheQueryRequest startQueryRequest(GridCacheContext<?, 
?> cctx, long reqId,
+    static GridCacheQueryRequest startQueryRequest(GridCacheContext<?, ?> 
cctx, long reqId,
         GridCacheDistributedQueryFuture<?, ?, ?> fut) {
         GridCacheQueryBean bean = fut.query();
         CacheQuery<?> qry = bean.query();
@@ -205,18 +214,17 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     /**
      * Send request for fetching query result pages to specified nodes.
      *
+     * @param cctx Cache context.
      * @param reqId Request (cache query) ID.
+     * @param qry Query.
      */
-    public static GridCacheQueryRequest pageRequest(GridCacheContext<?, ?> 
cctx, long reqId,
-        CacheQuery<?> qry, boolean fields) {
-
+    static GridCacheQueryRequest pageRequest(GridCacheContext<?, ?> cctx, long 
reqId, CacheQuery<?> qry) {
         return new GridCacheQueryRequest(
             cctx.cacheId(),
             reqId,
             cctx.name(),
             qry.pageSize(),
             qry.includeBackups(),
-            fields,
             false,
             qry.keepBinary(),
             qry.taskHash(),
@@ -229,13 +237,12 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     /**
      * Send cancel query request, so no new pages will be sent.
      *
+     * @param cctx Cache context.
      * @param reqId Query request ID.
-     * @param fieldsQry Whether query is a fields query.
      */
-    public static GridCacheQueryRequest cancelRequest(GridCacheContext<?, ?> 
cctx, long reqId, boolean fieldsQry) {
+    static GridCacheQueryRequest cancelRequest(GridCacheContext<?, ?> cctx, 
long reqId) {
         return new GridCacheQueryRequest(cctx.cacheId(),
             reqId,
-            fieldsQry,
             cctx.affinity().affinityTopologyVersion(),
             cctx.deploymentEnabled());
     }
@@ -245,20 +252,17 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
      *
      * @param cacheId Cache ID.
      * @param id Request to cancel.
-     * @param fields Fields query flag.
      * @param topVer Topology version.
      * @param addDepInfo Deployment info flag.
      */
     private GridCacheQueryRequest(
         int cacheId,
         long id,
-        boolean fields,
         AffinityTopologyVersion topVer,
         boolean addDepInfo
     ) {
         this.cacheId = cacheId;
         this.id = id;
-        this.fields = fields;
         this.topVer = topVer;
         this.addDepInfo = addDepInfo;
 
@@ -273,7 +277,6 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
      * @param cacheName Cache name.
      * @param pageSize Page size.
      * @param incBackups {@code true} if need to include backups.
-     * @param fields Fields query flag.
      * @param all Whether to load all pages.
      * @param keepBinary Whether to keep binary.
      * @param taskHash Task name hash code.
@@ -287,7 +290,6 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         String cacheName,
         int pageSize,
         boolean incBackups,
-        boolean fields,
         boolean all,
         boolean keepBinary,
         int taskHash,
@@ -300,7 +302,6 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         this.cacheName = cacheName;
         this.pageSize = pageSize;
         this.incBackups = incBackups;
-        this.fields = fields;
         this.all = all;
         this.keepBinary = keepBinary;
         this.taskHash = taskHash;
@@ -368,7 +369,6 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         this.id = id;
         this.cacheName = cacheName;
         this.type = type;
-        this.fields = fields;
         this.clause = clause;
         this.idxQryDesc = idxQryDesc;
         this.limit = limit;
@@ -410,11 +410,18 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return topVer != null ? topVer : AffinityTopologyVersion.NONE;
     }
 
+    /**
+     * @param topVer Topology version.
+     */
+    public void topologyVersion(AffinityTopologyVersion topVer) {
+        this.topVer = topVer;
+    }
+
     /** {@inheritDoc} */
-    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws 
IgniteCheckedException {
+    @Override public void prepareMarshal(GridCacheSharedContext<?, ?> ctx) 
throws IgniteCheckedException {
         super.prepareMarshal(ctx);
 
-        GridCacheContext cctx = ctx.cacheContext(cacheId);
+        GridCacheContext<?, ?> cctx = ctx.cacheContext(cacheId);
 
         if (keyValFilter != null && keyValFilterBytes == null) {
             if (addDepInfo)
@@ -460,7 +467,7 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     }
 
     /** {@inheritDoc} */
-    @Override public void finishUnmarshal(GridCacheSharedContext ctx, 
ClassLoader ldr) throws IgniteCheckedException {
+    @Override public void finishUnmarshal(GridCacheSharedContext<?, ?> ctx, 
ClassLoader ldr) throws IgniteCheckedException {
         super.finishUnmarshal(ctx, ldr);
 
         Marshaller mrsh = ctx.marshaller();
@@ -499,24 +506,31 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
      * @param ctx Context.
      * @throws IgniteCheckedException In case of error.
      */
-    void beforeLocalExecution(GridCacheContext ctx) throws 
IgniteCheckedException {
+    void beforeLocalExecution(GridCacheContext<?, ?> ctx) throws 
IgniteCheckedException {
         Marshaller marsh = ctx.marshaller();
 
-        rdc = rdc != null ? U.<IgniteReducer<Object, Object>>unmarshal(marsh, 
U.marshal(marsh, rdc),
+        rdc = rdc != null ? U.unmarshal(marsh, U.marshal(marsh, rdc),
             U.resolveClassLoader(ctx.gridConfig())) : null;
         trans = trans != null ? U.<IgniteClosure<Object, 
Object>>unmarshal(marsh, U.marshal(marsh, trans),
             U.resolveClassLoader(ctx.gridConfig())) : null;
-        idxQryDesc = idxQryDesc != null ? U.<IndexQueryDesc>unmarshal(marsh, 
U.marshal(marsh, idxQryDesc),
+        idxQryDesc = idxQryDesc != null ? U.unmarshal(marsh, U.marshal(marsh, 
idxQryDesc),
             U.resolveClassLoader(ctx.gridConfig())) : null;
     }
 
     /**
-     * @return Request id.
+     * @return Request ID.
      */
     public long id() {
         return id;
     }
 
+    /**
+     * @param id Request ID.
+     */
+    public void id(long id) {
+        this.id = id;
+    }
+
     /**
      * @return Cache name.
      */
@@ -524,6 +538,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return cacheName;
     }
 
+    /**
+     * @param cacheName Cache name.
+     */
+    public void cacheName(String cacheName) {
+        this.cacheName = cacheName;
+    }
+
     /**
      * @return Query type.
      */
@@ -532,10 +553,10 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     }
 
     /**
-     * @return {@code true} if query returns fields.
+     * @param type Query type.
      */
-    public boolean fields() {
-        return fields;
+    public void type(GridCacheQueryType type) {
+        this.type = type;
     }
 
     /**
@@ -545,6 +566,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return limit;
     }
 
+    /**
+     * @param limit Limit.
+     */
+    public void limit(int limit) {
+        this.limit = limit;
+    }
+
     /**
      * @return Query clause.
      */
@@ -552,6 +580,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return clause;
     }
 
+    /**
+     * @param clause Query clause.
+     */
+    public void clause(String clause) {
+        this.clause = clause;
+    }
+
     /**
      * @return Index query description.
      */
@@ -566,6 +601,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return clsName;
     }
 
+    /**
+     * @param clsName Class name.
+     */
+    public void className(String clsName) {
+        this.clsName = clsName;
+    }
+
     /**
      * @return Flag indicating whether to include backups.
      */
@@ -573,6 +615,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return incBackups;
     }
 
+    /**
+     * @param incBackups Flag indicating whether to include backups.
+     */
+    public void includeBackups(boolean incBackups) {
+        this.incBackups = incBackups;
+    }
+
     /**
      * @return Flag indicating that this is cancel request.
      */
@@ -580,6 +629,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return cancel;
     }
 
+    /**
+     * @param cancel Flag indicating that this is cancel request.
+     */
+    public void cancel(boolean cancel) {
+        this.cancel = cancel;
+    }
+
     /**
      * @return Key-value filter.
      */
@@ -608,6 +664,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return pageSize;
     }
 
+    /**
+     * @param pageSize Page size.
+     */
+    public void pageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
     /**
      * @return Arguments.
      */
@@ -622,6 +685,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return incMeta;
     }
 
+    /**
+     * @param incMeta Include meta data or not.
+     */
+    public void includeMetaData(boolean incMeta) {
+        this.incMeta = incMeta;
+    }
+
     /**
      * @return Whether to load all pages.
      */
@@ -629,6 +699,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return all;
     }
 
+    /**
+     * @param all Whether to load all pages.
+     */
+    public void allPages(boolean all) {
+        this.all = all;
+    }
+
     /**
      * @return Whether to keep binary.
      */
@@ -636,6 +713,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return keepBinary;
     }
 
+    /**
+     * @param keepBinary Whether to keep binary.
+     */
+    public void keepBinary(boolean keepBinary) {
+        this.keepBinary = keepBinary;
+    }
+
     /**
      * @return Task hash.
      */
@@ -643,6 +727,13 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
         return taskHash;
     }
 
+    /**
+     * @param taskHash Task hash.
+     */
+    public void taskHash(int taskHash) {
+        this.taskHash = taskHash;
+    }
+
     /**
      * @return Flag to enable data page scan.
      */
@@ -664,367 +755,108 @@ public class GridCacheQueryRequest extends 
GridCacheIdMessage implements GridCac
     }
 
     /**
-     * @return partition.
+     * @param skipKeys Set of keys that must be skiped during iteration.
+     */
+    public void skipKeys(Collection<KeyCacheObject> skipKeys) {
+        this.skipKeys = skipKeys;
+    }
+
+    /**
+     * @return Partition.
      */
     @Override public int partition() {
         return part;
     }
 
-    /** {@inheritDoc} */
-    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
-        writer.setBuffer(buf);
-
-        if (!super.writeTo(buf, writer))
-            return false;
-
-        if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(directType()))
-                return false;
-
-            writer.onHeaderWritten();
-        }
-
-        switch (writer.state()) {
-            case 4:
-                if (!writer.writeBoolean(all))
-                    return false;
-
-                writer.incrementState();
-
-            case 5:
-                if (!writer.writeByteArray(argsBytes))
-                    return false;
-
-                writer.incrementState();
-
-            case 6:
-                if (!writer.writeString(cacheName))
-                    return false;
-
-                writer.incrementState();
-
-            case 7:
-                if (!writer.writeBoolean(cancel))
-                    return false;
-
-                writer.incrementState();
-
-            case 8:
-                if (!writer.writeString(clause))
-                    return false;
-
-                writer.incrementState();
-
-            case 9:
-                if (!writer.writeString(clsName))
-                    return false;
-
-                writer.incrementState();
-
-            case 10:
-                if (!writer.writeBoolean(fields))
-                    return false;
-
-                writer.incrementState();
-
-            case 11:
-                if (!writer.writeByte(flags))
-                    return false;
-
-                writer.incrementState();
-
-            case 12:
-                if (!writer.writeLong(id))
-                    return false;
-
-                writer.incrementState();
-
-            case 13:
-                if (!writer.writeBoolean(incBackups))
-                    return false;
-
-                writer.incrementState();
-
-            case 14:
-                if (!writer.writeBoolean(incMeta))
-                    return false;
-
-                writer.incrementState();
-
-            case 15:
-                if (!writer.writeBoolean(keepBinary))
-                    return false;
-
-                writer.incrementState();
-
-            case 16:
-                if (!writer.writeByteArray(keyValFilterBytes))
-                    return false;
-
-                writer.incrementState();
-
-            case 17:
-                if (!writer.writeInt(pageSize))
-                    return false;
-
-                writer.incrementState();
-
-            case 18:
-                if (!writer.writeInt(part))
-                    return false;
-
-                writer.incrementState();
-
-            case 19:
-                if (!writer.writeByteArray(rdcBytes))
-                    return false;
-
-                writer.incrementState();
-
-            case 20:
-                if (!writer.writeInt(limit))
-                    return false;
-
-                writer.incrementState();
-
-            case 21:
-                if (!writer.writeInt(taskHash))
-                    return false;
-
-                writer.incrementState();
-
-            case 22:
-                if (!writer.writeAffinityTopologyVersion(topVer))
-                    return false;
-
-                writer.incrementState();
-
-            case 23:
-                if (!writer.writeByteArray(transBytes))
-                    return false;
-
-                writer.incrementState();
-
-            case 24:
-                if (!writer.writeByte(type != null ? (byte)type.ordinal() : 
-1))
-                    return false;
-
-                writer.incrementState();
-
-            case 25:
-                if (!writer.writeByteArray(idxQryDescBytes))
-                    return false;
-
-                writer.incrementState();
-
-            case 26:
-                if (!writer.writeCollection(skipKeys, 
MessageCollectionItemType.KEY_CACHE_OBJECT))
-                    return false;
-
-                writer.incrementState();
-        }
-
-        return true;
+    /**
+     * @param part Partition.
+     */
+    public void partition(int part) {
+        this.part = part;
     }
 
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 4:
-                all = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 5:
-                argsBytes = reader.readByteArray();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 6:
-                cacheName = reader.readString();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 7:
-                cancel = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 8:
-                clause = reader.readString();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 9:
-                clsName = reader.readString();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 10:
-                fields = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 11:
-                flags = reader.readByte();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 12:
-                id = reader.readLong();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 13:
-                incBackups = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 14:
-                incMeta = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 15:
-                keepBinary = reader.readBoolean();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 16:
-                keyValFilterBytes = reader.readByteArray();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 17:
-                pageSize = reader.readInt();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 18:
-                part = reader.readInt();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 19:
-                rdcBytes = reader.readByteArray();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 20:
-                limit = reader.readInt();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 21:
-                taskHash = reader.readInt();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 22:
-                topVer = reader.readAffinityTopologyVersion();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 23:
-                transBytes = reader.readByteArray();
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 24:
-                byte typeOrd;
+    /**
+     * @return Index query description bytes.
+     */
+    public byte[] indexQueryDescriptionBytes() {
+        return idxQryDescBytes;
+    }
 
-                typeOrd = reader.readByte();
+    /**
+     * @param idxQryDescBytes Index query description bytes.
+     */
+    public void indexQueryDescriptionBytes(byte[] idxQryDescBytes) {
+        this.idxQryDescBytes = idxQryDescBytes;
+    }
 
-                if (!reader.isLastRead())
-                    return false;
+    /**
+     * @return Key-value filter bytes.
+     */
+    public byte[] keyValueFilterBytes() {
+        return keyValFilterBytes;
+    }
 
-                type = GridCacheQueryType.fromOrdinal(typeOrd);
+    /**
+     * @param keyValFilterBytes Key-value filter bytes.
+     */
+    public void keyValueFilterBytes(byte[] keyValFilterBytes) {
+        this.keyValFilterBytes = keyValFilterBytes;
+    }
 
-                reader.incrementState();
+    /**
+     * @return Reducer bytes.
+     */
+    public byte[] reducerBytes() {
+        return rdcBytes;
+    }
 
-            case 25:
-                idxQryDescBytes = reader.readByteArray();
+    /**
+     * @param rdcBytes Reducer bytes.
+     */
+    public void reducerBytes(byte[] rdcBytes) {
+        this.rdcBytes = rdcBytes;
+    }
 
-                if (!reader.isLastRead())
-                    return false;
+    /**
+     * @return Transformer bytes.
+     */
+    public byte[] transformerBytes() {
+        return transBytes;
+    }
 
-                reader.incrementState();
+    /**
+     * @param transBytes Transformer bytes.
+     */
+    public void transformerBytes(byte[] transBytes) {
+        this.transBytes = transBytes;
+    }
 
-            case 26:
-                skipKeys = 
reader.readCollection(MessageCollectionItemType.KEY_CACHE_OBJECT);
+    /**
+     * @return Arguments bytes.
+     */
+    public byte[] argumentsBytes() {
+        return argsBytes;
+    }
 
-                if (!reader.isLastRead())
-                    return false;
+    /**
+     * @param argsBytes Arguments bytes.
+     */
+    public void argumentsBytes(byte[] argsBytes) {
+        this.argsBytes = argsBytes;
+    }
 
-                reader.incrementState();
-        }
+    /**
+     * @return Flags.
+     */
+    public byte flags() {
+        return flags;
+    }
 
-        return true;
+    /**
+     * @param flags Flags.
+     */
+    public void flags(byte flags) {
+        this.flags = flags;
     }
 
     /** {@inheritDoc} */

Reply via email to