Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-683-1 [created] 923961dc1


#ignite-683: remove filters from locks.


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

Branch: refs/heads/ignite-683-1
Commit: 923961dc108b91ef5543e33c615f9098e8630cbf
Parents: 887c1a8
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Thu Apr 9 15:38:44 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Thu Apr 9 15:38:44 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheProjection.java       | 25 ++++-------------
 .../processors/cache/GridCacheAdapter.java      | 22 ++++++---------
 .../cache/GridCacheProjectionImpl.java          | 29 ++++++++------------
 .../processors/cache/GridCacheProxyImpl.java    | 28 ++++++++-----------
 .../GridDistributedCacheAdapter.java            | 15 ++++------
 .../distributed/dht/GridDhtCacheAdapter.java    |  3 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |  5 ++--
 .../dht/atomic/GridDhtAtomicCache.java          |  3 +-
 .../dht/colocated/GridDhtColocatedCache.java    | 10 +++----
 .../distributed/near/GridNearAtomicCache.java   | 10 +++----
 .../near/GridNearTransactionalCache.java        |  9 +++---
 .../processors/cache/local/GridLocalCache.java  | 16 +++++------
 .../local/atomic/GridLocalAtomicCache.java      |  9 ++----
 .../transactions/IgniteTxLocalAdapter.java      | 12 +++-----
 14 files changed, 74 insertions(+), 122 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index b17fdac..736c156 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -1385,12 +1385,11 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
      *      ({@code '0'} for no expiration), {@code -1} for immediate failure 
if
      *      lock cannot be acquired immediately).
-     * @param filter Optional filter to validate prior to acquiring the lock.
      * @return {@code True} if all filters passed and lock was acquired,
      *      {@code false} otherwise.
      * @throws IgniteCheckedException If lock acquisition resulted in error.
      */
-    public boolean lock(K key, long timeout, @Nullable CacheEntryPredicate... 
filter)
+    public boolean lock(K key, long timeout)
         throws IgniteCheckedException;
 
     /**
@@ -1407,13 +1406,11 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
      *      ({@code '0'} for no expiration, {@code -1} for immediate failure if
      *      lock cannot be acquired immediately).
-     * @param filter Optional filter to validate prior to acquiring the lock.
      * @return Future for the lock operation. The future will return {@code 
true}
      *      whenever all filters pass and locks are acquired before timeout is 
expired,
      *      {@code false} otherwise.
      */
-    public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout,
-        @Nullable CacheEntryPredicate... filter);
+    public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout);
 
     /**
      * All or nothing synchronous lock for passed in keys. This method
@@ -1428,14 +1425,11 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
      *      ({@code '0'} for no expiration).
-     * @param filter Optional filter that needs to atomically pass in order 
for the locks
-     *      to be acquired.
      * @return {@code True} if all filters passed and locks were acquired 
before
      *      timeout has expired, {@code false} otherwise.
      * @throws IgniteCheckedException If lock acquisition resulted in error.
      */
-    public boolean lockAll(@Nullable Collection<? extends K> keys, long 
timeout,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
+    public boolean lockAll(@Nullable Collection<? extends K> keys, long 
timeout) throws IgniteCheckedException;
 
     /**
      * All or nothing synchronous lock for passed in keys. This method
@@ -1450,14 +1444,11 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
      *      ({@code '0'} for no expiration).
-     * @param filter Optional filter that needs to atomically pass in order 
for the locks
-     *      to be acquired.
      * @return Future for the collection of locks. The future will return
      *      {@code true} if all filters passed and locks were acquired before
      *      timeout has expired, {@code false} otherwise.
      */
-    public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? 
extends K> keys, long timeout,
-        @Nullable CacheEntryPredicate... filter);
+    public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? 
extends K> keys, long timeout);
 
     /**
      * Unlocks given key only if current thread owns the lock. If optional 
filter
@@ -1470,10 +1461,9 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * which will acquire explicit locks for relevant cache operations.
      *
      * @param key Key to unlock.
-     * @param filter Optional filter that needs to pass prior to unlock taking 
effect.
      * @throws IgniteCheckedException If unlock execution resulted in error.
      */
