ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/50] incubator-ignite git commit: ignite-946: fixed comments and bugs
Date Wed, 19 Aug 2015 07:40:05 GMT
ignite-946: fixed comments and bugs


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

Branch: refs/heads/ignite-gg-9615-1
Commit: c1582fc32884cdf9494df32fb33207d64ed1230f
Parents: 911ffbb
Author: Denis Magda <dmagda@gridgain.com>
Authored: Mon Aug 10 12:44:31 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Mon Aug 10 12:44:31 2015 +0300

----------------------------------------------------------------------
 .../ignite/cache/version/VersionedEntry.java       | 17 +++++++++--------
 .../cache/version/CacheVersionedEntryImpl.java     |  4 ++--
 .../processors/clock/GridClockSyncProcessor.java   |  2 +-
 .../version/CacheVersionedEntryAbstractTest.java   |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 2c0879b..1aac68a 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -73,30 +73,31 @@ public interface VersionedEntry<K, V> extends Cache.Entry<K,
V> {
     };
 
     /**
-     * Gets entry's topology version.
+     * Gets the topology version at the time when the entry with a given pair of key and
value has been created.
      *
      * @return Topology version plus number of seconds from the start time of the first grid
node.
      */
     public int topologyVersion();
 
     /**
-     * Gets entry's order.
+     * Gets versioned entry unique order.
+     * Each time a cache entry for a given key is updated a new {@code VersionedEntry} with
increased order is created.
      *
-     * @return Version order.
+     * @return Versioned entry unique order.
      */
     public long order();
 
     /**
-     * Gets entry's node order.
+     * Gets local node order at the time when the entry with a given pair of key and value
has been created.
      *
-     * @return Node order on which this version was assigned.
+     * @return Local node order on which this version has been assigned.
      */
     public int nodeOrder();
 
     /**
-     * Gets entry's global time.
+     * Gets the time when the entry with a given pair of key and value has been created.
      *
-     * @return Adjusted time.
+     * @return Time in milliseconds.
      */
-    public long globalTime();
+    public long creationTime();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 924eff9..74e4a9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -74,7 +74,7 @@ public class CacheVersionedEntryImpl<K, V> extends CacheEntryImpl<K,
V> implemen
     }
 
     /** {@inheritDoc} */
-    @Override public long globalTime() {
+    @Override public long creationTime() {
         return ver.globalTime();
     }
 
@@ -95,6 +95,6 @@ public class CacheVersionedEntryImpl<K, V> extends CacheEntryImpl<K,
V> implemen
     /** {@inheritDoc} */
     public String toString() {
         return "VersionedEntry [key=" + getKey() + ", val=" + getValue() + ", topVer=" +
ver.topologyVersion() +
-            ", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", globalTime="
+ ver.globalTime() + ']';
+            ", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", creationTime="
+ ver.globalTime() + ']';
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
index 3ac44f2..69b07b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
@@ -264,7 +264,7 @@ public class GridClockSyncProcessor extends GridProcessorAdapter {
         long now = clockSrc.currentTimeMillis();
 
         if (snap == null)
-            return System.currentTimeMillis();
+            return now;
 
         Long delta = snap.deltas().get(ctx.localNodeId());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
index b121995..0ad8038 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -164,7 +164,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS
         assert entry.topologyVersion() > 0;
         assert entry.order() > 0;
         assert entry.nodeOrder() > 0;
-        assert entry.globalTime() > 0;
+        assert entry.creationTime() > 0;
 
         assertNotNull(entry.getKey());
         assertNotNull(entry.getValue());


Mime
View raw message