ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [5/9] incubator-ignite git commit: #ignite-629: remove CacheFlag.READ
Date Fri, 27 Mar 2015 14:52:12 GMT
#ignite-629: remove CacheFlag.READ


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

Branch: refs/heads/ignite-629
Commit: 078f99b9fae2567fc2b882aa4e0034f2421e11f5
Parents: 748ddb6
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Mar 27 16:39:39 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Mar 27 16:39:39 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheFlag.java    |  10 --
 .../processors/cache/CacheProjection.java       | 118 +------------------
 .../processors/cache/GridCacheAdapter.java      |  95 +--------------
 .../processors/cache/GridCacheContext.java      |  25 ----
 .../processors/cache/GridCacheMapEntry.java     |   4 -
 .../processors/cache/GridCacheProjectionEx.java |  12 --
 .../dht/atomic/GridDhtAtomicCache.java          |   6 -
 .../distributed/near/GridNearCacheAdapter.java  |   6 +-
 .../local/atomic/GridLocalAtomicCache.java      |  46 --------
 .../continuous/CacheContinuousQueryHandler.java |   5 -
 .../OptimizedObjectStreamSelfTest.java          |   2 +-
 11 files changed, 8 insertions(+), 321 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
index 67332ff..6744d76 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
@@ -30,19 +30,9 @@ import javax.cache.processor.*;
  * <li>{@link CacheProjection#flagsOn(CacheFlag...)}</li>
  * <li>{@link CacheProjection#flagsOff(CacheFlag...)}</li>
  * </ul>
- * Also, some flags, like {@link #READ} may be implicitly set whenever
- * creating new projections and passing entries to predicate filters.
  */
 public enum CacheFlag {
     /**
-     * Only operations that don't change cached data are allowed.
-     * This flag is automatically set on underlying projection for
-     * all the entries that are given to predicate filters to make
-     * sure that data cannot be updated during predicate evaluation.
-     */
-    READ,
-
-    /**
      * Clone values prior to returning them to user.
      * <p>
      * Whenever values are returned from cache, they cannot be directly updated

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/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 d1941eb..200ee10 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
@@ -536,9 +536,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -575,9 +572,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -604,9 +598,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -637,9 +628,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -671,9 +659,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -702,9 +687,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -728,9 +710,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -754,9 +733,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -783,9 +759,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -813,9 +786,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -838,9 +808,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -864,9 +831,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -887,9 +851,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -912,9 +873,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -935,9 +893,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param m Key-value pairs to store in cache.
      * @param filter Optional entry filter. If provided, then entry will
@@ -958,9 +913,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param m Key-value pairs to store in cache.
      * @param filter Optional entry filter. If provided, then entry will
@@ -1165,9 +1117,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * If {@link org.apache.ignite.configuration.CacheConfiguration#isSwapEnabled()} is set to {@code true} and
      * {@link CacheFlag#SKIP_SWAP} is not enabled, the evicted entry will
      * be swapped to offheap, and then to disk.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to evict from cache.
      * @return {@code True} if entry could be evicted, {@code false} otherwise.
@@ -1182,10 +1131,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * If {@link org.apache.ignite.configuration.CacheConfiguration#isSwapEnabled()} is set to {@code true} and
      * {@link CacheFlag#SKIP_SWAP} is not enabled, the evicted entry will
      * be swapped to offheap, and then to disk.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
-     */
+     * */
     public void evictAll();
 
     /**
@@ -1196,9 +1142,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * If {@link org.apache.ignite.configuration.CacheConfiguration#isSwapEnabled()} is set to {@code true} and
      * {@link CacheFlag#SKIP_SWAP} is not enabled, the evicted entry will
      * be swapped to offheap, and then to disk.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to evict.
      */
@@ -1215,9 +1158,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * Note that this operation is local as it merely clears
      * entries from local cache. It does not remove entries from
      * remote caches or from underlying persistent storage.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      */
     public void clearLocally();
 
@@ -1232,9 +1172,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * Note that this operation is local as it merely clears
      * an entry from local cache. It does not remove entries from
      * remote caches or from underlying persistent storage.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to clearLocally.
      * @return {@code True} if entry was successfully cleared from cache, {@code false}
@@ -1254,9 +1191,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * Note that this operation is local as it merely clears
      * an entry from local cache. It does not remove entries from
      * remote caches or from underlying persistent storage.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to clearLocally.
      */
@@ -1351,9 +1285,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1384,9 +1315,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1408,9 +1336,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1435,9 +1360,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1459,9 +1381,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -1484,9 +1403,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -1506,9 +1422,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys whose mappings are to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1528,9 +1441,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys whose mappings are to be removed from cache.
      * @param filter Optional filter to check prior to removing value form cache. Note
@@ -1557,9 +1467,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @throws IgniteCheckedException If remove failed.
      * @throws CacheFlagException If flags validation failed.
@@ -1585,9 +1492,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1611,9 +1515,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1637,9 +1538,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1663,9 +1561,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1689,9 +1584,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to unlock.
      * @param filter Optional filter that needs to pass prior to unlock taking effect.
@@ -1710,9 +1602,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * need explicit locking within transaction, then you should use
      * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction
      * which will acquire explicit locks for relevant cache operations.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to unlock.
      * @param filter Optional filter which needs to pass for individual entries
@@ -1823,9 +1712,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * into memory.
      * <h2 class="header">Transactions</h2>
      * This method is not transactional.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#SKIP_SWAP}, {@link CacheFlag#READ}.
      *
      * @param key Key to promote entry for.
      * @return Unswapped entry value or {@code null} for non-existing key.
@@ -1841,7 +1727,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
      * This method is not transactional.
      * <h2 class="header">Cache Flags</h2>
      * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#SKIP_SWAP}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#SKIP_SWAP}
      *
      * @param keys Keys to promote entries for.
      * @throws IgniteCheckedException If promote failed.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/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 f745a67..492c07a 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
@@ -1356,7 +1356,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public void clearLocally() {
-        ctx.denyOnFlag(READ);
         ctx.checkSecurity(GridSecurityPermission.CACHE_REMOVE);
 
         List<GridCacheClearAllRunnable<K, V>> jobs = splitClearLocally();
@@ -2333,8 +2332,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         V prevVal = ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, ttl, filter).get().value();
@@ -2361,8 +2358,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, cached, ttl, filter).get().success();
@@ -2399,8 +2394,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, entry, ttl, filter)
@@ -2427,8 +2420,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, filter).get().success();
@@ -2453,8 +2444,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
 
-        ctx.denyOnLocalRead();
-
         syncOp(new SyncInOp(drMap.size() == 1) {
             @Override public void inOp(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 tx.putAllDrAsync(ctx, drMap).get();
@@ -2474,8 +2463,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
 
-        ctx.denyOnLocalRead();
-
         return asyncOp(new AsyncInOp(drMap.keySet()) {
             @Override
             public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
@@ -2499,8 +2486,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<EntryProcessorResult<T>>(true) {
             @Nullable @Override public EntryProcessorResult<T> op(IgniteTxLocalAdapter tx)
                 throws IgniteCheckedException {
@@ -2533,8 +2518,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<Map<K, EntryProcessorResult<T>>>(keys.size() == 1) {
             @Nullable
             @Override
@@ -2567,8 +2550,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<?> fut = asyncOp(new AsyncInOp(key) {
             @Override public IgniteInternalFuture<GridCacheReturn> inOp(IgniteTxLocalAdapter tx) {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap =
@@ -2612,8 +2593,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<?> fut = asyncOp(new AsyncInOp(keys) {
             @Override public IgniteInternalFuture<GridCacheReturn> inOp(IgniteTxLocalAdapter tx) {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap = F.viewAsMap(keys, new C1<K, EntryProcessor<K, V, Object>>() {
@@ -2654,8 +2633,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKeys(map.keySet());
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<?> fut = asyncOp(new AsyncInOp(map.keySet()) {
             @Override public IgniteInternalFuture<GridCacheReturn> inOp(IgniteTxLocalAdapter tx) {
                 return tx.invokeAsync(ctx, (Map<? extends K, ? extends EntryProcessor<K, V, Object>>)map, args);
@@ -2689,8 +2666,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKeys(map.keySet());
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<Map<K, EntryProcessorResult<T>>>(map.size() == 1) {
             @Nullable @Override public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter tx)
                 throws IgniteCheckedException {
@@ -2728,8 +2703,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return asyncOp(new AsyncOp<Boolean>(key) {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), false, entry, ttl, filter).chain(
@@ -2766,8 +2739,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noValArray()).get().value();
@@ -2792,8 +2763,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noValArray())
@@ -2824,8 +2793,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.noValArray()).get().success();
@@ -2855,8 +2822,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>(key) {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.noValArray()).chain(
@@ -2883,8 +2848,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.hasValArray()).get().value();
@@ -2909,8 +2872,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.hasValArray()).chain(
@@ -2937,8 +2898,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.hasValArray()).get().success();
@@ -2959,8 +2918,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(val);
 
-        ctx.denyOnLocalRead();
-
         return asyncOp(new AsyncOp<Boolean>(key) {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.hasValArray()).chain(
@@ -2984,8 +2941,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(newVal);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
@@ -3017,8 +2972,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValue(newVal);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>(key) {
             @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
                 // Register before hiding in the filter.
@@ -3061,8 +3014,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValues(m.values());
 
-        ctx.denyOnLocalRead();
-
         syncOp(new SyncInOp(m.size() == 1) {
             @Override public void inOp(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 tx.putAllAsync(ctx, m, false, null, -1, filter).get();
@@ -3088,8 +3039,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         validateCacheValues(m.values());
 
-        ctx.denyOnLocalRead();
-
         return asyncOp(new AsyncInOp(m.keySet()) {
             @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, m, false, null, -1, filter).chain(RET2NULL);
@@ -3114,8 +3063,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key");
 
         if (keyCheck)
@@ -3163,8 +3110,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key");
 
         if (keyCheck)
@@ -3197,8 +3142,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         A.notNull(keys, "keys");
 
-        ctx.denyOnLocalRead();
-
         if (F.isEmpty(keys))
             return;
 
@@ -3232,8 +3175,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         IgniteInternalFuture<Object> fut = asyncOp(new AsyncInOp(keys) {
             @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
                 return tx.removeAllAsync(ctx, keys, null, false, filter).chain(RET2NULL);
@@ -3272,8 +3213,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key");
 
         if (keyCheck)
@@ -3309,8 +3248,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key");
 
         if (keyCheck)
@@ -3335,8 +3272,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public GridCacheReturn removex(final K key, final V val) throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -3364,8 +3299,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     /** {@inheritDoc} */
     @Override public void removeAllConflict(final Map<KeyCacheObject, GridCacheVersion> drMap)
         throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         if (F.isEmpty(drMap))
             return;
 
@@ -3385,8 +3318,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> removeAllConflictAsync(final Map<KeyCacheObject, GridCacheVersion> drMap)
         throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         if (F.isEmpty(drMap))
             return new GridFinishedFuture<Object>();
 
@@ -3412,8 +3343,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         return syncOp(new SyncOp<GridCacheReturn>(true) {
             @Override public GridCacheReturn op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
@@ -3436,8 +3365,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<GridCacheReturn> removexAsync(final K key, final V val) {
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -3479,8 +3406,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         return asyncOp(new AsyncOp<GridCacheReturn>(key) {
             @Override public IgniteInternalFuture<GridCacheReturn> op(IgniteTxLocalAdapter tx) {
                 // Register before hiding in the filter.
@@ -3514,8 +3439,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -3550,8 +3473,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
 
-        ctx.denyOnLocalRead();
-
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -3592,8 +3513,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      * @return Future.
      */
     public IgniteInternalFuture<?> localRemoveAll(final CacheEntryPredicate filter) {
-        ctx.denyOnLocalRead();
-
         final Set<? extends K> keys = filter != null ? keySet(filter) : keySet();
 
         return asyncOp(new AsyncInOp(keys) {
@@ -4286,7 +4205,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      */
     @SuppressWarnings("IfMayBeConditional")
     @Nullable public V promote(K key, boolean deserializePortable) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ, SKIP_SWAP));
+        ctx.denyOnFlags(F.asList(SKIP_SWAP));
 
         A.notNull(key, "key");
 
@@ -4322,7 +4241,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ, SKIP_SWAP));
+        ctx.denyOnFlags(F.asList(SKIP_SWAP));
 
         if (F.isEmpty(keys))
             return;
@@ -4846,7 +4765,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      */
     public void clearLocally0(Collection<? extends K> keys,
         @Nullable CacheEntryPredicate... filter) {
-        ctx.denyOnFlag(READ);
         ctx.checkSecurity(GridSecurityPermission.CACHE_REMOVE);
 
         if (F.isEmpty(keys))
@@ -4872,7 +4790,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnFlag(READ);
         ctx.checkSecurity(GridSecurityPermission.CACHE_REMOVE);
 
         return clearLocally(ctx.versions().next(), key, filter);
@@ -4889,8 +4806,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnFlag(READ);
-
         return evictx(key, ctx.versions().next(), filter);
     }
 
@@ -4902,8 +4817,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         @Nullable CacheEntryPredicate... filter) {
         A.notNull(keys, "keys");
 
-        ctx.denyOnFlag(READ);
-
         if (F.isEmpty(keys))
             return;
 
@@ -5054,8 +4967,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      * @throws IgniteCheckedException If failed.
      */
     @Override @Nullable public V reload(K key) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ));
-
         A.notNull(key, "key");
 
         if (keyCheck)
@@ -5087,8 +4998,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      * @return Reload future.
      */
     @Override public IgniteInternalFuture<V> reloadAsync(final K key) {
-        ctx.denyOnFlags(F.asList(READ));
-
         return ctx.closures().callLocalSafe(ctx.projectSafe(new Callable<V>() {
             @Nullable @Override public V call() throws IgniteCheckedException {
                 return reload(key);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 9d0bff9..5cdefcf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -156,9 +156,6 @@ public class GridCacheContext<K, V> implements Externalizable {
     /** Thread local forced flags that affect any projection in the same thread. */
     private ThreadLocal<CacheFlag[]> forcedFlags = new ThreadLocal<>();
 
-    /** Constant array to avoid recreation. */
-    private static final CacheFlag[] FLAG_READ = new CacheFlag[]{READ};
-
     /** Cache name. */
     private String cacheName;
 
@@ -1110,9 +1107,6 @@ public class GridCacheContext<K, V> implements Externalizable {
         if (F.isEmpty(p))
             return true;
 
-        // We should allow only local read-only operations within filter checking.
-        CacheFlag[] oldFlags = forceFlags(FLAG_READ);
-
         try {
             boolean pass = F.isAll(e, p);
 
@@ -1125,9 +1119,6 @@ public class GridCacheContext<K, V> implements Externalizable {
         catch (RuntimeException ex) {
             throw U.cast(ex);
         }
-        finally {
-            forceFlags(oldFlags);
-        }
     }
 
     /**
@@ -1187,15 +1178,6 @@ public class GridCacheContext<K, V> implements Externalizable {
     }
 
     /**
-     * Forces LOCAL and READ flags.
-     *
-     * @return Forced flags that were set prior to method call.
-     */
-    @Nullable public CacheFlag[] forceLocalRead() {
-        return forceFlags(FLAG_READ);
-    }
-
-    /**
      * Force projection flags for the current thread. These flags will affect all
      * projections (even without flags) used within the current thread.
      *
@@ -1366,13 +1348,6 @@ public class GridCacheContext<K, V> implements Externalizable {
     }
 
     /**
-     *
-     */
-    public void denyOnLocalRead() {
-        denyOnFlags(FLAG_READ);
-    }
-
-    /**
      * @param flags Flags.
      */
     public void denyOnFlags(CacheFlag[] flags) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index ca6d2d4..cf689ee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -849,8 +849,6 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
     @SuppressWarnings({"unchecked", "TooBroadScope"})
     @Nullable @Override public final CacheObject innerReload()
         throws IgniteCheckedException, GridCacheEntryRemovedException {
-        cctx.denyOnFlag(READ);
-
         CU.checkStore(cctx);
 
         GridCacheVersion startVer;
@@ -2324,8 +2322,6 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
     /** {@inheritDoc} */
     @Override public boolean clear(GridCacheVersion ver, boolean readers,
         @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
-        cctx.denyOnFlag(READ);
-
         boolean ret;
         boolean rmv;
         boolean marked;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
index 8706442..b435d88 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
@@ -201,9 +201,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -226,9 +223,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -248,9 +242,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -272,9 +263,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
      * <h2 class="header">Transactions</h2>
      * This method is transactional and will enlist the entry into ongoing transaction
      * if there is one.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/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 cf317a5..ee59f9c 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
@@ -686,8 +686,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         Map<? extends K, EntryProcessor> invokeMap =
             Collections.singletonMap(key, (EntryProcessor)entryProcessor);
 
@@ -727,8 +725,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         Map<? extends K, EntryProcessor> invokeMap = F.viewAsMap(keys, new C1<K, EntryProcessor>() {
             @Override public EntryProcessor apply(K k) {
                 return entryProcessor;
@@ -763,8 +759,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(map.keySet());
 
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(null,
             map,
             args,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 2b5d4de..1ef0162 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -521,7 +521,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
 
     /** {@inheritDoc} */
     @Override public V promote(K key, boolean deserializePortable) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ, SKIP_SWAP));
+        ctx.denyOnFlags(F.asList(SKIP_SWAP));
 
         // Unswap only from dht(). Near cache does not have swap storage.
         return dht().promote(key, deserializePortable);
@@ -529,7 +529,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
 
     /** {@inheritDoc} */
     @Override public V promote(K key) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ, SKIP_SWAP));
+        ctx.denyOnFlags(F.asList(SKIP_SWAP));
 
         // Unswap only from dht(). Near cache does not have swap storage.
         return dht().promote(key);
@@ -537,7 +537,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
 
     /** {@inheritDoc} */
     @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException {
-        ctx.denyOnFlags(F.asList(READ, SKIP_SWAP));
+        ctx.denyOnFlags(F.asList(SKIP_SWAP));
 
         // Unswap only from dht(). Near cache does not have swap storage.
         // In near-only cache this is a no-op.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/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 a33ed99..f0b5dee 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
@@ -109,8 +109,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return (V)updateAllInternal(UPDATE,
             Collections.singleton(key),
             Collections.singleton(val),
@@ -131,8 +129,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return (Boolean)updateAllInternal(UPDATE,
             Collections.singleton(key),
             Collections.singleton(val),
@@ -150,8 +146,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         CacheEntryPredicate[] filter) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return (Boolean)updateAllInternal(UPDATE,
             Collections.singleton(key),
             Collections.singleton(val),
@@ -172,8 +166,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         @Nullable CacheEntryPredicate... filter) {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(F0.asMap(key, val),
             null,
             null,
@@ -191,8 +183,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         @Nullable CacheEntryPredicate... filter) {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(F0.asMap(key, val),
             null,
             null,
@@ -260,8 +250,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
         A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
 
-        ctx.denyOnLocalRead();
-
         return (GridCacheReturn)updateAllInternal(UPDATE,
             Collections.singleton(key),
             Collections.singleton(newVal),
@@ -278,8 +266,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public GridCacheReturn removex(K key, V val) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return (GridCacheReturn)updateAllInternal(DELETE,
             Collections.singleton(key),
             null,
@@ -296,8 +282,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val) {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return removeAllAsync0(F.asList(key), true, true, ctx.equalsValArray(val));
     }
 
@@ -306,8 +290,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
         A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
 
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(F.asMap(key, newVal),
             null,
             null,
@@ -319,8 +301,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     /** {@inheritDoc} */
     @Override public void putAll(Map<? extends K, ? extends V> m,
         CacheEntryPredicate[] filter) throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         updateAllInternal(UPDATE,
             m.keySet(),
             m.values(),
@@ -335,8 +315,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
         @Nullable CacheEntryPredicate[] filter) {
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(m,
             null,
             null,
@@ -350,8 +328,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public V remove(K key,
         @Nullable GridCacheEntryEx entry,
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         return (V)updateAllInternal(DELETE,
             Collections.singleton(key),
             null,
@@ -368,8 +344,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<V> removeAsync(K key,
         @Nullable GridCacheEntryEx entry,
         @Nullable CacheEntryPredicate... filter) {
-        ctx.denyOnLocalRead();
-
         return removeAllAsync0(Collections.singletonList(key), true, false, filter);
     }
 
@@ -377,8 +351,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @SuppressWarnings("unchecked")
     @Override public void removeAll(Collection<? extends K> keys,
         CacheEntryPredicate... filter) throws IgniteCheckedException {
-        ctx.denyOnLocalRead();
-
         updateAllInternal(DELETE,
             keys,
             null,
@@ -393,8 +365,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys,
         CacheEntryPredicate[] filter) {
-        ctx.denyOnLocalRead();
-
         return removeAllAsync0(keys, false, false, filter).chain(RET2NULL);
     }
 
@@ -409,8 +379,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
 
         A.notNull(key, "key");
 
-        ctx.denyOnLocalRead();
-
         Boolean rmv = (Boolean)updateAllInternal(DELETE,
             Collections.singleton(key),
             null,
@@ -434,8 +402,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         @Nullable CacheEntryPredicate... filter) {
         A.notNull(key, "key");
 
-        ctx.denyOnLocalRead();
-
         return removeAllAsync0(Collections.singletonList(key), false, false, filter);
     }
 
@@ -443,8 +409,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
     @Override public boolean remove(K key, V val) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
-        ctx.denyOnLocalRead();
-
         return (Boolean)updateAllInternal(DELETE,
             Collections.singleton(key),
             null,
@@ -670,8 +634,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         Map<? extends K, EntryProcessor> invokeMap = F.viewAsMap(keys, new C1<K, EntryProcessor>() {
             @Override public EntryProcessor apply(K k) {
                 return entryProcessor;
@@ -699,8 +661,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKey(key);
 
-        ctx.denyOnLocalRead();
-
         Map<? extends K, EntryProcessor> invokeMap =
             Collections.singletonMap(key, (EntryProcessor)entryProcessor);
 
@@ -738,8 +698,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(keys);
 
-        ctx.denyOnLocalRead();
-
         Map<? extends K, EntryProcessor> invokeMap = F.viewAsMap(keys, new C1<K, EntryProcessor>() {
             @Override public EntryProcessor apply(K k) {
                 return entryProcessor;
@@ -764,8 +722,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(map.keySet());
 
-        ctx.denyOnLocalRead();
-
         return (Map<K, EntryProcessorResult<T>>)updateAllInternal(TRANSFORM,
             map.keySet(),
             map.values(),
@@ -787,8 +743,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
         if (keyCheck)
             validateCacheKeys(map.keySet());
 
-        ctx.denyOnLocalRead();
-
         return updateAllAsync0(null,
             map,
             args,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 1e81910..1fd1ded 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -198,17 +198,12 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler {
                 boolean notify = true;
 
                 if (rmtFilter != null) {
-                    CacheFlag[] f = cctx.forceLocalRead();
-
                     try {
                         notify = rmtFilter.evaluate(evt);
                     }
                     catch (Exception e) {
                         U.error(cctx.logger(CacheContinuousQueryHandler.class), "CacheEntryEventFilter failed: " + e);
                     }
-                    finally {
-                        cctx.forceFlags(f);
-                    }
                 }
 
                 if (notify) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/078f99b9/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
index 954c053..2572b7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
@@ -1007,7 +1007,7 @@ public class OptimizedObjectStreamSelfTest extends GridCommonAbstractTest {
 
         assertEquals(t.getMessage(), ((Throwable)marshalUnmarshal(t)).getMessage());
 
-        CacheFlagException flagEx = new CacheFlagException(CacheFlag.CLONE, CacheFlag.READ);
+        CacheFlagException flagEx = new CacheFlagException(CacheFlag.CLONE);
 
         assertEquals(flagEx.flags(), ((CacheFlagException)marshalUnmarshal(flagEx)).flags());
     }


Mime
View raw message