ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [19/22] ignite git commit: TX: removed filter from putAsync.
Date Fri, 01 Apr 2016 08:25:04 GMT
TX: removed filter from putAsync.


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

Branch: refs/heads/ignite-2931
Commit: 513545d2daa12727efae668bce7d39d22a1baabe
Parents: b2cccad
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Apr 1 10:24:49 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Apr 1 10:24:49 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 29 ++++++++++----------
 .../transactions/IgniteTxLocalAdapter.java      |  4 +--
 .../cache/transactions/IgniteTxLocalEx.java     |  2 +-
 3 files changed, 17 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/513545d2/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 c42af9d..875e0e0 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
@@ -2088,7 +2088,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         V prevVal = syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return (V)tx.putAsync(ctx, key, val, true, filterArray(filter)).get().value();
+                return (V)tx.putAsync(ctx, key, val, true, filter).get().value();
             }
 
             @Override public String toString() {
@@ -2141,7 +2141,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
-                return tx.putAsync(ctx, key, val, true, filterArray(filter))
+                return tx.putAsync(ctx, key, val, true, filter)
                     .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>,
V>)RET2VAL);
             }
 
@@ -2178,7 +2178,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return tx.putAsync(ctx, key, val, false, filterArray(filter)).get().success();
+                return tx.putAsync(ctx, key, val, false, filter).get().success();
             }
 
             @Override public String toString() {
@@ -2497,7 +2497,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter
tx) {
-                return tx.putAsync(ctx, key, val, false, filterArray(filter)).chain(
+                return tx.putAsync(ctx, key, val, false, filter).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)RET2FLAG);
             }
 
@@ -2522,7 +2522,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return (V)tx.putAsync(ctx, key, val, true, ctx.noValArray()).get().value();
+                return (V)tx.putAsync(ctx, key, val, true, ctx.noVal()).get().value();
             }
 
             @Override public String toString() {
@@ -2544,7 +2544,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
-                return tx.putAsync(ctx, key, val, true, ctx.noValArray())
+                return tx.putAsync(ctx, key, val, true, ctx.noVal())
                     .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>,
V>)RET2VAL);
             }
 
@@ -2572,7 +2572,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return tx.putAsync(ctx, key, val, false, ctx.noValArray()).get().success();
+                return tx.putAsync(ctx, key, val, false, ctx.noVal()).get().success();
             }
 
             @Override public String toString() {
@@ -2599,7 +2599,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter
tx) {
-                return tx.putAsync(ctx, key, val, false, ctx.noValArray()).chain(
+                return tx.putAsync(ctx, key, val, false, ctx.noVal()).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)RET2FLAG);
             }
 
@@ -2623,7 +2623,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return (V)tx.putAsync(ctx, key, val, true, ctx.hasValArray()).get().value();
+                return (V)tx.putAsync(ctx, key, val, true, ctx.hasVal()).get().value();
             }
 
             @Override public String toString() {
@@ -2645,7 +2645,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
-                return tx.putAsync(ctx, key, val, true, ctx.hasValArray()).chain(
+                return tx.putAsync(ctx, key, val, true, ctx.hasVal()).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, V>)RET2VAL);
             }
 
@@ -2669,7 +2669,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return tx.putAsync(ctx, key, val, false, ctx.hasValArray()).get().success();
+                return tx.putAsync(ctx, key, val, false, ctx.hasVal()).get().success();
             }
 
             @Override public String toString() {
@@ -2687,7 +2687,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         return asyncOp(new AsyncOp<Boolean>() {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter
tx) {
-                return tx.putAsync(ctx, key, val, false, ctx.hasValArray()).chain(
+                return tx.putAsync(ctx, key, val, false, ctx.hasVal()).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)
RET2FLAG);
             }
 
@@ -2710,8 +2710,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                 if (ctx.deploymentEnabled())
                     ctx.deploy().registerClass(oldVal);
 
-                return tx.putAsync(ctx, key, newVal, false, ctx.equalsValArray(oldVal)).get()
-                    .success();
+                return tx.putAsync(ctx, key, newVal, false, ctx.equalsVal(oldVal)).get().success();
             }
 
             @Override public String toString() {
@@ -2743,7 +2742,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                     }
                 }
 
-                return tx.putAsync(ctx, key, newVal, false, ctx.equalsValArray(oldVal)).chain(
+                return tx.putAsync(ctx, key, newVal, false, ctx.equalsVal(oldVal)).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)RET2FLAG);
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/513545d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index c59f2eb..2d863f5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2050,8 +2050,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
         K key,
         V val,
         boolean retval,
-        CacheEntryPredicate[] filter) {
-        return putAsync0(cacheCtx, key, val, null, null, retval, filter);
+        CacheEntryPredicate filter) {
+        return putAsync0(cacheCtx, key, val, null, null, retval, GridCacheAdapter.filterArray(filter));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/513545d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
index 8af1492..d884617 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
@@ -103,7 +103,7 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
         K key,
         V val,
         boolean retval,
-        CacheEntryPredicate[] filter);
+        CacheEntryPredicate filter);
 
     /**
      * @param cacheCtx Cache context.


Mime
View raw message