ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [42/50] incubator-ignite git commit: # ignite-656
Date Fri, 24 Apr 2015 06:00:58 GMT
# ignite-656


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

Branch: refs/heads/ignite-784
Commit: 0e2e68bd035ebc8d30b369d75eefb21d1da0d214
Parents: f910bb6
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 23 15:24:09 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 23 15:24:09 2015 +0300

----------------------------------------------------------------------
 .../local/atomic/GridLocalAtomicCache.java      | 55 +++++++++++++-------
 1 file changed, 37 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0e2e68bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index eae3c2c..8095600 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -111,7 +111,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             true,
             false,
             filter,
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -126,7 +127,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             filter,
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -222,7 +224,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             true,
             true,
             ctx.equalsValArray(oldVal),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -238,7 +241,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             true,
             true,
             ctx.equalsValArray(val),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -272,7 +276,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             CU.empty0(),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -296,7 +301,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             true,
             false,
             CU.empty0(),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -316,7 +322,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             CU.empty0(),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -341,7 +348,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             CU.empty0(),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
 
         if (statsEnabled && rmv)
             metrics0().addRemoveTimeNanos(System.nanoTime() - start);
@@ -369,7 +377,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             ctx.equalsValArray(val),
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -587,7 +596,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             null,
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -669,7 +679,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             false,
             false,
             null,
-            ctx.writeThrough());
+            ctx.writeThrough(),
+            ctx.readThrough());
     }
 
     /** {@inheritDoc} */
@@ -718,6 +729,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         final boolean writeThrough = ctx.writeThrough();
 
+        final boolean readThrough = ctx.readThrough();
+
         final ExpiryPolicy expiry = expiryPerCall();
 
         return asyncOp(new Callable<Object>() {
@@ -730,7 +743,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                     retval,
                     rawRetval,
                     filter,
-                    writeThrough);
+                    writeThrough,
+                    readThrough);
             }
         });
     }
@@ -752,6 +766,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     ) {
         final boolean writeThrough = ctx.writeThrough();
 
+        final boolean readThrough = ctx.readThrough();
+
         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -768,7 +784,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                     retval,
                     rawRetval,
                     filter,
-                    writeThrough);
+                    writeThrough,
+                    readThrough);
             }
         });
 
@@ -789,7 +806,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
      * @param retval Return value required flag.
      * @param rawRetval Return {@code GridCacheReturn} instance.
      * @param filter Cache entry filter.
-     * @param storeEnabled Store enabled flag.
+     * @param writeThrough Write through.
+     * @param readThrough Read through.
      * @return Update result.
      * @throws IgniteCheckedException If failed.
      */
@@ -802,7 +820,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         boolean retval,
         boolean rawRetval,
         CacheEntryPredicate[] filter,
-        boolean storeEnabled) throws IgniteCheckedException {
+        boolean writeThrough,
+        boolean readThrough) throws IgniteCheckedException {
         if (keyCheck)
             validateCacheKeys(keys);
 
@@ -817,7 +836,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         UUID subjId = ctx.subjectIdPerCall(null);
 
-        if (storeEnabled && keys.size() > 1) {
+        if (writeThrough && keys.size() > 1) {
             return updateWithBatch(op,
                 keys,
                 vals,
@@ -862,8 +881,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                         val == null ? DELETE : op,
                         val,
                         invokeArgs,
-                        storeEnabled,
-                        storeEnabled,
+                        writeThrough,
+                        readThrough,
                         retval,
                         expiryPlc,
                         true,


Mime
View raw message