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/03 13:53:12 UTC
ignite git commit: IGNITE-2523: Finalization.
Repository: ignite
Updated Branches:
refs/heads/ignite-2523 e066650cf -> 3967130f5
IGNITE-2523: Finalization.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3967130f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3967130f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3967130f
Branch: refs/heads/ignite-2523
Commit: 3967130f54fa21d25e7e284ecabaf004b937b921
Parents: e066650
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Feb 3 15:53:07 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Feb 3 15:53:07 2016 +0300
----------------------------------------------------------------------
.../GridNearAtomicSingleUpdateRequest.java | 188 ++++++-------------
.../dht/atomic/GridNearAtomicUpdateRequest.java | 186 ++++++------------
.../GridNearAtomicUpdateRequestInterface.java | 144 +++++++++++---
3 files changed, 238 insertions(+), 280 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3967130f/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 9ef0b6c..fea67c0 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
@@ -270,229 +270,164 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
return CACHE_MSG_IDX;
}
- /**
- * @return Mapped node ID.
- */
- public UUID nodeId() {
+ /** {@inheritDoc} */
+ @Override public UUID nodeId() {
return nodeId;
}
- /**
- * @param nodeId Node ID.
- */
- public void nodeId(UUID nodeId) {
+ /** {@inheritDoc} */
+ @Override public void nodeId(UUID nodeId) {
this.nodeId = nodeId;
}
- /**
- * @return Subject ID.
- */
- public UUID subjectId() {
+ /** {@inheritDoc} */
+ @Override public UUID subjectId() {
return subjId;
}
- /**
- * @return Task name hash.
- */
- public int taskNameHash() {
+ /** {@inheritDoc} */
+ @Override public int taskNameHash() {
return taskNameHash;
}
- /**
- * @return Future version.
- */
- public GridCacheVersion futureVersion() {
+ /** {@inheritDoc} */
+ @Override public GridCacheVersion futureVersion() {
return futVer;
}
- /**
- * @return Flag indicating whether this is fast-map udpate.
- */
- public boolean fastMap() {
+ /** {@inheritDoc} */
+ @Override public boolean fastMap() {
return fastMap;
}
- /**
- * @return Update version for fast-map request.
- */
- public GridCacheVersion updateVersion() {
+ /** {@inheritDoc} */
+ @Override public GridCacheVersion updateVersion() {
return updateVer;
}
- /**
- * @return Topology version.
- */
+ /** {@inheritDoc} */
@Override public AffinityTopologyVersion topologyVersion() {
return topVer;
}
- /**
- * @return Topology locked flag.
- */
- public boolean topologyLocked() {
+ /** {@inheritDoc} */
+ @Override public boolean topologyLocked() {
return topLocked;
}
- /**
- * @return {@code True} if request sent from client node.
- */
- public boolean clientRequest() {
+ /** {@inheritDoc} */
+ @Override public boolean clientRequest() {
return clientReq;
}
- /**
- * @return Cache write synchronization mode.
- */
- public CacheWriteSynchronizationMode writeSynchronizationMode() {
+ /** {@inheritDoc} */
+ @Override public CacheWriteSynchronizationMode writeSynchronizationMode() {
return syncMode;
}
- /**
- * @return Expiry policy.
- */
- public ExpiryPolicy expiry() {
+ /** {@inheritDoc} */
+ @Override public ExpiryPolicy expiry() {
return expiryPlc;
}
- /**
- * @return Return value flag.
- */
- public boolean returnValue() {
+ /** {@inheritDoc} */
+ @Override public boolean returnValue() {
return retval;
}
- /**
- * @return Filter.
- */
- @Nullable public CacheEntryPredicate[] filter() {
+ /** {@inheritDoc} */
+ @Override @Nullable public CacheEntryPredicate[] filter() {
return filter;
}
- /**
- * @return Skip write-through to a persistent storage.
- */
- public boolean skipStore() {
+ /** {@inheritDoc} */
+ @Override public boolean skipStore() {
return skipStore;
}
- /**
- * @return Keep binary flag.
- */
- public boolean keepBinary() {
+ /** {@inheritDoc} */
+ @Override public boolean keepBinary() {
return keepBinary;
}
- /**
- * @return Keys for this update request.
- */
- public List<KeyCacheObject> keys() {
+ /** {@inheritDoc} */
+ @Override public List<KeyCacheObject> keys() {
return Collections.singletonList(key);
}
- /**
- * @return Values for this update request.
- */
- public List<?> values() {
+ /** {@inheritDoc} */
+ @Override public List<?> values() {
return Collections.singletonList(op == TRANSFORM ? entryProc : val);
}
- /**
- * @return Update operation.
- */
- public GridCacheOperation operation() {
+ /** {@inheritDoc} */
+ @Override public GridCacheOperation operation() {
return op;
}
- /**
- * @return Optional arguments for entry processor.
- */
- @Nullable public Object[] invokeArguments() {
+ /** {@inheritDoc} */
+ @Override @Nullable public Object[] invokeArguments() {
return invokeArgs;
}
- /**
- * @param idx Key index.
- * @return Value.
- */
+ /** {@inheritDoc} */
@SuppressWarnings("unchecked")
- public CacheObject value(int idx) {
+ @Override public CacheObject value(int idx) {
assert idx == 0;
assert op == UPDATE : op;
return val;
}
- /**
- * @param idx Key index.
- * @return Entry processor.
- */
+ /** {@inheritDoc} */
@SuppressWarnings("unchecked")
- public EntryProcessor<Object, Object, Object> entryProcessor(int idx) {
+ @Override public EntryProcessor<Object, Object, Object> entryProcessor(int idx) {
assert idx == 0;
assert op == TRANSFORM : op;
return entryProc;
}
- /**
- * @param idx Index to get.
- * @return Write value - either value, or transform closure.
- */
- public CacheObject writeValue(int idx) {
+ /** {@inheritDoc} */
+ @Override public CacheObject writeValue(int idx) {
assert idx == 0;
return val;
}
- /**
- * @return Conflict versions.
- */
- @Nullable public List<GridCacheVersion> conflictVersions() {
+ /** {@inheritDoc} */
+ @Override @Nullable public List<GridCacheVersion> conflictVersions() {
return conflictVer == null ? null : Collections.singletonList(conflictVer);
}
- /**
- * @param idx Index.
- * @return Conflict version.
- */
- @Nullable public GridCacheVersion conflictVersion(int idx) {
+ /** {@inheritDoc} */
+ @Override @Nullable public GridCacheVersion conflictVersion(int idx) {
assert idx == 0;
return conflictVer;
}
- /**
- * @param idx Index.
- * @return Conflict TTL.
- */
- public long conflictTtl(int idx) {
+ /** {@inheritDoc} */
+ @Override public long conflictTtl(int idx) {
assert idx == 0;
return conflictTtl;
}
- /**
- * @param idx Index.
- * @return Conflict expire time.
- */
- public long conflictExpireTime(int idx) {
+ /** {@inheritDoc} */
+ @Override public long conflictExpireTime(int idx) {
assert idx == 0;
return conflictExpireTime;
}
- /**
- * @return Flag indicating whether this request contains primary keys.
- */
- public boolean hasPrimary() {
+ /** {@inheritDoc} */
+ @Override public boolean hasPrimary() {
return true;
}
- /**
- * @param res Response.
- * @return {@code True} if current response was {@code null}.
- */
- public boolean onResponse(GridNearAtomicUpdateResponse res) {
+ /** {@inheritDoc} */
+ @Override public boolean onResponse(GridNearAtomicUpdateResponse res) {
if (this.res == null) {
this.res = res;
@@ -502,15 +437,12 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
return false;
}
- /**
- * @return Response.
- */
- @Nullable public GridNearAtomicUpdateResponse response() {
+ /** {@inheritDoc} */
+ @Override @Nullable public GridNearAtomicUpdateResponse response() {
return res;
}
- /** {@inheritDoc}
- * @param ctx*/
+ /** {@inheritDoc} */
@Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
super.prepareMarshal(ctx);
http://git-wip-us.apache.org/repos/asf/ignite/blob/3967130f/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
index 674a5be..a86622f 100644
--- 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
@@ -253,115 +253,83 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
return CACHE_MSG_IDX;
}
- /**
- * @return Mapped node ID.
- */
- public UUID nodeId() {
+ /** {@inheritDoc} */
+ @Override public UUID nodeId() {
return nodeId;
}
- /**
- * @param nodeId Node ID.
- */
- public void nodeId(UUID nodeId) {
+ /** {@inheritDoc} */
+ @Override public void nodeId(UUID nodeId) {
this.nodeId = nodeId;
}
- /**
- * @return Subject ID.
- */
- public UUID subjectId() {
+ /** {@inheritDoc} */
+ @Override public UUID subjectId() {
return subjId;
}
- /**
- * @return Task name hash.
- */
- public int taskNameHash() {
+ /** {@inheritDoc} */
+ @Override public int taskNameHash() {
return taskNameHash;
}
- /**
- * @return Future version.
- */
- public GridCacheVersion futureVersion() {
+ /** {@inheritDoc} */
+ @Override public GridCacheVersion futureVersion() {
return futVer;
}
- /**
- * @return Flag indicating whether this is fast-map udpate.
- */
- public boolean fastMap() {
+ /** {@inheritDoc} */
+ @Override public boolean fastMap() {
return fastMap;
}
- /**
- * @return Update version for fast-map request.
- */
- public GridCacheVersion updateVersion() {
+ /** {@inheritDoc} */
+ @Override public GridCacheVersion updateVersion() {
return updateVer;
}
- /**
- * @return Topology version.
- */
+ /** {@inheritDoc} */
@Override public AffinityTopologyVersion topologyVersion() {
return topVer;
}
- /**
- * @return Topology locked flag.
- */
- public boolean topologyLocked() {
+ /** {@inheritDoc} */
+ @Override public boolean topologyLocked() {
return topLocked;
}
- /**
- * @return {@code True} if request sent from client node.
- */
- public boolean clientRequest() {
+ /** {@inheritDoc} */
+ @Override public boolean clientRequest() {
return clientReq;
}
- /**
- * @return Cache write synchronization mode.
- */
- public CacheWriteSynchronizationMode writeSynchronizationMode() {
+ /** {@inheritDoc} */
+ @Override public CacheWriteSynchronizationMode writeSynchronizationMode() {
return syncMode;
}
- /**
- * @return Expiry policy.
- */
- public ExpiryPolicy expiry() {
+ /** {@inheritDoc} */
+ @Override public ExpiryPolicy expiry() {
return expiryPlc;
}
- /**
- * @return Return value flag.
- */
- public boolean returnValue() {
+ /** {@inheritDoc} */
+ @Override public boolean returnValue() {
return retval;
}
- /**
- * @return Filter.
- */
+ /** {@inheritDoc} */
@Nullable public CacheEntryPredicate[] filter() {
return filter;
}
- /**
- * @return Skip write-through to a persistent storage.
- */
- public boolean skipStore() {
+ /** {@inheritDoc} */
+ @Override public boolean skipStore() {
return skipStore;
}
- /**
- * @return Keep binary flag.
- */
- public boolean keepBinary() {
+ /** {@inheritDoc} */
+ @Override public boolean keepBinary() {
return keepBinary;
}
@@ -446,79 +414,57 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
}
}
- /**
- * @return Keys for this update request.
- */
- public List<KeyCacheObject> keys() {
+ /** {@inheritDoc} */
+ @Override public List<KeyCacheObject> keys() {
return keys;
}
- /**
- * @return Values for this update request.
- */
- public List<?> values() {
+ /** {@inheritDoc} */
+ @Override public List<?> values() {
return op == TRANSFORM ? entryProcessors : vals;
}
- /**
- * @return Update operation.
- */
- public GridCacheOperation operation() {
+ /** {@inheritDoc} */
+ @Override public GridCacheOperation operation() {
return op;
}
- /**
- * @return Optional arguments for entry processor.
- */
- @Nullable public Object[] invokeArguments() {
+ /** {@inheritDoc} */
+ @Override @Nullable public Object[] invokeArguments() {
return invokeArgs;
}
- /**
- * @param idx Key index.
- * @return Value.
- */
+ /** {@inheritDoc} */
@SuppressWarnings("unchecked")
- public CacheObject value(int idx) {
+ @Override public CacheObject value(int idx) {
assert op == UPDATE : op;
return vals.get(idx);
}
- /**
- * @param idx Key index.
- * @return Entry processor.
- */
+ /** {@inheritDoc} */
@SuppressWarnings("unchecked")
- public EntryProcessor<Object, Object, Object> entryProcessor(int idx) {
+ @Override public EntryProcessor<Object, Object, Object> entryProcessor(int idx) {
assert op == TRANSFORM : op;
return entryProcessors.get(idx);
}
- /**
- * @param idx Index to get.
- * @return Write value - either value, or transform closure.
- */
- public CacheObject writeValue(int idx) {
+ /** {@inheritDoc} */
+ @Override public CacheObject writeValue(int idx) {
if (vals != null)
return vals.get(idx);
return null;
}
- /**
- * @return Conflict versions.
- */
- @Nullable public List<GridCacheVersion> conflictVersions() {
+ /** {@inheritDoc} */
+ @Override @Nullable public List<GridCacheVersion> conflictVersions() {
return conflictVers;
}
- /**
- * @param idx Index.
- * @return Conflict version.
- */
- @Nullable public GridCacheVersion conflictVersion(int idx) {
+ /** {@inheritDoc} */
+ @Override @Nullable public GridCacheVersion conflictVersion(int idx) {
if (conflictVers != null) {
assert idx >= 0 && idx < conflictVers.size();
@@ -528,11 +474,8 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
return null;
}
- /**
- * @param idx Index.
- * @return Conflict TTL.
- */
- public long conflictTtl(int idx) {
+ /** {@inheritDoc} */
+ @Override public long conflictTtl(int idx) {
if (conflictTtls != null) {
assert idx >= 0 && idx < conflictTtls.size();
@@ -542,11 +485,8 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
return CU.TTL_NOT_CHANGED;
}
- /**
- * @param idx Index.
- * @return Conflict expire time.
- */
- public long conflictExpireTime(int idx) {
+ /** {@inheritDoc} */
+ @Override public long conflictExpireTime(int idx) {
if (conflictExpireTimes != null) {
assert idx >= 0 && idx < conflictExpireTimes.size();
@@ -556,18 +496,13 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
return CU.EXPIRE_TIME_CALCULATE;
}
- /**
- * @return Flag indicating whether this request contains primary keys.
- */
- public boolean hasPrimary() {
+ /** {@inheritDoc} */
+ @Override public boolean hasPrimary() {
return hasPrimary;
}
- /**
- * @param res Response.
- * @return {@code True} if current response was {@code null}.
- */
- public boolean onResponse(GridNearAtomicUpdateResponse res) {
+ /** {@inheritDoc} */
+ @Override public boolean onResponse(GridNearAtomicUpdateResponse res) {
if (this.res == null) {
this.res = res;
@@ -577,15 +512,12 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage
return false;
}
- /**
- * @return Response.
- */
- @Nullable public GridNearAtomicUpdateResponse response() {
+ /** {@inheritDoc} */
+ @Override @Nullable public GridNearAtomicUpdateResponse response() {
return res;
}
- /** {@inheritDoc}
- * @param ctx*/
+ /** {@inheritDoc} */
@Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
super.prepareMarshal(ctx);
http://git-wip-us.apache.org/repos/asf/ignite/blob/3967130f/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
index 2ef4bae..8115f9f 100644
--- 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
@@ -35,17 +35,37 @@ import java.util.UUID;
* Base interface for near atomic update interfaces.
*/
public interface GridNearAtomicUpdateRequestInterface {
- public List<KeyCacheObject> keys();
+ /**
+ * @return Message ID.
+ */
+ public long messageId();
- public AffinityTopologyVersion topologyVersion();
+ /**
+ * @return Mapped node ID.
+ */
+ public UUID nodeId();
- public GridCacheVersion futureVersion();
+ /**
+ * @param nodeId Node ID.
+ */
+ public void nodeId(UUID nodeId);
- public boolean returnValue();
+ /**
+ * @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();
@@ -55,51 +75,125 @@ public interface GridNearAtomicUpdateRequestInterface {
*/
public GridCacheVersion updateVersion();
- public boolean clientRequest();
+ /**
+ * @return Topology version.
+ */
+ public AffinityTopologyVersion topologyVersion();
+ /**
+ * @return Topology locked flag.
+ */
public boolean topologyLocked();
- public ExpiryPolicy expiry();
+ /**
+ * @return {@code True} if request sent from client node.
+ */
+ public boolean clientRequest();
- public boolean skipStore();
+ /**
+ * @return Cache write synchronization mode.
+ */
+ public CacheWriteSynchronizationMode writeSynchronizationMode();
- public GridCacheOperation operation();
+ /**
+ * @return Expiry policy.
+ */
+ public ExpiryPolicy expiry();
- public CacheWriteSynchronizationMode writeSynchronizationMode();
+ /**
+ * @return Return value flag.
+ */
+ public boolean returnValue();
- public UUID subjectId();
+ /**
+ * @return Filter.
+ */
+ @Nullable public CacheEntryPredicate[] filter();
- @Nullable public Object[] invokeArguments();
+ /**
+ * @return Skip write-through to a persistent storage.
+ */
+ public boolean skipStore();
+ /**
+ * @return Keep binary flag.
+ */
public boolean keepBinary();
- @Nullable public CacheEntryPredicate[] filter();
+ /**
+ * @return Keys for this update request.
+ */
+ public List<KeyCacheObject> keys();
- public UUID nodeId();
+ /**
+ * @return Values for this update request.
+ */
+ public List<?> values();
- public void nodeId(UUID nodeId);
+ /**
+ * @return Update operation.
+ */
+ public GridCacheOperation operation();
- public boolean hasPrimary();
+ /**
+ * @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);
- public List<?> values();
-
- public CacheObject value(int idx);
-
- public long messageId();
-
- public EntryProcessor<Object, Object, Object> entryProcessor(int idx);
+ /**
+ * @return Flag indicating whether this request contains primary keys.
+ */
+ public boolean hasPrimary();
- public CacheObject writeValue(int idx);
+ /**
+ * @param res Response.
+ * @return {@code True} if current response was {@code null}.
+ */
+ public boolean onResponse(GridNearAtomicUpdateResponse res);
+ /**
+ * @return Response.
+ */
@Nullable public GridNearAtomicUpdateResponse response();
-
- public boolean onResponse(GridNearAtomicUpdateResponse res);
}