ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [01/49] incubator-ignite git commit: #ignite-629: Remove CacheFlag.Local
Date Wed, 01 Apr 2015 08:37:47 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-645 a17175c09 -> 7368fdb61 (forced update)


#ignite-629: Remove CacheFlag.Local


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

Branch: refs/heads/ignite-645
Commit: 4bc5b2225d705d88aefcb6e655f12a4f13d5e5cf
Parents: 71ecef2
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Mar 27 15:28:47 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Mar 27 15:28:47 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheFlag.java    | 10 +--
 .../processors/cache/CacheProjection.java       | 70 +++++++++-----------
 .../processors/cache/GridCacheAdapter.java      | 16 +----
 .../processors/cache/GridCacheContext.java      | 20 ++----
 .../processors/cache/GridCacheMapEntry.java     |  2 -
 .../processors/cache/GridCacheProjectionEx.java |  8 +--
 .../dht/colocated/GridDhtColocatedCache.java    |  1 -
 .../distributed/near/GridNearAtomicCache.java   |  1 -
 .../near/GridNearTransactionalCache.java        |  1 -
 .../local/atomic/GridLocalAtomicCache.java      |  6 --
 .../ignite/scalar/pimps/ScalarCachePimp.scala   | 18 ++---
 11 files changed, 52 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 9712ae1..fc38969 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,11 @@ import javax.cache.processor.*;
  * <li>{@link CacheProjection#flagsOn(CacheFlag...)}</li>
  * <li>{@link CacheProjection#flagsOff(CacheFlag...)}</li>
  * </ul>
- * Also, some flags, like {@link #LOCAL}, or {@link #READ} may be implicitly set whenever
+ * 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 require any communication with
-     * other cache nodes are allowed. This flag is automatically set
-     * on underlying projection for all the entries that are given to
-     * predicate filters to make sure that no distribution happens
-     * from inside of predicate evaluation.
-     */
     LOCAL,
-
     /**
      * Only operations that don't change cached data are allowed.
      * This flag is automatically set on underlying projection for

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 6659735..768edbe 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
@@ -443,8 +443,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 {@link CacheFlag#LOCAL} flag is set on projection.
      *
      * @param key Key to retrieve the value for.
      * @return Value for the given key.
@@ -468,8 +466,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 {@link CacheFlag#LOCAL} flag is set on projection.
      *
      * @param key Key for the value to get.
      * @return Future for the get operation.
@@ -492,8 +488,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 {@link CacheFlag#LOCAL} flag is set on projection.
      *
      * @param keys Keys to get.
      * @return Map of key-value pairs.
@@ -516,8 +510,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 {@link CacheFlag#LOCAL} flag is set on projection.
      *
      * @param keys Key for the value to get.
      * @return Future for the get operation.
@@ -546,7 +538,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -585,7 +577,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -614,7 +606,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -647,7 +639,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -681,7 +673,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -712,7 +704,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -738,7 +730,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -764,7 +756,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -793,7 +785,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -823,7 +815,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -848,7 +840,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -874,7 +866,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
@@ -897,7 +889,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -922,7 +914,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -945,7 +937,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param m Key-value pairs to store in cache.
      * @param filter Optional entry filter. If provided, then entry will
@@ -968,7 +960,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param m Key-value pairs to store in cache.
      * @param filter Optional entry filter. If provided, then entry will
@@ -1361,7 +1353,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1394,7 +1386,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1418,7 +1410,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1445,7 +1437,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1469,7 +1461,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -1494,7 +1486,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -1516,7 +1508,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1538,7 +1530,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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
@@ -1567,7 +1559,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @throws IgniteCheckedException If remove failed.
      * @throws CacheFlagException If flags validation failed.
@@ -1595,7 +1587,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1621,7 +1613,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1647,7 +1639,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1673,7 +1665,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to lock.
      * @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1699,7 +1691,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to unlock.
      * @param filter Optional filter that needs to pass prior to unlock taking effect.
@@ -1720,7 +1712,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param keys Keys to unlock.
      * @param filter Optional filter which needs to pass for individual entries

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 9a5b2a0..fad90de 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
@@ -1597,8 +1597,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
     /** {@inheritDoc} */
     @Override public V getForcePrimary(K key) throws IgniteCheckedException {
-        ctx.denyOnFlag(LOCAL);
-
         String taskName = ctx.kernalContext().job().currentTaskName();
 
         return getAllAsync(F.asList(key), /*force primary*/true, /*skip tx*/false, null,
null, taskName, true, false)
@@ -1607,8 +1605,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<V> getForcePrimaryAsync(final K key) {
-        ctx.denyOnFlag(LOCAL);
-
         String taskName = ctx.kernalContext().job().currentTaskName();
 
         return getAllAsync(Collections.singletonList(key), /*force primary*/true, /*skip
tx*/false, null, null,
@@ -2040,9 +2036,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     ) {
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
-        ctx.denyOnFlag(LOCAL);
-
-        if (keyCheck)
+       if (keyCheck)
             validateCacheKeys(keys);
 
         return getAllAsync0(ctx.cacheKeysView(keys),
@@ -5023,8 +5017,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
      * @return Read operation future.
      */
     public final IgniteInternalFuture<V> getAsync(final K key, boolean deserializePortable)
{
-        ctx.denyOnFlag(LOCAL);
-
         try {
             checkJta();
         }
@@ -5051,8 +5043,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
      * @throws IgniteCheckedException If read failed.
      */
     public Map<K, V> getAll(Collection<? extends K> keys, boolean deserializePortable)
throws IgniteCheckedException {
-        ctx.denyOnFlag(LOCAL);
-
         checkJta();
 
         return getAllAsync(keys, deserializePortable).get();
@@ -5064,7 +5054,7 @@ 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(LOCAL, READ));
+        ctx.denyOnFlags(F.asList(READ));
 
         A.notNull(key, "key");
 
@@ -5097,7 +5087,7 @@ 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(LOCAL, READ));
+        ctx.denyOnFlags(F.asList(READ));
 
         return ctx.closures().callLocalSafe(ctx.projectSafe(new Callable<V>() {
             @Nullable @Override public V call() throws IgniteCheckedException {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 de180ee..9d0bff9 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
@@ -157,10 +157,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     private ThreadLocal<CacheFlag[]> forcedFlags = new ThreadLocal<>();
 
     /** Constant array to avoid recreation. */
-    private static final CacheFlag[] FLAG_LOCAL_READ = new CacheFlag[]{LOCAL, READ};
-
-    /** Local flag array. */
-    private static final CacheFlag[] FLAG_LOCAL = new CacheFlag[]{LOCAL};
+    private static final CacheFlag[] FLAG_READ = new CacheFlag[]{READ};
 
     /** Cache name. */
     private String cacheName;
@@ -1114,7 +1111,7 @@ public class GridCacheContext<K, V> implements Externalizable
{
             return true;
 
         // We should allow only local read-only operations within filter checking.
-        CacheFlag[] oldFlags = forceFlags(FLAG_LOCAL_READ);
+        CacheFlag[] oldFlags = forceFlags(FLAG_READ);
 
         try {
             boolean pass = F.isAll(e, p);
@@ -1190,21 +1187,12 @@ public class GridCacheContext<K, V> implements Externalizable
{
     }
 
     /**
-     * Forces LOCAL flag.
-     *
-     * @return Previously forced flags.
-     */
-    @Nullable public CacheFlag[] forceLocal() {
-        return forceFlags(FLAG_LOCAL);
-    }
-
-    /**
      * Forces LOCAL and READ flags.
      *
      * @return Forced flags that were set prior to method call.
      */
     @Nullable public CacheFlag[] forceLocalRead() {
-        return forceFlags(FLAG_LOCAL_READ);
+        return forceFlags(FLAG_READ);
     }
 
     /**
@@ -1381,7 +1369,7 @@ public class GridCacheContext<K, V> implements Externalizable
{
      *
      */
     public void denyOnLocalRead() {
-        denyOnFlags(FLAG_LOCAL_READ);
+        denyOnFlags(FLAG_READ);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 948f916..9b765ed 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
@@ -609,8 +609,6 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
         String taskName,
         @Nullable IgniteCacheExpiryPolicy expirePlc)
         throws IgniteCheckedException, GridCacheEntryRemovedException {
-        cctx.denyOnFlag(LOCAL);
-
         return innerGet0(tx,
             readSwap,
             readThrough,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 d8574b7..8706442 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
@@ -203,7 +203,7 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K,
V> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -228,7 +228,7 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K,
V> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key to store in cache.
      * @param oldVal Old value to match.
@@ -250,7 +250,7 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K,
V> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@link CacheFlag#READ}.
      *
      * @param key Key whose mapping is to be removed from cache.
      * @param val Value to match against currently cached value.
@@ -274,7 +274,7 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K,
V> {
      * 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#LOCAL}, {@link CacheFlag#READ}.
+     * {@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/4bc5b222/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 cdf1638..279cac6 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
@@ -178,7 +178,6 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         final boolean deserializePortable,
         final boolean skipVals
     ) {
-        ctx.denyOnFlag(LOCAL);
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
         if (F.isEmpty(keys))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 6e24261..4f949a1 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
@@ -364,7 +364,6 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
         boolean deserializePortable,
         boolean skipVals
     ) {
-        ctx.denyOnFlag(LOCAL);
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
         if (F.isEmpty(keys))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 71e173b..eb602aa 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
@@ -104,7 +104,6 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K,
V>
         final boolean deserializePortable,
         final boolean skipVals
     ) {
-        ctx.denyOnFlag(LOCAL);
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
         if (F.isEmpty(keys))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/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 a5d84a2..a33ed99 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
@@ -482,8 +482,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
     @SuppressWarnings("unchecked")
     @Override @Nullable public V get(K key, boolean deserializePortable) throws IgniteCheckedException
{
-        ctx.denyOnFlag(LOCAL);
-
         String taskName = ctx.kernalContext().job().currentTaskName();
 
         Map<K, V> m = getAllInternal(Collections.singleton(key),
@@ -503,8 +501,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     @SuppressWarnings("unchecked")
     @Override public final Map<K, V> getAll(Collection<? extends K> keys, boolean
deserializePortable)
         throws IgniteCheckedException {
-        ctx.denyOnFlag(LOCAL);
-
         A.notNull(keys, "keys");
 
         String taskName = ctx.kernalContext().job().currentTaskName();
@@ -531,8 +527,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         final boolean deserializePortable,
         final boolean skipVals
     ) {
-        ctx.denyOnFlag(LOCAL);
-
         A.notNull(keys, "keys");
 
         final boolean swapOrOffheap = ctx.isSwapOrOffheapEnabled();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4bc5b222/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCachePimp.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCachePimp.scala
b/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCachePimp.scala
index dab4671..e9e6de7 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCachePimp.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCachePimp.scala
@@ -215,7 +215,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param kv Key-Value pair to store in cache.
      * @return `True` if value was stored in cache, `false` otherwise.
@@ -237,7 +237,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param kv Key-Value pair to store in cache.
      * @return Previous value associated with specified key, or `null`
@@ -261,7 +261,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param kv Key-Value pair to store in cache.
      * @return Previous value associated with specified key as an option.
@@ -291,7 +291,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param kv1 Key-value pair to store in cache.
      * @param kv2 Key-value pair to store in cache.
@@ -321,7 +321,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param kvs Key-value pairs to store in cache. If `null` this function is no-op.
      * @see `IgniteCache#putAll(...)`
@@ -343,7 +343,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param ks Sequence of additional keys to remove. If `null` - this function is no-op.
      * @see `IgniteCache#removeAll(...)`
@@ -388,7 +388,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param k Key whose mapping is to be removed from cache.
      * @return Previous value associated with specified key, or `null`
@@ -420,7 +420,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param k Key whose mapping is to be removed from cache.
      * @return Previous value associated with specified key as an option.
@@ -451,7 +451,7 @@ with Iterable[Cache.Entry[K, V]] with Ordered[IgniteCache[K, V]] {
      *
      * ===Cache Flags===
      * This method is not available if any of the following flags are set on projection:
-     * `CacheFlag#LOCAL`, `CacheFlag#READ`.
+     * `CacheFlag#READ`.
      *
      * @param k1 1st key to remove.
      * @param k2 2nd key to remove.


Mime
View raw message