ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4932 WIP
Date Thu, 13 Apr 2017 08:37:30 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4932 9141e2927 -> e13c0e1b8


ignite-4932 WIP


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

Branch: refs/heads/ignite-4932
Commit: e13c0e1b8dc89dd7ee644ddf512db145d4ada947
Parents: 9141e29
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 13 11:37:25 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 13 11:37:25 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java     | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e13c0e1b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index c70541a..bafa25d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -5838,20 +5838,12 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                 return null;
 
             return new CacheExpiryPolicy() {
-                private Long accessTtl;
-
                 @Override public long forAccess() {
-                    if (accessTtl == null)
-                        accessTtl = CU.toTtl(expiryPlc.getExpiryForAccess());
-
-                    return accessTtl;
+                    return CU.toTtl(expiryPlc.getExpiryForAccess());
                 }
 
                 @Override public boolean hasAccessTtl() {
-                    if (accessTtl == null)
-                        accessTtl = CU.toTtl(expiryPlc.getExpiryForAccess());
-
-                    return accessTtl != CU.TTL_NOT_CHANGED;
+                    return CU.toTtl(expiryPlc.getExpiryForAccess()) != CU.TTL_NOT_CHANGED;
                 }
 
                 @Override public long forCreate() {


Mime
View raw message