-    public void unlock(K key, CacheEntryPredicate... filter) throws 
IgniteCheckedException;
+    public void unlock(K key) throws IgniteCheckedException;
 
     /**
      * Unlocks given keys only if current thread owns the locks. Only the keys
@@ -1487,12 +1477,9 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * which will acquire explicit locks for relevant cache operations.
      *
      * @param keys Keys to unlock.
-     * @param filter Optional filter which needs to pass for individual entries
-     *      to be unlocked.
      * @throws IgniteCheckedException If unlock execution resulted in error.
      */
-    public void unlockAll(@Nullable Collection<? extends K> keys,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
+    public void unlockAll(@Nullable Collection<? extends K> keys) throws 
IgniteCheckedException;
 
     /**
      * Checks if any node owns a lock for this key.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/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 5ade136..6003f57 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
@@ -472,8 +472,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         boolean retval,
         TransactionIsolation isolation,
         boolean invalidate,
-        long accessTtl,
-        CacheEntryPredicate[] filter);
+        long accessTtl);
 
     /**
      * Post constructor initialization for subclasses.
@@ -3259,23 +3258,21 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lock(K key, long timeout,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException 
{
+    @Override public boolean lock(K key, long timeout) throws 
IgniteCheckedException {
         A.notNull(key, "key");
 
-        return lockAll(Collections.singletonList(key), timeout, filter);
+        return lockAll(Collections.singletonList(key), timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException 
{
+    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout) throws IgniteCheckedException {
         if (F.isEmpty(keys))
             return true;
 
         if (keyCheck)
             validateCacheKeys(keys);
 
-        IgniteInternalFuture<Boolean> fut = lockAllAsync(keys, timeout, 
filter);
+        IgniteInternalFuture<Boolean> fut = lockAllAsync(keys, timeout);
 
         boolean isInterrupted = false;
 
@@ -3297,25 +3294,24 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout,
-        @Nullable CacheEntryPredicate... filter) {
+    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout) {
         A.notNull(key, "key");
 
         if (keyCheck)
             validateCacheKey(key);
 
-        return lockAllAsync(Collections.singletonList(key), timeout, filter);
+        return lockAllAsync(Collections.singletonList(key), timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public void unlock(K key, CacheEntryPredicate... filter)
+    @Override public void unlock(K key)
         throws IgniteCheckedException {
         A.notNull(key, "key");
 
         if (keyCheck)
             validateCacheKey(key);
 
-        unlockAll(Collections.singletonList(key), filter);
+        unlockAll(Collections.singletonList(key));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 9730c39..e94e188 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -785,38 +785,33 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lock(K key, long timeout,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException 
{
-        return cache.lock(key, timeout, filter);
+    @Override public boolean lock(K key, long timeout) throws 
IgniteCheckedException {
+        return cache.lock(key, timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout,
-        @Nullable CacheEntryPredicate[] filter) {
-        return cache.lockAsync(key, timeout, filter);
+    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout) {
+        return cache.lockAsync(key, timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout,
-        @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
-        return cache.lockAll(keys, timeout, filter);
+    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout) throws IgniteCheckedException {
+        return cache.lockAll(keys, timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable 
Collection<? extends K> keys, long timeout,
-        @Nullable CacheEntryPredicate[] filter) {
-        return cache.lockAllAsync(keys, timeout, filter);
+    @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable 
Collection<? extends K> keys, long timeout) {
+        return cache.lockAllAsync(keys, timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public void unlock(K key, CacheEntryPredicate[] filter) throws 
IgniteCheckedException {
-        cache.unlock(key, filter);
+    @Override public void unlock(K key) throws IgniteCheckedException {
+        cache.unlock(key);
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(@Nullable Collection<? extends K> keys,
-        @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
-        cache.unlockAll(keys, filter);
+    @Override public void unlockAll(@Nullable Collection<? extends K> keys) 
throws IgniteCheckedException {
+        cache.unlockAll(keys);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 2e8449e..9674cca 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -1584,12 +1584,12 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lock(K key, long timeout, @Nullable 
CacheEntryPredicate[] filter)
+    @Override public boolean lock(K key, long timeout)
         throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.lock(key, timeout, filter);
+            return delegate.lock(key, timeout);
         }
         finally {
             gate.leave(prev);
@@ -1597,12 +1597,11 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout,
-        @Nullable CacheEntryPredicate[] filter) {
+    @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long 
timeout) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.lockAsync(key, timeout, filter);
+            return delegate.lockAsync(key, timeout);
         }
         finally {
             gate.leave(prev);
@@ -1610,12 +1609,11 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout,
-        @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+    @Override public boolean lockAll(@Nullable Collection<? extends K> keys, 
long timeout) throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.lockAll(keys, timeout, filter);
+            return delegate.lockAll(keys, timeout);
         }
         finally {
             gate.leave(prev);
@@ -1623,12 +1621,11 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable 
Collection<? extends K> keys, long timeout,
-        @Nullable CacheEntryPredicate[] filter) {
+    @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable 
Collection<? extends K> keys, long timeout) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.lockAllAsync(keys, timeout, filter);
+            return delegate.lockAllAsync(keys, timeout);
         }
         finally {
             gate.leave(prev);
@@ -1636,11 +1633,11 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public void unlock(K key, CacheEntryPredicate[] filter) throws 
IgniteCheckedException {
+    @Override public void unlock(K key) throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            delegate.unlock(key, filter);
+            delegate.unlock(key);
         }
         finally {
             gate.leave(prev);
@@ -1648,12 +1645,11 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(@Nullable Collection<? extends K> keys,
-        @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+    @Override public void unlockAll(@Nullable Collection<? extends K> keys) 
throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            delegate.unlockAll(keys, filter);
+            delegate.unlockAll(keys);
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index b78e7e0..13558da 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -81,17 +81,15 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
         boolean retval,
         TransactionIsolation isolation,
         boolean isInvalidate,
-        long accessTtl,
-        CacheEntryPredicate[] filter
+        long accessTtl
     ) {
         assert tx != null;
 
-        return lockAllAsync(keys, timeout, tx, isInvalidate, isRead, retval, 
isolation, accessTtl, filter);
+        return lockAllAsync(keys, timeout, tx, isInvalidate, isRead, retval, 
isolation, accessTtl);
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? 
extends K> keys, long timeout,
-        CacheEntryPredicate... filter) {
+    @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? 
extends K> keys, long timeout) {
         IgniteTxLocalEx tx = ctx.tm().userTxx();
 
         // Return value flag is true because we choose to bring values for 
explicit locks.
@@ -102,8 +100,7 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
             false,
             /*retval*/true,
             null,
-            -1L,
-            filter);
+            -1L);
     }
 
     /**
@@ -115,7 +112,6 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
      * @param retval Flag to return value.
      * @param isolation Transaction isolation.
      * @param accessTtl TTL for read operation.
-     * @param filter Optional filter.
      * @return Future for locks.
      */
     protected abstract IgniteInternalFuture<Boolean> 
