You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/02/25 13:31:49 UTC
[50/51] [abbrv] ignite git commit: Review.
Review.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0a042449
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0a042449
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0a042449
Branch: refs/heads/ignite-2523
Commit: 0a04244945c2f9fef22bf7ae25d7605921a2e605
Parents: 1829f44
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Feb 25 15:20:59 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Feb 25 15:20:59 2016 +0300
----------------------------------------------------------------------
.../dht/atomic/GridDhtAtomicCache.java | 58 ++--
.../GridDhtAtomicMultipleUpdateRequest.java | 2 +-
.../GridDhtAtomicMultipleUpdateResponse.java | 2 +-
.../GridDhtAtomicSingleUpdateRequest.java | 2 +-
.../GridDhtAtomicSingleUpdateResponse.java | 2 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 28 +-
.../dht/atomic/GridDhtAtomicUpdateRequest.java | 271 +++++++++++++++++++
.../GridDhtAtomicUpdateRequestInterface.java | 271 -------------------
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 111 ++++++++
.../GridDhtAtomicUpdateResponseInterface.java | 112 --------
.../GridNearAtomicMultipleUpdateRequest.java | 8 +-
.../GridNearAtomicMultipleUpdateResponse.java | 2 +-
.../GridNearAtomicSingleUpdateRequest.java | 8 +-
.../GridNearAtomicSingleUpdateResponse.java | 2 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 38 +--
.../dht/atomic/GridNearAtomicUpdateRequest.java | 207 ++++++++++++++
.../GridNearAtomicUpdateRequestInterface.java | 207 --------------
.../atomic/GridNearAtomicUpdateResponse.java | 211 +++++++++++++++
.../GridNearAtomicUpdateResponseInterface.java | 211 ---------------
.../distributed/near/GridNearAtomicCache.java | 16 +-
.../IgniteClientReconnectCollectionsTest.java | 4 +-
...niteCacheClientNodeChangingTopologyTest.java | 4 +-
22 files changed, 888 insertions(+), 889 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 6965a9c..d1423f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -141,7 +141,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
Integer.getInteger(IGNITE_ATOMIC_DEFERRED_ACK_TIMEOUT, 500);
/** Update reply closure. */
- private CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> updateReplyClos;
+ private CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> updateReplyClos;
/** Pending */
private ConcurrentMap<UUID, DeferredResponseBuffer> pendingResponses = new ConcurrentHashMap8<>();
@@ -194,9 +194,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
});
- updateReplyClos = new CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface>() {
+ updateReplyClos = new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
- @Override public void apply(GridNearAtomicUpdateRequestInterface req, GridNearAtomicUpdateResponseInterface res) {
+ @Override public void apply(GridNearAtomicUpdateRequest req, GridNearAtomicUpdateResponse res) {
if (ctx.config().getAtomicWriteOrderMode() == CLOCK) {
assert req.writeSynchronizationMode() != FULL_ASYNC : req;
@@ -1331,8 +1331,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
*/
public void updateAllAsyncInternal(
final UUID nodeId,
- final GridNearAtomicUpdateRequestInterface req,
- final CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb
+ final GridNearAtomicUpdateRequest req,
+ final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
) {
IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
@@ -1356,10 +1356,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
*/
public void updateAllAsyncInternal0(
UUID nodeId,
- GridNearAtomicUpdateRequestInterface req,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb
+ GridNearAtomicUpdateRequest req,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
) {
- GridNearAtomicUpdateResponseInterface res;
+ GridNearAtomicUpdateResponse res;
if (req instanceof GridNearAtomicSingleUpdateRequest)
res = new GridNearAtomicSingleUpdateResponse(ctx.cacheId(), nodeId, req.futureVersion(),
@@ -1588,12 +1588,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
private UpdateBatchResult updateWithBatch(
ClusterNode node,
boolean hasNear,
- GridNearAtomicUpdateRequestInterface req,
- GridNearAtomicUpdateResponseInterface res,
+ GridNearAtomicUpdateRequest req,
+ GridNearAtomicUpdateResponse res,
List<GridDhtCacheEntry> locked,
GridCacheVersion ver,
@Nullable GridDhtAtomicUpdateFuture dhtFut,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb,
boolean replicate,
String taskName,
@Nullable IgniteCacheExpiryPolicy expiry,
@@ -2004,12 +2004,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
private UpdateSingleResult updateSingle(
ClusterNode node,
boolean hasNear,
- GridNearAtomicUpdateRequestInterface req,
- GridNearAtomicUpdateResponseInterface res,
+ GridNearAtomicUpdateRequest req,
+ GridNearAtomicUpdateResponse res,
List<GridDhtCacheEntry> locked,
GridCacheVersion ver,
@Nullable GridDhtAtomicUpdateFuture dhtFut,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb,
boolean replicate,
String taskName,
@Nullable IgniteCacheExpiryPolicy expiry,
@@ -2266,9 +2266,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
@Nullable Collection<KeyCacheObject> rmvKeys,
@Nullable Map<KeyCacheObject, EntryProcessor<Object, Object, Object>> entryProcessorMap,
@Nullable GridDhtAtomicUpdateFuture dhtFut,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb,
- final GridNearAtomicUpdateRequestInterface req,
- final GridNearAtomicUpdateResponseInterface res,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb,
+ final GridNearAtomicUpdateRequest req,
+ final GridNearAtomicUpdateResponse res,
boolean replicate,
UpdateBatchResult batchRes,
String taskName,
@@ -2658,8 +2658,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* will return false.
* @return {@code True} if filter evaluation succeeded.
*/
- private boolean checkFilter(GridCacheEntryEx entry, GridNearAtomicUpdateRequestInterface req,
- GridNearAtomicUpdateResponseInterface res) {
+ private boolean checkFilter(GridCacheEntryEx entry, GridNearAtomicUpdateRequest req,
+ GridNearAtomicUpdateResponse res) {
try {
return ctx.isAllLocked(entry, req.filter());
}
@@ -2673,7 +2673,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/**
* @param req Request to remap.
*/
- private void remapToNewPrimary(GridNearAtomicUpdateRequestInterface req) {
+ private void remapToNewPrimary(GridNearAtomicUpdateRequest req) {
assert req.writeSynchronizationMode() == FULL_ASYNC : req;
if (log.isDebugEnabled())
@@ -2752,9 +2752,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
*/
@Nullable private GridDhtAtomicUpdateFuture createDhtFuture(
GridCacheVersion writeVer,
- GridNearAtomicUpdateRequestInterface updateReq,
- GridNearAtomicUpdateResponseInterface updateRes,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb,
+ GridNearAtomicUpdateRequest updateReq,
+ GridNearAtomicUpdateResponse updateRes,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb,
boolean force
) {
if (!force) {
@@ -2785,7 +2785,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param nodeId Sender node ID.
* @param req Near atomic update request.
*/
- private void processNearAtomicUpdateRequest(UUID nodeId, GridNearAtomicUpdateRequestInterface req) {
+ private void processNearAtomicUpdateRequest(UUID nodeId, GridNearAtomicUpdateRequest req) {
if (log.isDebugEnabled())
log.debug("Processing near atomic update request [nodeId=" + nodeId + ", req=" + req + ']');
@@ -2799,7 +2799,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param res Near atomic update response.
*/
@SuppressWarnings("unchecked")
- private void processNearAtomicUpdateResponse(UUID nodeId, GridNearAtomicUpdateResponseInterface res) {
+ private void processNearAtomicUpdateResponse(UUID nodeId, GridNearAtomicUpdateResponse res) {
if (log.isDebugEnabled())
log.debug("Processing near atomic update response [nodeId=" + nodeId + ", res=" + res + ']');
@@ -2818,14 +2818,14 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param nodeId Sender node ID.
* @param req Dht atomic update request.
*/
- private void processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicUpdateRequestInterface req) {
+ private void processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicUpdateRequest req) {
if (log.isDebugEnabled())
log.debug("Processing dht atomic update request [nodeId=" + nodeId + ", req=" + req + ']');
GridCacheVersion ver = req.writeVersion();
// Always send update reply.
- GridDhtAtomicUpdateResponseInterface res;
+ GridDhtAtomicUpdateResponse res;
if (req instanceof GridDhtAtomicSingleUpdateRequest)
res = new GridDhtAtomicSingleUpdateResponse(ctx.cacheId(), req.futureVersion(),
@@ -2999,7 +2999,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param res Dht atomic update response.
*/
@SuppressWarnings("unchecked")
- private void processDhtAtomicUpdateResponse(UUID nodeId, GridDhtAtomicUpdateResponseInterface res) {
+ private void processDhtAtomicUpdateResponse(UUID nodeId, GridDhtAtomicUpdateResponse res) {
if (log.isDebugEnabled())
log.debug("Processing dht atomic update response [nodeId=" + nodeId + ", res=" + res + ']');
@@ -3036,7 +3036,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param nodeId Originating node ID.
* @param res Near update response.
*/
- private void sendNearUpdateReply(UUID nodeId, GridNearAtomicUpdateResponseInterface res) {
+ private void sendNearUpdateReply(UUID nodeId, GridNearAtomicUpdateResponse res) {
try {
ctx.io().send(nodeId, (GridCacheMessage)res, ctx.ioPolicy());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateRequest.java
index de89b47..becec6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateRequest.java
@@ -49,7 +49,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Lite dht cache backup update request.
*/
-public class GridDhtAtomicMultipleUpdateRequest extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateRequestInterface {
+public class GridDhtAtomicMultipleUpdateRequest extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateRequest {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateResponse.java
index 4853ef5..6f11686 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicMultipleUpdateResponse.java
@@ -41,7 +41,7 @@ import org.apache.ignite.plugin.extensions.communication.MessageWriter;
/**
* DHT atomic cache backup update response.
*/
-public class GridDhtAtomicMultipleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateResponseInterface {
+public class GridDhtAtomicMultipleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateResponse {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
index a2ed9b1..2b29df6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
@@ -43,7 +43,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.UUID;
-public class GridDhtAtomicSingleUpdateRequest extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateRequestInterface {
+public class GridDhtAtomicSingleUpdateRequest extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateRequest {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateResponse.java
index 488bf7f..fc5a8b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateResponse.java
@@ -35,7 +35,7 @@ import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Collections;
-public class GridDhtAtomicSingleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateResponseInterface {
+public class GridDhtAtomicSingleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridDhtAtomicUpdateResponse {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
index 6e2ed31..df50542 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
@@ -79,20 +79,20 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
/** Completion callback. */
@GridToStringExclude
- private final CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb;
+ private final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb;
/** Mappings. */
@GridToStringInclude
- private final Map<UUID, GridDhtAtomicUpdateRequestInterface> mappings;
+ private final Map<UUID, GridDhtAtomicUpdateRequest> mappings;
/** Entries with readers. */
private Map<KeyCacheObject, GridDhtCacheEntry> nearReadersEntries;
/** Update request. */
- private final GridNearAtomicUpdateRequestInterface updateReq;
+ private final GridNearAtomicUpdateRequest updateReq;
/** Update response. */
- private final GridNearAtomicUpdateResponseInterface updateRes;
+ private final GridNearAtomicUpdateResponse updateRes;
/** Future keys. */
private final Collection<KeyCacheObject> keys;
@@ -115,10 +115,10 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
*/
public GridDhtAtomicUpdateFuture(
GridCacheContext cctx,
- CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface> completionCb,
+ CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb,
GridCacheVersion writeVer,
- GridNearAtomicUpdateRequestInterface updateReq,
- GridNearAtomicUpdateResponseInterface updateRes
+ GridNearAtomicUpdateRequest updateReq,
+ GridNearAtomicUpdateResponse updateRes
) {
this.cctx = cctx;
this.writeVer = writeVer;
@@ -171,7 +171,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
private boolean registerResponse(UUID nodeId) {
int resCnt0;
- GridDhtAtomicUpdateRequestInterface req = mappings.get(nodeId);
+ GridDhtAtomicUpdateRequest req = mappings.get(nodeId);
if (req != null) {
synchronized (this) {
@@ -248,7 +248,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
UUID nodeId = node.id();
if (!nodeId.equals(cctx.localNodeId())) {
- GridDhtAtomicUpdateRequestInterface updateReq = mappings.get(nodeId);
+ GridDhtAtomicUpdateRequest updateReq = mappings.get(nodeId);
if (updateReq == null) {
if (this.updateReq instanceof GridNearAtomicSingleUpdateRequest)
@@ -338,7 +338,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
AffinityTopologyVersion topVer = updateReq.topologyVersion();
for (UUID nodeId : readers) {
- GridDhtAtomicUpdateRequestInterface updateReq = mappings.get(nodeId);
+ GridDhtAtomicUpdateRequest updateReq = mappings.get(nodeId);
if (updateReq == null) {
ClusterNode node = cctx.discovery().node(nodeId);
@@ -402,7 +402,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
Collection<KeyCacheObject> hndKeys = new ArrayList<>(keys.size());
exit:
- for (GridDhtAtomicUpdateRequestInterface req : mappings.values()) {
+ for (GridDhtAtomicUpdateRequest req : mappings.values()) {
for (int i = 0; i < req.size(); i++) {
KeyCacheObject key = req.key(i);
@@ -432,7 +432,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
if (lsnrs != null) {
Collection<KeyCacheObject> hndKeys = new ArrayList<>(keys.size());
- exit: for (GridDhtAtomicUpdateRequestInterface req : mappings.values()) {
+ exit: for (GridDhtAtomicUpdateRequest req : mappings.values()) {
for (int i = 0; i < req.size(); i++) {
KeyCacheObject key = req.key(i);
@@ -480,7 +480,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
*/
public void map() {
if (!mappings.isEmpty()) {
- for (GridDhtAtomicUpdateRequestInterface req : mappings.values()) {
+ for (GridDhtAtomicUpdateRequest req : mappings.values()) {
try {
if (log.isDebugEnabled())
log.debug("Sending DHT atomic update request [nodeId=" + req.nodeId() + ", req=" + req + ']');
@@ -516,7 +516,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void> implement
* @param nodeId Backup node ID.
* @param updateRes Update response.
*/
- public void onResult(UUID nodeId, GridDhtAtomicUpdateResponseInterface updateRes) {
+ public void onResult(UUID nodeId, GridDhtAtomicUpdateResponse updateRes) {
if (log.isDebugEnabled())
log.debug("Received DHT atomic update future result [nodeId=" + nodeId + ", updateRes=" + updateRes + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
new file mode 100644
index 0000000..3e97462
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@ -0,0 +1,271 @@
+/*
+ * 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.dht.atomic;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
+import javax.cache.processor.EntryProcessor;
+import java.util.Collection;
+import java.util.UUID;
+
+/**
+ * Base interface for DHT atomic update requests.
+ */
+public interface GridDhtAtomicUpdateRequest extends Message {
+
+ /**
+ * @return Force transform backups flag.
+ */
+ boolean forceTransformBackups();
+
+ /**
+ * @param key Key to add.
+ * @param val Value, {@code null} if should be removed.
+ * @param entryProcessor Entry processor.
+ * @param ttl TTL (optional).
+ * @param conflictExpireTime Conflict expire time (optional).
+ * @param conflictVer Conflict version (optional).
+ * @param addPrevVal If {@code true} adds previous value.
+ * @param prevVal Previous value.
+ */
+ void addWriteValue(KeyCacheObject key,
+ @Nullable CacheObject val,
+ EntryProcessor<Object, Object, Object> entryProcessor,
+ long ttl,
+ long conflictExpireTime,
+ @Nullable GridCacheVersion conflictVer,
+ boolean addPrevVal,
+ int partId,
+ @Nullable CacheObject prevVal,
+ @Nullable Long updateIdx,
+ boolean storeLocPrevVal);
+
+ /**
+ * @param key Key to add.
+ * @param val Value, {@code null} if should be removed.
+ * @param entryProcessor Entry processor.
+ * @param ttl TTL.
+ * @param expireTime Expire time.
+ */
+ void addNearWriteValue(KeyCacheObject key,
+ @Nullable CacheObject val,
+ EntryProcessor<Object, Object, Object> entryProcessor,
+ long ttl,
+ long expireTime);
+
+ /**
+ * Gets message lookup index. See {@link GridCacheMessage#lookupIndex()}.
+ *
+ * @return Message lookup index.
+ */
+ int lookupIndex();
+
+ /**
+ * @return Node ID.
+ */
+ UUID nodeId();
+
+ /**
+ * @return Subject ID.
+ */
+ UUID subjectId();
+
+ /**
+ * @return Task name.
+ */
+ int taskNameHash();
+
+ /**
+ * @return Keys size.
+ */
+ int size();
+
+ /**
+ * @return Keys size.
+ */
+ int nearSize();
+
+ /**
+ * @return Version assigned on primary node.
+ */
+ GridCacheVersion futureVersion();
+
+ /**
+ * @return Write version.
+ */
+ GridCacheVersion writeVersion();
+
+ /**
+ * @return Cache write synchronization mode.
+ */
+ CacheWriteSynchronizationMode writeSynchronizationMode();
+
+ /**
+ * @return Topology version.
+ */
+ AffinityTopologyVersion topologyVersion();
+
+ /**
+ * @return Keys.
+ */
+ Collection<KeyCacheObject> keys();
+
+ /**
+ * @param idx Key index.
+ * @return Key.
+ */
+ KeyCacheObject key(int idx);
+
+ /**
+ * @param idx Partition index.
+ * @return Partition id.
+ */
+ int partitionId(int idx);
+
+ /**
+ * @param updCntr Update counter.
+ * @return Update counter.
+ */
+ Long updateCounter(int updCntr);
+
+ /**
+ * @param idx Near key index.
+ * @return Key.
+ */
+ KeyCacheObject nearKey(int idx);
+
+ /**
+ * @return Keep binary flag.
+ */
+ boolean keepBinary();
+
+ /**
+ * @param idx Key index.
+ * @return Value.
+ */
+ @Nullable CacheObject value(int idx);
+
+ /**
+ * @param idx Key index.
+ * @return Value.
+ */
+ @Nullable CacheObject previousValue(int idx);
+
+ /**
+ * @param idx Key index.
+ * @return Value.
+ */
+ @Nullable CacheObject localPreviousValue(int idx);
+
+ /**
+ * @param idx Key index.
+ * @return Entry processor.
+ */
+ @Nullable EntryProcessor<Object, Object, Object> entryProcessor(int idx);
+
+ /**
+ * @param idx Near key index.
+ * @return Value.
+ */
+ @Nullable CacheObject nearValue(int idx);
+
+ /**
+ * @param idx Key index.
+ * @return Transform closure.
+ */
+ @Nullable EntryProcessor<Object, Object, Object> nearEntryProcessor(int idx);
+
+ /**
+ * @param idx Index.
+ * @return Conflict version.
+ */
+ @Nullable GridCacheVersion conflictVersion(int idx);
+
+ /**
+ * @param idx Index.
+ * @return TTL.
+ */
+ long ttl(int idx);
+
+ /**
+ * @param idx Index.
+ * @return TTL for near cache update.
+ */
+ long nearTtl(int idx);
+
+ /**
+ * @param idx Index.
+ * @return Conflict expire time.
+ */
+ long conflictExpireTime(int idx);
+
+ /**
+ * @param idx Index.
+ * @return Expire time for near cache update.
+ */
+ long nearExpireTime(int idx);
+
+ /**
+ * @return {@code True} if on response flag changed.
+ */
+ boolean onResponse();
+
+ /**
+ * @return Optional arguments for entry processor.
+ */
+ @Nullable Object[] invokeArguments();
+
+ /**
+ * This method is called before the whole message is serialized
+ * and is responsible for pre-marshalling state.
+ *
+ * @param ctx Cache context.
+ * @throws IgniteCheckedException If failed.
+ */
+ void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException;
+
+ /**
+ * This method is called after the message is deserialized and is responsible for
+ * unmarshalling state marshalled in {@link #prepareMarshal(GridCacheSharedContext)} method.
+ *
+ * @param ctx Context.
+ * @param ldr Class loader.
+ * @throws IgniteCheckedException If failed.
+ */
+ void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException;
+
+ /**
+ * Deployment enabled flag indicates whether deployment info has to be added to this message.
+ *
+ * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
+ */
+ boolean addDeploymentInfo();
+
+ /**
+ * @return Error.
+ */
+ IgniteCheckedException classError();
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequestInterface.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequestInterface.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequestInterface.java
deleted file mode 100644
index 43e6698..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequestInterface.java
+++ /dev/null
@@ -1,271 +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.dht.atomic;
-
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheObject;
-import org.apache.ignite.internal.processors.cache.GridCacheMessage;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
-import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.plugin.extensions.communication.Message;
-import org.jetbrains.annotations.Nullable;
-import javax.cache.processor.EntryProcessor;
-import java.util.Collection;
-import java.util.UUID;
-
-/**
- * Base interface for DHT atomic update requests.
- */
-public interface GridDhtAtomicUpdateRequestInterface extends Message {
-
- /**
- * @return Force transform backups flag.
- */
- boolean forceTransformBackups();
-
- /**
- * @param key Key to add.
- * @param val Value, {@code null} if should be removed.
- * @param entryProcessor Entry processor.
- * @param ttl TTL (optional).
- * @param conflictExpireTime Conflict expire time (optional).
- * @param conflictVer Conflict version (optional).
- * @param addPrevVal If {@code true} adds previous value.
- * @param prevVal Previous value.
- */
- void addWriteValue(KeyCacheObject key,
- @Nullable CacheObject val,
- EntryProcessor<Object, Object, Object> entryProcessor,
- long ttl,
- long conflictExpireTime,
- @Nullable GridCacheVersion conflictVer,
- boolean addPrevVal,
- int partId,
- @Nullable CacheObject prevVal,
- @Nullable Long updateIdx,
- boolean storeLocPrevVal);
-
- /**
- * @param key Key to add.
- * @param val Value, {@code null} if should be removed.
- * @param entryProcessor Entry processor.
- * @param ttl TTL.
- * @param expireTime Expire time.
- */
- void addNearWriteValue(KeyCacheObject key,
- @Nullable CacheObject val,
- EntryProcessor<Object, Object, Object> entryProcessor,
- long ttl,
- long expireTime);
-
- /**
- * Gets message lookup index. See {@link GridCacheMessage#lookupIndex()}.
- *
- * @return Message lookup index.
- */
- int lookupIndex();
-
- /**
- * @return Node ID.
- */
- UUID nodeId();
-
- /**
- * @return Subject ID.
- */
- UUID subjectId();
-
- /**
- * @return Task name.
- */
- int taskNameHash();
-
- /**
- * @return Keys size.
- */
- int size();
-
- /**
- * @return Keys size.
- */
- int nearSize();
-
- /**
- * @return Version assigned on primary node.
- */
- GridCacheVersion futureVersion();
-
- /**
- * @return Write version.
- */
- GridCacheVersion writeVersion();
-
- /**
- * @return Cache write synchronization mode.
- */
- CacheWriteSynchronizationMode writeSynchronizationMode();
-
- /**
- * @return Topology version.
- */
- AffinityTopologyVersion topologyVersion();
-
- /**
- * @return Keys.
- */
- Collection<KeyCacheObject> keys();
-
- /**
- * @param idx Key index.
- * @return Key.
- */
- KeyCacheObject key(int idx);
-
- /**
- * @param idx Partition index.
- * @return Partition id.
- */
- int partitionId(int idx);
-
- /**
- * @param updCntr Update counter.
- * @return Update counter.
- */
- Long updateCounter(int updCntr);
-
- /**
- * @param idx Near key index.
- * @return Key.
- */
- KeyCacheObject nearKey(int idx);
-
- /**
- * @return Keep binary flag.
- */
- boolean keepBinary();
-
- /**
- * @param idx Key index.
- * @return Value.
- */
- @Nullable CacheObject value(int idx);
-
- /**
- * @param idx Key index.
- * @return Value.
- */
- @Nullable CacheObject previousValue(int idx);
-
- /**
- * @param idx Key index.
- * @return Value.
- */
- @Nullable CacheObject localPreviousValue(int idx);
-
- /**
- * @param idx Key index.
- * @return Entry processor.
- */
- @Nullable EntryProcessor<Object, Object, Object> entryProcessor(int idx);
-
- /**
- * @param idx Near key index.
- * @return Value.
- */
- @Nullable CacheObject nearValue(int idx);
-
- /**
- * @param idx Key index.
- * @return Transform closure.
- */
- @Nullable EntryProcessor<Object, Object, Object> nearEntryProcessor(int idx);
-
- /**
- * @param idx Index.
- * @return Conflict version.
- */
- @Nullable GridCacheVersion conflictVersion(int idx);
-
- /**
- * @param idx Index.
- * @return TTL.
- */
- long ttl(int idx);
-
- /**
- * @param idx Index.
- * @return TTL for near cache update.
- */
- long nearTtl(int idx);
-
- /**
- * @param idx Index.
- * @return Conflict expire time.
- */
- long conflictExpireTime(int idx);
-
- /**
- * @param idx Index.
- * @return Expire time for near cache update.
- */
- long nearExpireTime(int idx);
-
- /**
- * @return {@code True} if on response flag changed.
- */
- boolean onResponse();
-
- /**
- * @return Optional arguments for entry processor.
- */
- @Nullable Object[] invokeArguments();
-
- /**
- * This method is called before the whole message is serialized
- * and is responsible for pre-marshalling state.
- *
- * @param ctx Cache context.
- * @throws IgniteCheckedException If failed.
- */
- void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException;
-
- /**
- * This method is called after the message is deserialized and is responsible for
- * unmarshalling state marshalled in {@link #prepareMarshal(GridCacheSharedContext)} method.
- *
- * @param ctx Context.
- * @param ldr Class loader.
- * @throws IgniteCheckedException If failed.
- */
- void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException;
-
- /**
- * Deployment enabled flag indicates whether deployment info has to be added to this message.
- *
- * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
- */
- boolean addDeploymentInfo();
-
- /**
- * @return Error.
- */
- IgniteCheckedException classError();
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
new file mode 100644
index 0000000..98ac76b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
@@ -0,0 +1,111 @@
+/*
+ * 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.dht.atomic;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import java.util.Collection;
+
+/**
+ * Base interface for DHT atomic update responses.
+ */
+public interface GridDhtAtomicUpdateResponse extends Message {
+ /**
+ * Gets message lookup index. See {@link GridCacheMessage#lookupIndex()}.
+ *
+ * @return Message lookup index.
+ */
+ int lookupIndex();
+
+ /**
+ * @return Version assigned on primary node.
+ */
+ GridCacheVersion futureVersion();
+
+ /**
+ * Sets update error.
+ *
+ * @param err Error.
+ */
+ void onError(IgniteCheckedException err);
+
+ /**
+ * @return Error, if any.
+ */
+ IgniteCheckedException error();
+
+ /**
+ * @return Failed keys.
+ */
+ Collection<KeyCacheObject> failedKeys();
+
+ /**
+ * Adds key to collection of failed keys.
+ *
+ * @param key Key to add.
+ * @param e Error cause.
+ */
+ void addFailedKey(KeyCacheObject key, Throwable e);
+
+ /**
+ * @return Evicted readers.
+ */
+ Collection<KeyCacheObject> nearEvicted();
+
+ /**
+ * Adds near evicted key..
+ *
+ * @param key Evicted key.
+ */
+ void addNearEvicted(KeyCacheObject key);
+
+ /**
+ * This method is called before the whole message is serialized
+ * and is responsible for pre-marshalling state.
+ *
+ * @param ctx Cache context.
+ * @throws IgniteCheckedException If failed.
+ */
+ void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException;
+
+ /**
+ * This method is called after the message is deserialized and is responsible for
+ * unmarshalling state marshalled in {@link #prepareMarshal(GridCacheSharedContext)} method.
+ *
+ * @param ctx Context.
+ * @param ldr Class loader.
+ * @throws IgniteCheckedException If failed.
+ */
+ void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException;
+
+ /**
+ * Deployment enabled flag indicates whether deployment info has to be added to this message.
+ *
+ * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
+ */
+ boolean addDeploymentInfo();
+
+ /**
+ * @return Message ID.
+ */
+ long messageId();
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponseInterface.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponseInterface.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponseInterface.java
deleted file mode 100644
index 7defbf0..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponseInterface.java
+++ /dev/null
@@ -1,112 +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.dht.atomic;
-
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.processors.cache.GridCacheMessage;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
-import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.plugin.extensions.communication.Message;
-import java.util.Collection;
-
-/**
- * Base interface for DHT atomic update responses.
- */
-public interface GridDhtAtomicUpdateResponseInterface extends Message {
-
- /**
- * Gets message lookup index. See {@link GridCacheMessage#lookupIndex()}.
- *
- * @return Message lookup index.
- */
- int lookupIndex();
-
- /**
- * @return Version assigned on primary node.
- */
- GridCacheVersion futureVersion();
-
- /**
- * Sets update error.
- *
- * @param err Error.
- */
- void onError(IgniteCheckedException err);
-
- /**
- * @return Error, if any.
- */
- IgniteCheckedException error();
-
- /**
- * @return Failed keys.
- */
- Collection<KeyCacheObject> failedKeys();
-
- /**
- * Adds key to collection of failed keys.
- *
- * @param key Key to add.
- * @param e Error cause.
- */
- void addFailedKey(KeyCacheObject key, Throwable e);
-
- /**
- * @return Evicted readers.
- */
- Collection<KeyCacheObject> nearEvicted();
-
- /**
- * Adds near evicted key..
- *
- * @param key Evicted key.
- */
- void addNearEvicted(KeyCacheObject key);
-
- /**
- * This method is called before the whole message is serialized
- * and is responsible for pre-marshalling state.
- *
- * @param ctx Cache context.
- * @throws IgniteCheckedException If failed.
- */
- void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException;
-
- /**
- * This method is called after the message is deserialized and is responsible for
- * unmarshalling state marshalled in {@link #prepareMarshal(GridCacheSharedContext)} method.
- *
- * @param ctx Context.
- * @param ldr Class loader.
- * @throws IgniteCheckedException If failed.
- */
- void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException;
-
- /**
- * Deployment enabled flag indicates whether deployment info has to be added to this message.
- *
- * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
- */
- boolean addDeploymentInfo();
-
- /**
- * @return Message ID.
- */
- long messageId();
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateRequest.java
index d1c3654..d702202 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateRequest.java
@@ -59,7 +59,7 @@ import static org.apache.ignite.internal.processors.cache.GridCacheOperation.UPD
* Lite DHT cache update request sent from near node to primary node.
*/
public class GridNearAtomicMultipleUpdateRequest extends GridCacheMessage
- implements GridNearAtomicUpdateRequestInterface, GridCacheDeployable {
+ implements GridNearAtomicUpdateRequest, GridCacheDeployable {
/** */
private static final long serialVersionUID = 0L;
@@ -158,7 +158,7 @@ public class GridNearAtomicMultipleUpdateRequest extends GridCacheMessage
/** */
@GridDirectTransient
- private GridNearAtomicUpdateResponseInterface res;
+ private GridNearAtomicUpdateResponse res;
/** Maximum possible size of inner collections. */
@GridDirectTransient
@@ -503,7 +503,7 @@ public class GridNearAtomicMultipleUpdateRequest extends GridCacheMessage
}
/** {@inheritDoc} */
- @Override public boolean onResponse(GridNearAtomicUpdateResponseInterface res) {
+ @Override public boolean onResponse(GridNearAtomicUpdateResponse res) {
if (this.res == null) {
this.res = res;
@@ -514,7 +514,7 @@ public class GridNearAtomicMultipleUpdateRequest extends GridCacheMessage
}
/** {@inheritDoc} */
- @Override @Nullable public GridNearAtomicUpdateResponseInterface response() {
+ @Override @Nullable public GridNearAtomicUpdateResponse response() {
return res;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateResponse.java
index 15e6b1b..7cb8886 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicMultipleUpdateResponse.java
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
/**
* DHT atomic cache near update response.
*/
-public class GridNearAtomicMultipleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridNearAtomicUpdateResponseInterface {
+public class GridNearAtomicMultipleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridNearAtomicUpdateResponse {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
index ce086d2..61889e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
@@ -58,7 +58,7 @@ import static org.apache.ignite.internal.processors.cache.GridCacheOperation.UPD
* Lite DHT cache update request sent from near node to primary node.
*/
public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
- implements GridNearAtomicUpdateRequestInterface, GridCacheDeployable {
+ implements GridNearAtomicUpdateRequest, GridCacheDeployable {
/** */
private static final long serialVersionUID = 0L;
@@ -150,7 +150,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
/** */
@GridDirectTransient
- private GridNearAtomicUpdateResponseInterface res;
+ private GridNearAtomicUpdateResponse res;
/**
* Empty constructor required by {@link Externalizable}.
@@ -428,7 +428,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
}
/** {@inheritDoc} */
- @Override public boolean onResponse(GridNearAtomicUpdateResponseInterface res) {
+ @Override public boolean onResponse(GridNearAtomicUpdateResponse res) {
if (this.res == null) {
this.res = res;
@@ -439,7 +439,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
}
/** {@inheritDoc} */
- @Override @Nullable public GridNearAtomicUpdateResponseInterface response() {
+ @Override @Nullable public GridNearAtomicUpdateResponse response() {
return res;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
index 075f477..c7e5c8e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
@@ -41,7 +41,7 @@ import java.util.Collections;
import java.util.List;
import java.util.UUID;
-public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridNearAtomicUpdateResponseInterface {
+public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage implements GridCacheDeployable, GridNearAtomicUpdateResponse {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index de89d91..82a2a8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -339,7 +339,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param nodeId Node ID.
* @param res Update response.
*/
- public void onResult(UUID nodeId, GridNearAtomicUpdateResponseInterface res) {
+ public void onResult(UUID nodeId, GridNearAtomicUpdateResponse res) {
state.onResult(nodeId, res, false);
}
@@ -349,7 +349,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param req Update request.
* @param res Update response.
*/
- private void updateNear(GridNearAtomicUpdateRequestInterface req, GridNearAtomicUpdateResponseInterface res) {
+ private void updateNear(GridNearAtomicUpdateRequest req, GridNearAtomicUpdateResponse res) {
assert nearEnabled;
if (res.remapKeys() != null || !req.hasPrimary())
@@ -451,12 +451,12 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param nodeId Node ID.
* @param req Request.
*/
- private void mapSingle(UUID nodeId, GridNearAtomicUpdateRequestInterface req) {
+ private void mapSingle(UUID nodeId, GridNearAtomicUpdateRequest req) {
if (cctx.localNodeId().equals(nodeId)) {
cache.updateAllAsyncInternal(nodeId, req,
- new CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface>() {
- @Override public void apply(GridNearAtomicUpdateRequestInterface req,
- GridNearAtomicUpdateResponseInterface res) {
+ new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
+ @Override public void apply(GridNearAtomicUpdateRequest req,
+ GridNearAtomicUpdateResponse res) {
onResult(res.nodeId(), res);
}
});
@@ -510,9 +510,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
if (locUpdate != null) {
cache.updateAllAsyncInternal(cctx.localNodeId(), locUpdate,
- new CI2<GridNearAtomicUpdateRequestInterface, GridNearAtomicUpdateResponseInterface>() {
- @Override public void apply(GridNearAtomicUpdateRequestInterface req,
- GridNearAtomicUpdateResponseInterface res) {
+ new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
+ @Override public void apply(GridNearAtomicUpdateRequest req,
+ GridNearAtomicUpdateResponse res) {
onResult(res.nodeId(), res);
}
});
@@ -555,7 +555,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
private Collection<KeyCacheObject> remapKeys;
/** Not null is operation is mapped to single node. */
- private GridNearAtomicUpdateRequestInterface singleReq;
+ private GridNearAtomicUpdateRequest singleReq;
/** Operation result. */
private GridCacheReturn opRes;
@@ -571,10 +571,10 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param nodeId Left node ID.
*/
void onNodeLeft(UUID nodeId) {
- GridNearAtomicUpdateResponseInterface res = null;
+ GridNearAtomicUpdateResponse res = null;
synchronized (this) {
- GridNearAtomicUpdateRequestInterface req;
+ GridNearAtomicUpdateRequest req;
if (singleReq != null)
req = singleReq.nodeId().equals(nodeId) ? singleReq : null;
@@ -612,8 +612,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param nodeErr {@code True} if response was created on node failure.
*/
@SuppressWarnings({"unchecked", "ThrowableResultOfMethodCallIgnored"}) void onResult(UUID nodeId,
- GridNearAtomicUpdateResponseInterface res, boolean nodeErr) {
- GridNearAtomicUpdateRequestInterface req;
+ GridNearAtomicUpdateResponse res, boolean nodeErr) {
+ GridNearAtomicUpdateRequest req;
AffinityTopologyVersion remapTopVer = null;
@@ -744,7 +744,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
if (rcvAll && nearEnabled) {
if (mappings != null) {
for (GridNearAtomicMultipleUpdateRequest req0 : mappings.values()) {
- GridNearAtomicUpdateResponseInterface res0 = req0.response();
+ GridNearAtomicUpdateResponse res0 = req0.response();
assert res0 != null : req0;
@@ -817,9 +817,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @param req Request.
* @param e Error.
*/
- void onSendError(GridNearAtomicUpdateRequestInterface req, IgniteCheckedException e) {
+ void onSendError(GridNearAtomicUpdateRequest req, IgniteCheckedException e) {
synchronized (this) {
- GridNearAtomicUpdateResponseInterface res;
+ GridNearAtomicUpdateResponse res;
if (req instanceof GridNearAtomicSingleUpdateRequest)
res = new GridNearAtomicSingleUpdateResponse(cctx.cacheId(),
@@ -853,7 +853,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
}
Exception err = null;
- GridNearAtomicUpdateRequestInterface singleReq0 = null;
+ GridNearAtomicUpdateRequest singleReq0 = null;
Map<UUID, GridNearAtomicMultipleUpdateRequest> mappings0 = null;
int size = keys.size();
@@ -1138,7 +1138,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
* @return Request.
* @throws Exception If failed.
*/
- private GridNearAtomicUpdateRequestInterface mapSingleUpdate(AffinityTopologyVersion topVer,
+ private GridNearAtomicUpdateRequest mapSingleUpdate(AffinityTopologyVersion topVer,
Collection<ClusterNode> topNodes, GridCacheVersion futVer, @Nullable GridCacheVersion updVer)
throws Exception {
Object key = F.first(keys);
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
new file mode 100644
index 0000000..b2d847b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -0,0 +1,207 @@
+/*
+ * 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.dht.atomic;
+
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.GridCacheOperation;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
+
+import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.processor.EntryProcessor;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * Base interface for near atomic update requests.
+ */
+public interface GridNearAtomicUpdateRequest extends Message {
+ /**
+ * @return Message ID.
+ */
+ public long messageId();
+
+ /**
+ * @return Mapped node ID.
+ */
+ public UUID nodeId();
+
+ /**
+ * @param nodeId Node ID.
+ */
+ public void nodeId(UUID nodeId);
+
+ /**
+ * @return Subject ID.
+ */
+ public UUID subjectId();
+
+ /**
+ * @return Task name hash.
+ */
+ public int taskNameHash();
+
+ /**
+ * @return Future version.
+ */
+ public GridCacheVersion futureVersion();
+
+ /**
+ * @return Flag indicating whether this is fast-map udpate.
+ */
+ public boolean fastMap();
+
+ /**
+ * @return Update version for fast-map request.
+ */
+ public GridCacheVersion updateVersion();
+
+ /**
+ * @return Topology version.
+ */
+ public AffinityTopologyVersion topologyVersion();
+
+ /**
+ * @return Topology locked flag.
+ */
+ public boolean topologyLocked();
+
+ /**
+ * @return {@code True} if request sent from client node.
+ */
+ public boolean clientRequest();
+
+ /**
+ * @return Cache write synchronization mode.
+ */
+ public CacheWriteSynchronizationMode writeSynchronizationMode();
+
+ /**
+ * @return Expiry policy.
+ */
+ public ExpiryPolicy expiry();
+
+ /**
+ * @return Return value flag.
+ */
+ public boolean returnValue();
+
+ /**
+ * @return Filter.
+ */
+ @Nullable public CacheEntryPredicate[] filter();
+
+ /**
+ * @return Skip write-through to a persistent storage.
+ */
+ public boolean skipStore();
+
+ /**
+ * @return Keep binary flag.
+ */
+ public boolean keepBinary();
+
+ /**
+ * @return Keys for this update request.
+ */
+ public List<KeyCacheObject> keys();
+
+ /**
+ * @return Values for this update request.
+ */
+ public List<?> values();
+
+ /**
+ * @return Update operation.
+ */
+ public GridCacheOperation operation();
+
+ /**
+ * @return Optional arguments for entry processor.
+ */
+ @Nullable public Object[] invokeArguments();
+
+ /**
+ * @param idx Key index.
+ * @return Value.
+ */
+ public CacheObject value(int idx);
+
+ /**
+ * @param idx Key index.
+ * @return Entry processor.
+ */
+ public EntryProcessor<Object, Object, Object> entryProcessor(int idx);
+
+ /**
+ * @param idx Index to get.
+ * @return Write value - either value, or transform closure.
+ */
+ public CacheObject writeValue(int idx);
+
+ /**
+ * @return Conflict versions.
+ */
+ @Nullable public List<GridCacheVersion> conflictVersions();
+
+ /**
+ * @param idx Index.
+ * @return Conflict version.
+ */
+ @Nullable public GridCacheVersion conflictVersion(int idx);
+
+ /**
+ * @param idx Index.
+ * @return Conflict TTL.
+ */
+ public long conflictTtl(int idx);
+
+ /**
+ * @param idx Index.
+ * @return Conflict expire time.
+ */
+ public long conflictExpireTime(int idx);
+
+ /**
+ * @return Flag indicating whether this request contains primary keys.
+ */
+ public boolean hasPrimary();
+
+ /**
+ * @param res Response.
+ * @return {@code True} if current response was {@code null}.
+ */
+ public boolean onResponse(GridNearAtomicUpdateResponse res);
+
+ /**
+ * @return Response.
+ */
+ @Nullable public GridNearAtomicUpdateResponse response();
+
+ /**
+ * Cleanup values.
+ *
+ * @param clearKeys If {@code true} clears keys.
+ */
+ void cleanup(boolean clearKeys);
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequestInterface.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequestInterface.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequestInterface.java
deleted file mode 100644
index f0f511b..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequestInterface.java
+++ /dev/null
@@ -1,207 +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.dht.atomic;
-
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
-import org.apache.ignite.internal.processors.cache.CacheObject;
-import org.apache.ignite.internal.processors.cache.GridCacheOperation;
-import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.plugin.extensions.communication.Message;
-import org.jetbrains.annotations.Nullable;
-
-import javax.cache.expiry.ExpiryPolicy;
-import javax.cache.processor.EntryProcessor;
-import java.util.List;
-import java.util.UUID;
-
-/**
- * Base interface for near atomic update requests.
- */
-public interface GridNearAtomicUpdateRequestInterface extends Message {
- /**
- * @return Message ID.
- */
- public long messageId();
-
- /**
- * @return Mapped node ID.
- */
- public UUID nodeId();
-
- /**
- * @param nodeId Node ID.
- */
- public void nodeId(UUID nodeId);
-
- /**
- * @return Subject ID.
- */
- public UUID subjectId();
-
- /**
- * @return Task name hash.
- */
- public int taskNameHash();
-
- /**
- * @return Future version.
- */
- public GridCacheVersion futureVersion();
-
- /**
- * @return Flag indicating whether this is fast-map udpate.
- */
- public boolean fastMap();
-
- /**
- * @return Update version for fast-map request.
- */
- public GridCacheVersion updateVersion();
-
- /**
- * @return Topology version.
- */
- public AffinityTopologyVersion topologyVersion();
-
- /**
- * @return Topology locked flag.
- */
- public boolean topologyLocked();
-
- /**
- * @return {@code True} if request sent from client node.
- */
- public boolean clientRequest();
-
- /**
- * @return Cache write synchronization mode.
- */
- public CacheWriteSynchronizationMode writeSynchronizationMode();
-
- /**
- * @return Expiry policy.
- */
- public ExpiryPolicy expiry();
-
- /**
- * @return Return value flag.
- */
- public boolean returnValue();
-
- /**
- * @return Filter.
- */
- @Nullable public CacheEntryPredicate[] filter();
-
- /**
- * @return Skip write-through to a persistent storage.
- */
- public boolean skipStore();
-
- /**
- * @return Keep binary flag.
- */
- public boolean keepBinary();
-
- /**
- * @return Keys for this update request.
- */
- public List<KeyCacheObject> keys();
-
- /**
- * @return Values for this update request.
- */
- public List<?> values();
-
- /**
- * @return Update operation.
- */
- public GridCacheOperation operation();
-
- /**
- * @return Optional arguments for entry processor.
- */
- @Nullable public Object[] invokeArguments();
-
- /**
- * @param idx Key index.
- * @return Value.
- */
- public CacheObject value(int idx);
-
- /**
- * @param idx Key index.
- * @return Entry processor.
- */
- public EntryProcessor<Object, Object, Object> entryProcessor(int idx);
-
- /**
- * @param idx Index to get.
- * @return Write value - either value, or transform closure.
- */
- public CacheObject writeValue(int idx);
-
- /**
- * @return Conflict versions.
- */
- @Nullable public List<GridCacheVersion> conflictVersions();
-
- /**
- * @param idx Index.
- * @return Conflict version.
- */
- @Nullable public GridCacheVersion conflictVersion(int idx);
-
- /**
- * @param idx Index.
- * @return Conflict TTL.
- */
- public long conflictTtl(int idx);
-
- /**
- * @param idx Index.
- * @return Conflict expire time.
- */
- public long conflictExpireTime(int idx);
-
- /**
- * @return Flag indicating whether this request contains primary keys.
- */
- public boolean hasPrimary();
-
- /**
- * @param res Response.
- * @return {@code True} if current response was {@code null}.
- */
- public boolean onResponse(GridNearAtomicUpdateResponseInterface res);
-
- /**
- * @return Response.
- */
- @Nullable public GridNearAtomicUpdateResponseInterface response();
-
- /**
- * Cleanup values.
- *
- * @param clearKeys If {@code true} clears keys.
- */
- void cleanup(boolean clearKeys);
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0a042449/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
new file mode 100644
index 0000000..4c4e8c1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -0,0 +1,211 @@
+/*
+ * 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.dht.atomic;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheReturn;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * Base interface for near atomic update responses.
+ */
+public interface GridNearAtomicUpdateResponse extends Message {
+
+ /**
+ * Gets message lookup index. See {@link GridCacheMessage#lookupIndex()}.
+ *
+ * @return Message lookup index.
+ */
+ int lookupIndex();
+
+ /**
+ * @return Mapped node ID.
+ */
+ UUID nodeId();
+
+ /**
+ * @param nodeId Node ID.
+ */
+ void nodeId(UUID nodeId);
+
+ /**
+ * @return Future version.
+ */
+ GridCacheVersion futureVersion();
+
+ /**
+ * Sets update error.
+ *
+ * @param err Error.
+ */
+ void error(IgniteCheckedException err);
+
+ /**
+ * @return Error, if any.
+ */
+ IgniteCheckedException error();
+
+ /**
+ * @return Collection of failed keys.
+ */
+ Collection<KeyCacheObject> failedKeys();
+
+ /**
+ * @return Return value.
+ */
+ GridCacheReturn returnValue();
+
+ /**
+ * @param ret Return value.
+ */
+ @SuppressWarnings("unchecked") void returnValue(GridCacheReturn ret);
+
+ /**
+ * @param remapKeys Remap keys.
+ */
+ void remapKeys(List<KeyCacheObject> remapKeys);
+
+ /**
+ * @return Remap keys.
+ */
+ Collection<KeyCacheObject> remapKeys();
+
+ /**
+ * Adds value to be put in near cache on originating node.
+ *
+ * @param keyIdx Key index.
+ * @param val Value.
+ * @param ttl TTL for near cache update.
+ * @param expireTime Expire time for near cache update.
+ */
+ void addNearValue(int keyIdx,
+ @Nullable CacheObject val,
+ long ttl,
+ long expireTime);
+
+ /**
+ * @param keyIdx Key index.
+ * @param ttl TTL for near cache update.
+ * @param expireTime Expire time for near cache update.
+ */
+ @SuppressWarnings("ForLoopReplaceableByForEach") void addNearTtl(int keyIdx, long ttl, long expireTime);
+
+ /**
+ * @param idx Index.
+ * @return Expire time for near cache update.
+ */
+ long nearExpireTime(int idx);
+
+ /**
+ * @param idx Index.
+ * @return TTL for near cache update.
+ */
+ long nearTtl(int idx);
+
+ /**
+ * @param nearVer Version generated on primary node to be used for originating node's near cache update.
+ */
+ void nearVersion(GridCacheVersion nearVer);
+
+ /**
+ * @return Version generated on primary node to be used for originating node's near cache update.
+ */
+ GridCacheVersion nearVersion();
+
+ /**
+ * @param keyIdx Index of key for which update was skipped
+ */
+ void addSkippedIndex(int keyIdx);
+
+ /**
+ * @return Indexes of keys for which update was skipped
+ */
+ @Nullable List<Integer> skippedIndexes();
+
+ /**
+ * @return Indexes of keys for which values were generated on primary node.
+ */
+ @Nullable List<Integer> nearValuesIndexes();
+
+ /**
+ * @param idx Index.
+ * @return Value generated on primary node which should be put to originating node's near cache.
+ */
+ @Nullable CacheObject nearValue(int idx);
+
+ /**
+ * Adds key to collection of failed keys.
+ *
+ * @param key Key to add.
+ * @param e Error cause.
+ */
+ void addFailedKey(KeyCacheObject key, Throwable e);
+
+ /**
+ * Adds keys to collection of failed keys.
+ *
+ * @param keys Key to add.
+ * @param e Error cause.
+ */
+ void addFailedKeys(Collection<KeyCacheObject> keys, Throwable e);
+
+ /**
+ * Adds keys to collection of failed keys.
+ *
+ * @param keys Key to add.
+ * @param e Error cause.
+ * @param ctx Context.
+ */
+ void addFailedKeys(Collection<KeyCacheObject> keys, Throwable e, GridCacheContext ctx);
+
+ /**
+ * This method is called before the whole message is serialized
+ * and is responsible for pre-marshalling state.
+ *
+ * @param ctx Cache context.
+ * @throws IgniteCheckedException If failed.
+ */
+ void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException;
+
+ /**
+ * This method is called after the message is deserialized and is responsible for
+ * unmarshalling state marshalled in {@link #prepareMarshal(GridCacheSharedContext)} method.
+ *
+ * @param ctx Context.
+ * @param ldr Class loader.
+ * @throws IgniteCheckedException If failed.
+ */
+ void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException;
+
+ /**
+ * Deployment enabled flag indicates whether deployment info has to be added to this message.
+ *
+ * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
+ */
+ boolean addDeploymentInfo();
+}