ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [16/26] ignite git commit: Minors.
Date Wed, 20 Apr 2016 07:12:21 GMT
Minors.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1b953119
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1b953119
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1b953119

Branch: refs/heads/ignite-2523-1
Commit: 1b953119dbe436ca2bb87b4beb58bdbd2c43a087
Parents: ef056b7
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Apr 18 15:45:33 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Apr 18 15:45:33 2016 +0300

----------------------------------------------------------------------
 .../GridNearAtomicAbstractUpdateFuture.java     | 27 ++++++++++++++++++++
 .../GridNearAtomicSingleUpdateFuture.java       | 25 +++---------------
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 13 ++--------
 3 files changed, 33 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1b953119/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
index 0c40969..7f52299 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
@@ -64,6 +64,9 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
     /** Update operation. */
     protected final GridCacheOperation op;
 
+    /** Optional arguments for entry processor. */
+    protected final Object[] invokeArgs;
+
     /** Return value require flag. */
     protected final boolean retval;
 
@@ -129,12 +132,29 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
 
     /**
      * Constructor.
+     *
+     * @param cctx Cache context.
+     * @param cache Cache.
+     * @param syncMode Synchronization mode.
+     * @param op Operation.
+     * @param invokeArgs Invoke arguments.
+     * @param retval Return value flag.
+     * @param rawRetval Raw return value flag.
+     * @param expiryPlc Expiry policy.
+     * @param filter Filter.
+     * @param subjId Subject ID.
+     * @param taskNameHash Task name hash.
+     * @param skipStore Skip store flag.
+     * @param keepBinary Keep binary flag.
+     * @param remapCnt Remap count.
+     * @param waitTopFut Wait topology future flag.
      */
     protected GridNearAtomicAbstractUpdateFuture(
         GridCacheContext cctx,
         GridDhtAtomicCache cache,
         CacheWriteSynchronizationMode syncMode,
         GridCacheOperation op,
+        @Nullable Object[] invokeArgs,
         boolean retval,
         boolean rawRetval,
         @Nullable ExpiryPolicy expiryPlc,
@@ -143,6 +163,7 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
         int taskNameHash,
         boolean skipStore,
         boolean keepBinary,
+        int remapCnt,
         boolean waitTopFut
     ) {
         if (log == null)
@@ -152,6 +173,7 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
         this.cache = cache;
         this.syncMode = syncMode;
         this.op = op;
+        this.invokeArgs = invokeArgs;
         this.retval = retval;
         this.rawRetval = rawRetval;
         this.expiryPlc = expiryPlc;
@@ -163,6 +185,11 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
         this.waitTopFut = waitTopFut;
 
         nearEnabled = CU.isNearEnabled(cctx);
+
+        if (!waitTopFut)
+            remapCnt = 1;
+
+        this.remapCnt = remapCnt;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b953119/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index 5ff878b3..e93f240 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -67,9 +67,6 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
     private Object val;
 
-    /** Optional arguments for entry processor. */
-    private Object[] invokeArgs;
-
     /** Not null is operation is mapped to single node. */
     private GridNearAtomicUpdateRequest req;
 
@@ -114,19 +111,13 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         int remapCnt,
         boolean waitTopFut
     ) {
-        super(cctx, cache, syncMode, op, retval, rawRetval, expiryPlc, filter, subjId, taskNameHash,
skipStore,
-            keepBinary, waitTopFut);
+        super(cctx, cache, syncMode, op, invokeArgs, retval, rawRetval, expiryPlc, filter,
subjId, taskNameHash,
+            skipStore, keepBinary, remapCnt, waitTopFut);
 
         assert subjId != null;
 
         this.key = key;
         this.val = val;
-        this.invokeArgs = invokeArgs;
-
-        if (!waitTopFut)
-            remapCnt = 1;
-
-        this.remapCnt = remapCnt;
     }
 
     /** {@inheritDoc} */
@@ -371,7 +362,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
                             try {
                                 AffinityTopologyVersion topVer = fut.get();
 
-                                map(topVer, remapKeys);
+                                map(topVer);
                             }
                             catch (IgniteCheckedException e) {
                                 onDone(e);
@@ -455,7 +446,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
             cache.topology().readUnlock();
         }
 
-        map(topVer, null);
+        map(topVer);
     }
 
     /**
@@ -508,14 +499,6 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
 
     /** {@inheritDoc} */
     protected void map(AffinityTopologyVersion topVer) {
-        map(topVer, null);
-    }
-
-    /**
-     * @param topVer Topology version.
-     * @param remapKeys Keys to remap.
-     */
-    void map(AffinityTopologyVersion topVer, @Nullable Collection<KeyCacheObject> remapKeys)
{
         Collection<ClusterNode> topNodes = CU.affinityNodes(cctx, topVer);
 
         if (F.isEmpty(topNodes)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b953119/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 009642d..edebd8c 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
@@ -74,9 +74,6 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
     private Collection<?> vals;
 
-    /** Optional arguments for entry processor. */
-    private Object[] invokeArgs;
-
     /** Conflict put values. */
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
     private Collection<GridCacheDrInfo> conflictPutVals;
@@ -137,8 +134,8 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         int remapCnt,
         boolean waitTopFut
     ) {
-        super(cctx, cache, syncMode, op, retval, rawRetval, expiryPlc, filter, subjId, taskNameHash,
skipStore,
-            keepBinary, waitTopFut);
+        super(cctx, cache, syncMode, op, invokeArgs, retval, rawRetval, expiryPlc, filter,
subjId, taskNameHash,
+            skipStore, keepBinary, remapCnt, waitTopFut);
 
         assert vals == null || vals.size() == keys.size();
         assert conflictPutVals == null || conflictPutVals.size() == keys.size();
@@ -147,15 +144,9 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
 
         this.keys = keys;
         this.vals = vals;
-        this.invokeArgs = invokeArgs;
         this.conflictPutVals = conflictPutVals;
         this.conflictRmvVals = conflictRmvVals;
 
-        if (!waitTopFut)
-            remapCnt = 1;
-
-        this.remapCnt = remapCnt;
-
         fastMap = cache.isFastMap(filter, op);
     }
 


Mime
View raw message