ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [45/51] [abbrv] ignite git commit: Review.
Date Thu, 25 Feb 2016 12:31:44 GMT
Review.


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

Branch: refs/heads/ignite-2523
Commit: f83d909393f019f1a94801c08f287541e2074df2
Parents: 28c20c3
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Feb 25 15:19:11 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Feb 25 15:19:11 2016 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  | 151 ++++---------------
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |  31 +---
 .../atomic/GridNearAtomicUpdateResponse.java    | 113 +++-----------
 3 files changed, 60 insertions(+), 235 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f83d9093/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
index c7c940c..4ceac74 100644
--- 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
@@ -215,7 +215,6 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
 
         keys = new ArrayList<>();
         partIds = new ArrayList<>();
-        locPrevVals = new ArrayList<>();
 
         if (forceTransformBackups) {
             entryProcessors = new ArrayList<>();
@@ -225,23 +224,12 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
             vals = new ArrayList<>();
     }
 
-    /**
-     * @return Force transform backups flag.
-     */
+    /** {@inheritDoc} */
     @Override public boolean forceTransformBackups() {
         return 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.
-     */
+    /** {@inheritDoc} */
     @Override public void addWriteValue(KeyCacheObject key,
         @Nullable CacheObject val,
         EntryProcessor<Object, Object, Object> entryProcessor,
@@ -325,13 +313,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
             conflictExpireTimes.add(conflictExpireTime);
     }
 
-    /**
-     * @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.
-     */
+    /** {@inheritDoc} */
     @Override public void addNearWriteValue(KeyCacheObject key,
         @Nullable CacheObject val,
         EntryProcessor<Object, Object, Object> entryProcessor,
@@ -388,96 +370,67 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return CACHE_MSG_IDX;
     }
 
-    /**
-     * @return Node ID.
-     */
+    /** {@inheritDoc} */
     @Override public UUID nodeId() {
         return nodeId;
     }
 
-    /**
-     * @return Subject ID.
-     */
+    /** {@inheritDoc} */
     @Override public UUID subjectId() {
         return subjId;
     }
 
-    /**
-     * @return Task name.
-     */
+    /** {@inheritDoc} */
     @Override public int taskNameHash() {
         return taskNameHash;
     }
 
-    /**
-     * @return Keys size.
-     */
+    /** {@inheritDoc} */
     @Override public int size() {
         return keys.size();
     }
 
-    /**
-     * @return Keys size.
-     */
+    /** {@inheritDoc} */
     @Override public int nearSize() {
         return nearKeys != null ? nearKeys.size() : 0;
     }
 
-    /**
-     * @return Version assigned on primary node.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheVersion futureVersion() {
         return futVer;
     }
 
-    /**
-     * @return Write version.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheVersion writeVersion() {
         return writeVer;
     }
 
-    /**
-     * @return Cache write synchronization mode.
-     */
+    /** {@inheritDoc} */
     @Override public CacheWriteSynchronizationMode writeSynchronizationMode() {
         return syncMode;
     }
 
-    /**
-     * @return Topology version.
-     */
+    /** {@inheritDoc} */
     @Override public AffinityTopologyVersion topologyVersion() {
         return topVer;
     }
 
-    /**
-     * @return Keys.
-     */
+    /** {@inheritDoc} */
     @Override public Collection<KeyCacheObject> keys() {
         return keys;
     }
 
-    /**
-     * @param idx Key index.
-     * @return Key.
-     */
+    /** {@inheritDoc} */
     @Override public KeyCacheObject key(int idx) {
         return keys.get(idx);
     }
 
-    /**
-     * @param idx Partition index.
-     * @return Partition id.
-     */
+    /** {@inheritDoc} */
     @Override public int partitionId(int idx) {
         return partIds.get(idx);
     }
 
-    /**
-     * @param updCntr Update counter.
-     * @return Update counter.
-     */
+    /** {@inheritDoc} */
     @Override public Long updateCounter(int updCntr) {
         if (updateCntrs != null && updCntr < updateCntrs.size())
             return updateCntrs.get(updCntr);
@@ -485,25 +438,17 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return null;
     }
 
-    /**
-     * @param idx Near key index.
-     * @return Key.
-     */
+    /** {@inheritDoc} */
     @Override public KeyCacheObject nearKey(int idx) {
         return nearKeys.get(idx);
     }
 
-    /**
-     * @return Keep binary flag.
-     */
+    /** {@inheritDoc} */
     @Override public boolean keepBinary() {
         return keepBinary;
     }
 
-    /**
-     * @param idx Key index.
-     * @return Value.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public CacheObject value(int idx) {
         if (vals != null)
             return vals.get(idx);
@@ -511,10 +456,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return null;
     }
 
-    /**
-     * @param idx Key index.
-     * @return Value.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public CacheObject previousValue(int idx) {
         if (prevVals != null)
             return prevVals.get(idx);
@@ -522,28 +464,19 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return null;
     }
 
-    /**
-     * @param idx Key index.
-     * @return Value.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public CacheObject localPreviousValue(int idx) {
         assert locPrevVals != null;
 
         return locPrevVals.get(idx);
     }
 
-    /**
-     * @param idx Key index.
-     * @return Entry processor.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public EntryProcessor<Object, Object, Object> entryProcessor(int
idx) {
         return entryProcessors == null ? null : entryProcessors.get(idx);
     }
 
-    /**
-     * @param idx Near key index.
-     * @return Value.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public CacheObject nearValue(int idx) {
         if (nearVals != null)
             return nearVals.get(idx);
@@ -551,18 +484,12 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return null;
     }
 
-    /**
-     * @param idx Key index.
-     * @return Transform closure.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public EntryProcessor<Object, Object, Object> nearEntryProcessor(int
idx) {
         return nearEntryProcessors == null ? null : nearEntryProcessors.get(idx);
     }
 
-    /**
-     * @param idx Index.
-     * @return Conflict version.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public GridCacheVersion conflictVersion(int idx) {
         if (conflictVers != null) {
             assert idx >= 0 && idx < conflictVers.size();
@@ -573,10 +500,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return null;
     }
 
-    /**
-     * @param idx Index.
-     * @return TTL.
-     */
+    /** {@inheritDoc} */
     @Override public long ttl(int idx) {
         if (ttls != null) {
             assert idx >= 0 && idx < ttls.size();
@@ -587,10 +511,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return CU.TTL_NOT_CHANGED;
     }
 
-    /**
-     * @param idx Index.
-     * @return TTL for near cache update.
-     */
+    /** {@inheritDoc} */
     @Override public long nearTtl(int idx) {
         if (nearTtls != null) {
             assert idx >= 0 && idx < nearTtls.size();
@@ -601,10 +522,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return CU.TTL_NOT_CHANGED;
     }
 
-    /**
-     * @param idx Index.
-     * @return Conflict expire time.
-     */
+    /** {@inheritDoc} */
     @Override public long conflictExpireTime(int idx) {
         if (conflictExpireTimes != null) {
             assert idx >= 0 && idx < conflictExpireTimes.size();
@@ -615,10 +533,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return CU.EXPIRE_TIME_CALCULATE;
     }
 
-    /**
-     * @param idx Index.
-     * @return Expire time for near cache update.
-     */
+    /** {@inheritDoc} */
     @Override public long nearExpireTime(int idx) {
         if (nearExpireTimes != null) {
             assert idx >= 0 && idx < nearExpireTimes.size();
@@ -629,16 +544,12 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements
Grid
         return CU.EXPIRE_TIME_CALCULATE;
     }
 
-    /**
-     * @return {@code True} if on response flag changed.
-     */
+    /** {@inheritDoc} */
     @Override public boolean onResponse() {
         return !onRes && (onRes = true);
     }
 
-    /**
-     * @return Optional arguments for entry processor.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public Object[] invokeArguments() {
         return invokeArgs;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f83d9093/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
index 74cdc6e..a8d0169 100644
--- 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
@@ -91,18 +91,12 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements
Gri
         return CACHE_MSG_IDX;
     }
 
-    /**
-     * @return Future version.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheVersion futureVersion() {
         return futVer;
     }
 
-    /**
-     * Sets update error.
-     *
-     * @param err Error.
-     */
+    /** {@inheritDoc} */
     @Override public void onError(IgniteCheckedException err) {
         this.err = err;
     }
@@ -112,19 +106,12 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements
Gri
         return err;
     }
 
-    /**
-     * @return Failed keys.
-     */
+    /** {@inheritDoc} */
     @Override public Collection<KeyCacheObject> failedKeys() {
         return failedKeys;
     }
 
-    /**
-     * Adds key to collection of failed keys.
-     *
-     * @param key Key to add.
-     * @param e Error cause.
-     */
+    /** {@inheritDoc} */
     @Override public void addFailedKey(KeyCacheObject key, Throwable e) {
         if (failedKeys == null)
             failedKeys = new ArrayList<>();
@@ -137,18 +124,12 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements
Gri
         err.addSuppressed(e);
     }
 
-    /**
-     * @return Evicted readers.
-     */
+    /** {@inheritDoc} */
     @Override public Collection<KeyCacheObject> nearEvicted() {
         return nearEvicted;
     }
 
-    /**
-     * Adds near evicted key..
-     *
-     * @param key Evicted key.
-     */
+    /** {@inheritDoc} */
     @Override public void addNearEvicted(KeyCacheObject key) {
         if (nearEvicted == null)
             nearEvicted = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f83d9093/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
index 2295854..84a4a9f 100644
--- 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
@@ -131,32 +131,22 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         return CACHE_MSG_IDX;
     }
 
-    /**
-     * @return Node ID this response should be sent to.
-     */
+    /** {@inheritDoc} */
     @Override public UUID nodeId() {
         return nodeId;
     }
 
-    /**
-     * @param nodeId Node ID.
-     */
+    /** {@inheritDoc} */
     @Override public void nodeId(UUID nodeId) {
         this.nodeId = nodeId;
     }
 
-    /**
-     * @return Future version.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheVersion futureVersion() {
         return futVer;
     }
 
-    /**
-     * Sets update error.
-     *
-     * @param err Error.
-     */
+    /** {@inheritDoc} */
     @Override public void error(IgniteCheckedException err) {
         this.err = err;
     }
@@ -166,50 +156,33 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         return err;
     }
 
-    /**
-     * @return Collection of failed keys.
-     */
+    /** {@inheritDoc} */
     @Override public Collection<KeyCacheObject> failedKeys() {
         return failedKeys;
     }
 
-    /**
-     * @return Return value.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheReturn returnValue() {
         return ret;
     }
 
-    /**
-     * @param ret Return value.
-     */
+    /** {@inheritDoc} */
     @Override @SuppressWarnings("unchecked")
     public void returnValue(GridCacheReturn ret) {
         this.ret = ret;
     }
 
-    /**
-     * @param remapKeys Remap keys.
-     */
+    /** {@inheritDoc} */
     @Override public void remapKeys(List<KeyCacheObject> remapKeys) {
         this.remapKeys = remapKeys;
     }
 
-    /**
-     * @return Remap keys.
-     */
+    /** {@inheritDoc} */
     @Override public Collection<KeyCacheObject> remapKeys() {
         return 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.
-     */
+    /** {@inheritDoc} */
     @Override public void addNearValue(int keyIdx,
         @Nullable CacheObject val,
         long ttl,
@@ -225,11 +198,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         nearVals.add(val);
     }
 
-    /**
-     * @param keyIdx Key index.
-     * @param ttl TTL for near cache update.
-     * @param expireTime Expire time for near cache update.
-     */
+    /** {@inheritDoc} */
     @Override @SuppressWarnings("ForLoopReplaceableByForEach")
     public void addNearTtl(int keyIdx, long ttl, long expireTime) {
         if (ttl >= 0) {
@@ -257,10 +226,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
             nearExpireTimes.add(expireTime);
     }
 
-    /**
-     * @param idx Index.
-     * @return Expire time for near cache update.
-     */
+    /** {@inheritDoc} */
     @Override public long nearExpireTime(int idx) {
         if (nearExpireTimes != null) {
             assert idx >= 0 && idx < nearExpireTimes.size();
@@ -271,10 +237,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         return -1L;
     }
 
-    /**
-     * @param idx Index.
-     * @return TTL for near cache update.
-     */
+    /** {@inheritDoc} */
     @Override public long nearTtl(int idx) {
         if (nearTtls != null) {
             assert idx >= 0 && idx < nearTtls.size();
@@ -285,23 +248,17 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         return -1L;
     }
 
-    /**
-     * @param nearVer Version generated on primary node to be used for originating node's
near cache update.
-     */
+    /** {@inheritDoc} */
     @Override public void nearVersion(GridCacheVersion nearVer) {
         this.nearVer = nearVer;
     }
 
-    /**
-     * @return Version generated on primary node to be used for originating node's near cache
update.
-     */
+    /** {@inheritDoc} */
     @Override public GridCacheVersion nearVersion() {
         return nearVer;
     }
 
-    /**
-     * @param keyIdx Index of key for which update was skipped
-     */
+    /** {@inheritDoc} */
     @Override public void addSkippedIndex(int keyIdx) {
         if (nearSkipIdxs == null)
             nearSkipIdxs = new ArrayList<>();
@@ -311,34 +268,22 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         addNearTtl(keyIdx, -1L, -1L);
     }
 
-    /**
-     * @return Indexes of keys for which update was skipped
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public List<Integer> skippedIndexes() {
         return nearSkipIdxs;
     }
 
-    /**
-     * @return Indexes of keys for which values were generated on primary node.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public List<Integer> nearValuesIndexes() {
         return nearValsIdxs;
     }
 
-    /**
-     * @param idx Index.
-     * @return Value generated on primary node which should be put to originating node's
near cache.
-     */
+    /** {@inheritDoc} */
     @Override @Nullable public CacheObject nearValue(int idx) {
         return nearVals.get(idx);
     }
 
-    /**
-     * Adds key to collection of failed keys.
-     *
-     * @param key Key to add.
-     * @param e Error cause.
-     */
+    /** {@inheritDoc} */
     @Override public synchronized void addFailedKey(KeyCacheObject key, Throwable e) {
         if (failedKeys == null)
             failedKeys = new ConcurrentLinkedQueue<>();
@@ -351,12 +296,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         err.addSuppressed(e);
     }
 
-    /**
-     * Adds keys to collection of failed keys.
-     *
-     * @param keys Key to add.
-     * @param e Error cause.
-     */
+    /** {@inheritDoc} */
     @Override public synchronized void addFailedKeys(Collection<KeyCacheObject> keys,
Throwable e) {
         if (keys != null) {
             if (failedKeys == null)
@@ -371,13 +311,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         err.addSuppressed(e);
     }
 
-    /**
-     * Adds keys to collection of failed keys.
-     *
-     * @param keys Key to add.
-     * @param e Error cause.
-     * @param ctx Context.
-     */
+    /** {@inheritDoc} */
     @Override public synchronized void addFailedKeys(Collection<KeyCacheObject> keys,
Throwable e,
         GridCacheContext ctx) {
         if (failedKeys == null)
@@ -391,8 +325,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements
Gr
         err.addSuppressed(e);
     }
 
-    /** {@inheritDoc}
-     * @param ctx*/
+    /** {@inheritDoc} */
     @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
{
         super.prepareMarshal(ctx);
 


Mime
View raw message