lockAllAsync(Collection<KeyCacheObject> keys,
@@ -125,8 +121,7 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
         boolean isRead,
         boolean retval,
         @Nullable TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter);
+        long accessTtl);
 
     /**
      * @param key Key to remove.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index a875a26..865dbbe 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -812,8 +812,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends 
GridDistributedCacheAdap
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(Collection<? extends K> keys,
-        CacheEntryPredicate[] filter) {
+    @Override public void unlockAll(Collection<? extends K> keys) {
         assert false;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 017b363..6d5de83 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -559,8 +559,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, 
V> extends GridDhtCach
         boolean isRead,
         boolean retval,
         TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter) {
+        long accessTtl) {
         return lockAllAsyncInternal(
             keys,
             timeout,
@@ -570,7 +569,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, 
V> extends GridDhtCach
             retval,
             isolation,
             accessTtl,
-            filter);
+            CU.empty0());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index be9a963..f23b0ae 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -636,8 +636,7 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
         boolean isRead,
         boolean retval,
         @Nullable TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter) {
+        long accessTtl) {
         return new FinishedLockFuture(new UnsupportedOperationException("Locks 
are not supported for " +
             "CacheAtomicityMode.ATOMIC mode (use 
CacheAtomicityMode.TRANSACTIONAL instead)"));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 0de4653..420c8dc 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -357,8 +357,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
         boolean isRead,
         boolean retval,
         @Nullable TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter
+        long accessTtl
     ) {
         assert tx == null || tx instanceof GridNearTxLocal;
 
@@ -371,7 +370,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
             retval,
             timeout,
             accessTtl,
-            filter);
+            CU.empty0());
 
         // Future will be added to mvcc only if it was mapped to remote nodes.
         fut.map();
@@ -397,8 +396,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(Collection<? extends K> keys,
-        CacheEntryPredicate[] filter) {
+    @Override public void unlockAll(Collection<? extends K> keys) {
         if (keys.isEmpty())
             return;
 
@@ -416,7 +414,7 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
 
                 GridDistributedCacheEntry entry = peekExx(cacheKey);
 
-                if (!ctx.isAll(entry, filter))
+                if (!ctx.isAll(entry, CU.empty0()))
                     break; // While.
 
                 GridCacheMvccCandidate lock =

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 6069849..264cad9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -663,15 +663,13 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
         boolean isRead,
         boolean retval,
         @Nullable TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter) {
-        return dht.lockAllAsync(null, timeout, filter);
+        long accessTtl) {
+        return dht.lockAllAsync(null, timeout);
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(@Nullable Collection<? extends K> keys,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException 
{
-        dht.unlockAll(keys, filter);
+    @Override public void unlockAll(@Nullable Collection<? extends K> keys) 
throws IgniteCheckedException {
+        dht.unlockAll(keys);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 44ff756..e68ff59 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -413,8 +413,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
         boolean isRead,
         boolean retval,
         TransactionIsolation isolation,
-        long accessTtl,
-        CacheEntryPredicate[] filter
+        long accessTtl
     ) {
         GridNearLockFuture<K, V> fut = new GridNearLockFuture<>(ctx,
             keys,
@@ -423,7 +422,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
             retval,
             timeout,
             accessTtl,
-            filter);
+            CU.empty0());
 
         if (!ctx.mvcc().addFuture(fut))
             throw new IllegalStateException("Duplicate future ID: " + fut);
@@ -465,7 +464,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
     }
 
     /** {@inheritDoc} */
