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

shishkovilja 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 47ee704a04a IGNITE-26403 : Refactor GridNearUnlockRequest (#12384)
47ee704a04a is described below

commit 47ee704a04a1204f8f006b7ab19654f7547b307f
Author: Vladimir Steshin <[email protected]>
AuthorDate: Fri Oct 3 19:15:00 2025 +0300

    IGNITE-26403 : Refactor GridNearUnlockRequest (#12384)
---
 .../communication/GridIoMessageFactory.java        | 11 +--
 ...lockRequest.java => GridNearUnlockRequest.java} | 72 ++++---------------
 .../dht/GridDhtTransactionalCacheAdapter.java      |  5 +-
 .../distributed/dht/GridDhtUnlockRequest.java      | 66 +++--------------
 .../dht/colocated/GridDhtColocatedCache.java       |  7 +-
 .../near/GridNearTransactionalCache.java           |  6 +-
 .../distributed/near/GridNearUnlockRequest.java    | 82 ----------------------
 .../main/resources/META-INF/classnames.properties  |  3 +-
 .../tcp/GridCacheDhtLockBackupSelfTest.java        |  2 +-
 9 files changed, 41 insertions(+), 213 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 f4b42133c17..ba911ea1b81 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
@@ -48,6 +48,7 @@ import 
org.apache.ignite.internal.codegen.GridDhtPartitionSupplyMessageSerialize
 import 
org.apache.ignite.internal.codegen.GridDhtPartitionsSingleRequestSerializer;
 import 
org.apache.ignite.internal.codegen.GridDhtTxOnePhaseCommitAckRequestSerializer;
 import org.apache.ignite.internal.codegen.GridDhtTxPrepareRequestSerializer;
+import org.apache.ignite.internal.codegen.GridDhtUnlockRequestSerializer;
 import 
org.apache.ignite.internal.codegen.GridDistributedTxPrepareRequestSerializer;
 import org.apache.ignite.internal.codegen.GridIntListSerializer;
 import org.apache.ignite.internal.codegen.GridJobCancelRequestSerializer;
@@ -56,6 +57,7 @@ import 
org.apache.ignite.internal.codegen.GridNearAtomicCheckUpdateRequestSerial
 import 
org.apache.ignite.internal.codegen.GridNearAtomicUpdateResponseSerializer;
 import org.apache.ignite.internal.codegen.GridNearGetRequestSerializer;
 import org.apache.ignite.internal.codegen.GridNearTxPrepareRequestSerializer;
+import org.apache.ignite.internal.codegen.GridNearUnlockRequestSerializer;
 import org.apache.ignite.internal.codegen.GridQueryCancelRequestSerializer;
 import org.apache.ignite.internal.codegen.GridQueryFailResponseSerializer;
 import org.apache.ignite.internal.codegen.GridQueryKillRequestSerializer;
@@ -116,7 +118,7 @@ import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTx
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockRequest;
@@ -164,7 +166,6 @@ import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFi
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
-import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IncrementalSnapshotAwareMessage;
 import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFilesFailureMessage;
 import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFilesRequestMessage;
@@ -273,7 +274,7 @@ public class GridIoMessageFactory implements 
MessageFactoryProvider {
         factory.register((short)24, GridDistributedTxFinishResponse::new);
         factory.register((short)25, GridDistributedTxPrepareRequest::new, new 
GridDistributedTxPrepareRequestSerializer());
         factory.register((short)26, GridDistributedTxPrepareResponse::new);
-        factory.register((short)27, GridDistributedUnlockRequest::new);
+        // Type 27 is former GridDistributedUnlockRequest
         factory.register((short)28, GridDhtAffinityAssignmentRequest::new, new 
GridDhtAffinityAssignmentRequestSerializer());
         factory.register((short)29, GridDhtAffinityAssignmentResponse::new);
         factory.register((short)30, GridDhtLockRequest::new);
@@ -282,7 +283,7 @@ public class GridIoMessageFactory implements 
MessageFactoryProvider {
         factory.register((short)33, GridDhtTxFinishResponse::new);
         factory.register((short)34, GridDhtTxPrepareRequest::new, new 
GridDhtTxPrepareRequestSerializer());
         factory.register((short)35, GridDhtTxPrepareResponse::new);
-        factory.register((short)36, GridDhtUnlockRequest::new);
+        factory.register((short)36, GridDhtUnlockRequest::new, new 
GridDhtUnlockRequestSerializer());
         factory.register((short)37, GridDhtAtomicDeferredUpdateResponse::new);
         factory.register((short)38, GridDhtAtomicUpdateRequest::new);
         factory.register((short)39, GridDhtAtomicUpdateResponse::new);
@@ -302,7 +303,7 @@ public class GridIoMessageFactory implements 
MessageFactoryProvider {
         factory.register((short)54, GridNearTxFinishResponse::new);
         factory.register((short)55, GridNearTxPrepareRequest::new, new 
GridNearTxPrepareRequestSerializer());
         factory.register((short)56, GridNearTxPrepareResponse::new);
-        factory.register((short)57, GridNearUnlockRequest::new);
+        factory.register((short)57, GridNearUnlockRequest::new, new 
GridNearUnlockRequestSerializer());
         factory.register((short)58, GridCacheQueryRequest::new);
         factory.register((short)59, GridCacheQueryResponse::new);
         factory.register((short)61, GridContinuousMessage::new);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridNearUnlockRequest.java
similarity index 61%
rename from 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
rename to 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridNearUnlockRequest.java
index e29d0c2f1cc..e5e2e8beb75 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridNearUnlockRequest.java
@@ -17,33 +17,29 @@
 
 package org.apache.ignite.internal.processors.cache.distributed;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.internal.GridDirectCollection;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import 
org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 
 /**
  * Lock request message.
  */
-public class GridDistributedUnlockRequest extends GridDistributedBaseMessage {
+public class GridNearUnlockRequest extends GridDistributedBaseMessage {
     /** Keys. */
     @GridToStringInclude
-    @GridDirectCollection(KeyCacheObject.class)
+    @Order(7)
     private List<KeyCacheObject> keys;
 
     /**
      * Empty constructor.
      */
-    public GridDistributedUnlockRequest() {
+    public GridNearUnlockRequest() {
         /* No-op. */
     }
 
@@ -52,12 +48,19 @@ public class GridDistributedUnlockRequest extends 
GridDistributedBaseMessage {
      * @param keyCnt Key count.
      * @param addDepInfo Deployment info flag.
      */
-    public GridDistributedUnlockRequest(int cacheId, int keyCnt, boolean 
addDepInfo) {
+    public GridNearUnlockRequest(int cacheId, int keyCnt, boolean addDepInfo) {
         super(keyCnt, addDepInfo);
 
         this.cacheId = cacheId;
     }
 
+    /**
+     * Sets the keys
+     */
+    public void keys(List<KeyCacheObject> keys) {
+        this.keys = keys;
+    }
+
     /**
      * @return Keys.
      */
@@ -100,60 +103,13 @@ public class GridDistributedUnlockRequest extends 
GridDistributedBaseMessage {
         return ctx.txLockMessageLogger();
     }
 
-    /** {@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 7:
-                if (!writer.writeCollection(keys, 
MessageCollectionItemType.KEY_CACHE_OBJECT))
-                    return false;
-
-                writer.incrementState();
-
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 7:
-                keys = 
reader.readCollection(MessageCollectionItemType.KEY_CACHE_OBJECT);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-        }
-
-        return true;
-    }
-
     /** {@inheritDoc} */
     @Override public short directType() {
-        return 27;
+        return 57;
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(GridDistributedUnlockRequest.class, this, "super", 
super.toString());
+        return S.toString(GridNearUnlockRequest.class, this, "super", 
super.toString());
     }
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 8f82f0f0c91..f6194f51d32 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -47,7 +47,7 @@ import 
org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockCancelledException;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
@@ -59,7 +59,6 @@ import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache;
-import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import 
org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
@@ -1429,7 +1428,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, 
V> extends GridDhtCach
      * @param nodeId Node ID.
      * @param req Request.
      */
-    private void clearLocks(UUID nodeId, GridDistributedUnlockRequest req) {
+    private void clearLocks(UUID nodeId, GridNearUnlockRequest req) {
         assert nodeId != null;
 
         List<KeyCacheObject> keys = req.keys();
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
index a1921414f98..14e2854c7a4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
@@ -17,25 +17,21 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import 
org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 
 /**
  * DHT cache unlock request.
  */
-public class GridDhtUnlockRequest extends GridDistributedUnlockRequest {
+public class GridDhtUnlockRequest extends GridNearUnlockRequest {
     /** Near keys. */
-    @GridDirectCollection(KeyCacheObject.class)
+    @Order(8)
     private List<KeyCacheObject> nearKeys;
 
     /**
@@ -54,6 +50,13 @@ public class GridDhtUnlockRequest extends 
GridDistributedUnlockRequest {
         super(cacheId, dhtCnt, addDepInfo);
     }
 
+    /**
+     * Sets the near.
+     */
+    public void nearKeys(List<KeyCacheObject> nearKeys) {
+        this.nearKeys = nearKeys;
+    }
+
     /**
      * @return Near keys.
      */
@@ -94,53 +97,6 @@ public class GridDhtUnlockRequest extends 
GridDistributedUnlockRequest {
         return S.toString(GridDhtUnlockRequest.class, this);
     }
 
-    /** {@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 8:
-                if (!writer.writeCollection(nearKeys, 
MessageCollectionItemType.KEY_CACHE_OBJECT))
-                    return false;
-
-                writer.incrementState();
-
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 8:
-                nearKeys = 
reader.readCollection(MessageCollectionItemType.KEY_CACHE_OBJECT);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-        }
-
-        return true;
-    }
-
     /** {@inheritDoc} */
     @Override public short directType() {
         return 36;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 0c67626cb24..6f247a8384d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -44,7 +44,7 @@ import 
org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockCancelledException;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtEmbeddedFuture;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtFinishedFuture;
@@ -58,7 +58,6 @@ import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
-import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairCheckOnlyFuture;
 import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
@@ -764,7 +763,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
             for (Map.Entry<ClusterNode, GridNearUnlockRequest> mapping : 
map.entrySet()) {
                 ClusterNode n = mapping.getKey();
 
-                GridDistributedUnlockRequest req = mapping.getValue();
+                GridNearUnlockRequest req = mapping.getValue();
 
                 assert !n.isLocal();
 
@@ -868,7 +867,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
         for (Map.Entry<ClusterNode, GridNearUnlockRequest> mapping : 
map.entrySet()) {
             ClusterNode n = mapping.getKey();
 
-            GridDistributedUnlockRequest req = mapping.getValue();
+            GridNearUnlockRequest req = mapping.getValue();
 
             if (!F.isEmpty(req.keys())) {
                 req.completedVersions(committed, rolledback);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index f4cdf274b98..bd6dab6f579 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -37,7 +37,7 @@ import 
org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCache;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnlockRequest;
 import 
org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
@@ -451,7 +451,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
             for (Map.Entry<ClusterNode, GridNearUnlockRequest> mapping : 
map.entrySet()) {
                 ClusterNode n = mapping.getKey();
 
-                GridDistributedUnlockRequest req = mapping.getValue();
+                GridNearUnlockRequest req = mapping.getValue();
 
                 if (n.isLocal())
                     dht.removeLocks(ctx.nodeId(), req.version(), locKeys, 
true);
@@ -560,7 +560,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
             for (Map.Entry<ClusterNode, GridNearUnlockRequest> mapping : 
map.entrySet()) {
                 ClusterNode n = mapping.getKey();
 
-                GridDistributedUnlockRequest req = mapping.getValue();
+                GridNearUnlockRequest req = mapping.getValue();
 
                 if (!F.isEmpty(req.keys())) {
                     req.completedVersions(committed, rolledback);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
deleted file mode 100644
index 24069db6e4e..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearUnlockRequest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.cache.distributed.near;
-
-import java.nio.ByteBuffer;
-import 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Near cache unlock request.
- */
-public class GridNearUnlockRequest extends GridDistributedUnlockRequest {
-    /**
-     * Empty constructor.
-     */
-    public GridNearUnlockRequest() {
-        // No-op.
-    }
-
-    /**
-     * @param cacheId Cache ID.
-     * @param keyCnt Key count.
-     * @param addDepInfo Deployment info flag.
-     */
-    public GridNearUnlockRequest(int cacheId, int keyCnt, boolean addDepInfo) {
-        super(cacheId, keyCnt, addDepInfo);
-    }
-
-    /** {@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();
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public short directType() {
-        return 57;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridNearUnlockRequest.class, this, super.toString());
-    }
-}
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties 
b/modules/core/src/main/resources/META-INF/classnames.properties
index e2606fe9983..6e72233f68e 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1066,7 +1066,6 @@ 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishR
 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse
 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest
 
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse
-org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest
 
org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy
 
org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter$AbstractMiniFuture$1
 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentRequest
@@ -1267,7 +1266,7 @@ 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$Fin
 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareFutureAdapter$1
 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest
 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse
-org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest
+org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest
 
org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairAbstractFuture$IgniteConsistencyCheckFailedException
 
org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairAbstractFuture$IgniteConsistencyRepairFailedException
 
org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteAtomicConsistencyViolationException
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
index f6511a62ecc..ea7ca8913f7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
@@ -28,7 +28,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.managers.communication.GridIoMessage;
-import 
org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
+import 
org.apache.ignite.internal.processors.cache.distributed.GridNearUnlockRequest;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteRunnable;
 import org.apache.ignite.plugin.extensions.communication.Message;

Reply via email to