ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [31/50] [abbrv] incubator-ignite git commit: ignite-1 do not invoke expire policy for dr if resolving is not needed (to pass TCK)
Date Mon, 19 Jan 2015 14:21:08 GMT
ignite-1 do not invoke expire policy for dr if resolving is not needed (to pass TCK)


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

Branch: refs/heads/ignite-54
Commit: 0f8d9ea5986b9a2a66cda98f8066ab108ce557c4
Parents: 83fb794
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Jan 14 14:27:54 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Jan 14 14:27:54 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 24 ++++++++++++++++++--
 .../processors/cache/GridCacheMapEntry.java     |  2 +-
 .../processors/cache/dr/GridCacheDrManager.java |  2 +-
 .../cache/dr/os/GridOsCacheDrManager.java       |  2 +-
 4 files changed, 25 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f8d9ea5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index e746780..f432c39 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -693,13 +693,33 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter
implements
     /** {@inheritDoc} */
     @Override public void removeAll() {
         // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            delegate.removeAll();
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */
     @Override public void clear() {
         // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            delegate.globalClearAll(0);
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f8d9ea5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
index bb493cc..d380d9a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
@@ -1655,7 +1655,7 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K,
V>
                     op,
                     writeObj,
                     valBytes,
-                    expiryPlc != null ? (isNew() ? expiryPlc.forCreate() : expiryPlc.forUpdate())
: -1L,
+                    expiryPlc,
                     drTtl,
                     drExpireTime,
                     drVer);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f8d9ea5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/GridCacheDrManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/GridCacheDrManager.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/GridCacheDrManager.java
index 8915fc1..8b34b33 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/GridCacheDrManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/GridCacheDrManager.java
@@ -43,7 +43,7 @@ public interface GridCacheDrManager<K, V> extends GridCacheManager<K,
V> {
          GridCacheOperation op,
          @Nullable Object writeObj,
          @Nullable byte[] valBytes,
-         long ttl,
+         @Nullable IgniteCacheExpiryPolicy expiryPlc,
          long drTtl,
          long drExpireTime,
          @Nullable GridCacheVersion drVer) throws IgniteCheckedException, GridCacheEntryRemovedException;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f8d9ea5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/os/GridOsCacheDrManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/os/GridOsCacheDrManager.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/os/GridOsCacheDrManager.java
index 702dd33..2d76e7d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/os/GridOsCacheDrManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/dr/os/GridOsCacheDrManager.java
@@ -72,7 +72,7 @@ public class GridOsCacheDrManager<K, V> implements GridCacheDrManager<K,
V> {
         GridCacheOperation op,
         @Nullable Object writeObj,
         @Nullable byte[] valBytes,
-        long ttl,
+        @Nullable IgniteCacheExpiryPolicy expiryPlc,
         long drTtl,
         long drExpireTime,
         @Nullable GridCacheVersion drVer) throws IgniteCheckedException, GridCacheEntryRemovedException
{


Mime
View raw message