-    @Override public void unlockAll(Collection<? extends K> keys, 
CacheEntryPredicate[] filter) {
+    @Override public void unlockAll(Collection<? extends K> keys) {
         if (keys.isEmpty())
             return;
 
@@ -484,7 +483,7 @@ public class GridNearTransactionalCache<K, V> extends 
GridNearCacheAdapter<K, V>
 
                     GridDistributedCacheEntry entry = peekExx(cacheKey);
 
-                    if (entry == null || !ctx.isAll(entry, filter))
+                    if (entry == null || !ctx.isAll(entry, CU.empty0()))
                         break; // While.
 
                     try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
index 5780144..fae2372 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
@@ -25,6 +25,7 @@ import 
org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
@@ -110,17 +111,15 @@ public class GridLocalCache<K, V> extends 
GridCacheAdapter<K, V> {
         boolean retval,
         TransactionIsolation isolation,
         boolean invalidate,
-        long accessTtl,
-        CacheEntryPredicate[] filter) {
-        return lockAllAsync(keys, timeout, tx, filter);
+        long accessTtl) {
+        return lockAllAsync(keys, timeout, tx, CU.empty0());
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? 
extends K> keys, long timeout,
-        CacheEntryPredicate[] filter) {
+    @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? 
extends K> keys, long timeout) {
         IgniteTxLocalEx tx = ctx.tm().localTx();
 
-        return lockAllAsync(ctx.cacheKeysView(keys), timeout, tx, filter);
+        return lockAllAsync(ctx.cacheKeysView(keys), timeout, tx, CU.empty0());
     }
 
     /**
@@ -185,15 +184,14 @@ public class GridLocalCache<K, V> extends 
GridCacheAdapter<K, V> {
 
     /** {@inheritDoc} */
     @Override public void unlockAll(
-        Collection<? extends K> keys,
-        CacheEntryPredicate[] filter
+        Collection<? extends K> keys
     ) throws IgniteCheckedException {
         AffinityTopologyVersion topVer = 
ctx.affinity().affinityTopologyVersion();
 
         for (K key : keys) {
             GridLocalCacheEntry entry = peekExx(ctx.toCacheKeyObject(key));
 
-            if (entry != null && ctx.isAll(entry, filter)) {
+            if (entry != null && ctx.isAll(entry, CU.empty0())) {
                 entry.releaseLocal();
 
                 ctx.evicts().touch(entry, topVer);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/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 204baf0..6e17f38 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
@@ -1462,8 +1462,7 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
         boolean retval,
         TransactionIsolation isolation,
         boolean invalidate,
-        long accessTtl,
-        CacheEntryPredicate[] filter) {
+        long accessTtl) {
         return new GridFinishedFuture<>(new 
UnsupportedOperationException("Locks are not supported for " +
             "CacheAtomicityMode.ATOMIC mode (use 
CacheAtomicityMode.TRANSACTIONAL instead)"));
     }
@@ -1471,16 +1470,14 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable 
Collection<? extends K> keys,
-        long timeout,
-        @Nullable CacheEntryPredicate... filter) {
+        long timeout) {
         return new GridFinishedFuture<>(new 
UnsupportedOperationException("Locks are not supported for " +
             "CacheAtomicityMode.ATOMIC mode (use 
CacheAtomicityMode.TRANSACTIONAL instead)"));
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public void unlockAll(@Nullable Collection<? extends K> keys,
-        @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException 
{
+    @Override public void unlockAll(@Nullable Collection<? extends K> keys) 
throws IgniteCheckedException {
         throw new UnsupportedOperationException("Locks are not supported for " 
+
             "CacheAtomicityMode.ATOMIC mode (use 
CacheAtomicityMode.TRANSACTIONAL instead)");
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/923961dc/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 2cbf0c8..5e6514c 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
@@ -1646,8 +1646,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                     true,
                     isolation,
                     isInvalidate(),
-                    accessTtl,
-                    CU.empty0());
+                    accessTtl);
 
                 PLC2<Map<K, V>> plc2 = new PLC2<Map<K, V>>() {
                     @Override public IgniteInternalFuture<Map<K, V>> 
postLock() throws IgniteCheckedException {
@@ -2619,8 +2618,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                     retval,
                     isolation,
                     isInvalidate(),
-                    -1L,
-                    CU.empty0());
+                    -1L);
 
                 PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
                     @Override public GridCacheReturn postLock(GridCacheReturn 
ret)
@@ -2839,8 +2837,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                     retval,
                     isolation,
                     isInvalidate(),
-                    -1L,
-                    CU.empty0());
+                    -1L);
 
                 PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
                     @Override protected GridCacheReturn 
postLock(GridCacheReturn ret)
@@ -3024,8 +3021,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                     false,
                     isolation,
                     isInvalidate(),
-                    -1L,
-                    CU.empty0()) :
+                    -1L) :
                 new GridFinishedFuture<>();
         }
         catch (IgniteCheckedException e) {

Reply via email to