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 9712ae1690305..fc38969c721dc 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 @@ *
  • {@link CacheProjection#flagsOn(CacheFlag...)}
  • *
  • {@link CacheProjection#flagsOff(CacheFlag...)}
  • * - * 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 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 6659735df916c..768edbecfa703 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 extends Iterable> { *

    Transactions

    * This method is transactional and will enlist the entry into ongoing transaction * if there is one. - *

    Cache Flags

    - * 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 extends Iterable> { *

    Transactions

    * This method is transactional and will enlist the entry into ongoing transaction * if there is one. - *

    Cache Flags

    - * 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 extends Iterable> { *

    Transactions

    * This method is transactional and will enlist the entry into ongoing transaction * if there is one. - *

    Cache Flags

    - * 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 extends Iterable> { *

    Transactions

    * This method is transactional and will enlist the entry into ongoing transaction * if there is one. - *

    Cache Flags

    - * 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 extends Iterable> { * if there is one. *

    Cache Flags

    * 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 extends Iterable> { * if there is one. *

    Cache Flags

    * 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 extends Iterable> { * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 void putAll(@Nullable Map m, * if there is one. *

    Cache Flags

    * 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 Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat * if there is one. *

    Cache Flags

    * 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 Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat * if there is one. *

    Cache Flags

    * 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 Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat * if there is one. *

    Cache Flags

    * 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 boolean removex(K key, @Nullable CacheEntryPredicate... filter) * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, * if there is one. *

    Cache Flags

    * 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 void removeAll(@Nullable Collection keys, * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removeAllAsync(@Nullable Collection * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removeAllAsync(@Nullable Collection * which will acquire explicit locks for relevant cache operations. *

    Cache Flags

    * 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 boolean lock(K key, long timeout, @Nullable CacheEntryPredicate... filter * which will acquire explicit locks for relevant cache operations. *

    Cache Flags

    * 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 IgniteInternalFuture lockAsync(K key, long timeout, * which will acquire explicit locks for relevant cache operations. *

    Cache Flags

    * 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 boolean lockAll(@Nullable Collection keys, long timeout, * which will acquire explicit locks for relevant cache operations. *

    Cache Flags

    * 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 IgniteInternalFuture lockAllAsync(@Nullable CollectionCache Flags * 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 IgniteInternalFuture lockAllAsync(@Nullable CollectionCache Flags * 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 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 9a5b2a0341481..fad90de38d40b 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 @@ private boolean evictx(K key, GridCacheVersion ver, /** {@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 @@ private boolean evictx(K key, GridCacheVersion ver, /** {@inheritDoc} */ @Override public IgniteInternalFuture 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 IgniteInternalFuture> getAllAsync(@Nullable final Collection primaryValues(@Nullable CacheEntryPredicate... filter) { * @return Read operation future. */ public final IgniteInternalFuture getAsync(final K key, boolean deserializePortable) { - ctx.denyOnFlag(LOCAL); - try { checkJta(); } @@ -5051,8 +5043,6 @@ public final IgniteInternalFuture getAsync(final K key, boolean deserializePo * @throws IgniteCheckedException If read failed. */ public Map getAll(Collection keys, boolean deserializePortable) throws IgniteCheckedException { - ctx.denyOnFlag(LOCAL); - checkJta(); return getAllAsync(keys, deserializePortable).get(); @@ -5064,7 +5054,7 @@ public Map getAll(Collection keys, boolean deserializePortabl * @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 Map getAll(Collection keys, boolean deserializePortabl * @return Reload future. */ @Override public IgniteInternalFuture reloadAsync(final K key) { - ctx.denyOnFlags(F.asList(LOCAL, READ)); + ctx.denyOnFlags(F.asList(READ)); return ctx.closures().callLocalSafe(ctx.projectSafe(new Callable() { @Nullable @Override public V call() throws IgniteCheckedException { 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 de180eed82e43..9d0bff9a771b1 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 implements Externalizable { private ThreadLocal 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 boolean isAll(E e, @Nullable IgnitePredicate[] p) throws I 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); @@ -1189,22 +1186,13 @@ public boolean isAllLocked(GridCacheEntryEx e, CacheEntryPredicate[] p) throws I return true; } - /** - * 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 void denyOnFlag(CacheFlag flag) { * */ public void denyOnLocalRead() { - denyOnFlags(FLAG_LOCAL_READ); + denyOnFlags(FLAG_READ); } /** 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 948f916849b3e..9b765edb18753 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 @@ protected final void releaseSwap() throws IgniteCheckedException { String taskName, @Nullable IgniteCacheExpiryPolicy expirePlc) throws IgniteCheckedException, GridCacheEntryRemovedException { - cctx.denyOnFlag(LOCAL); - return innerGet0(tx, readSwap, readThrough, 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 d8574b71ce33e..8706442fe8bde 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 IgniteInternalFuture removexAsync(K key, @Nullable GridCacheEntr * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, @Nullable GridCacheEntr * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, @Nullable GridCacheEntr * if there is one. *

    Cache Flags

    * 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 IgniteInternalFuture removexAsync(K key, @Nullable GridCacheEntr * if there is one. *

    Cache Flags

    * 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. 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 cdf16384eff16..279cac66477d5 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 GridDistributedCacheEntry entryExx( final boolean deserializePortable, final boolean skipVals ) { - ctx.denyOnFlag(LOCAL); ctx.checkSecurity(GridSecurityPermission.CACHE_READ); if (F.isEmpty(keys)) 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 6e24261f75ffd..4f949a1ada2ae 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 void processDhtAtomicUpdateRequest( boolean deserializePortable, boolean skipVals ) { - ctx.denyOnFlag(LOCAL); ctx.checkSecurity(GridSecurityPermission.CACHE_READ); if (F.isEmpty(keys)) 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 71e173b8f2e02..eb602aa91476d 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 void dht(GridDhtCache dht) { final boolean deserializePortable, final boolean skipVals ) { - ctx.denyOnFlag(LOCAL); ctx.checkSecurity(GridSecurityPermission.CACHE_READ); if (F.isEmpty(keys)) 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 a5d84a22334f3..a33ed9921e91d 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 GridLocalAtomicCache(GridCacheContext ctx) { @SuppressWarnings("unchecked") @Override @Nullable public V get(K key, boolean deserializePortable) throws IgniteCheckedException { - ctx.denyOnFlag(LOCAL); - String taskName = ctx.kernalContext().job().currentTaskName(); Map m = getAllInternal(Collections.singleton(key), @@ -503,8 +501,6 @@ public GridLocalAtomicCache(GridCacheContext ctx) { @SuppressWarnings("unchecked") @Override public final Map getAll(Collection keys, boolean deserializePortable) throws IgniteCheckedException { - ctx.denyOnFlag(LOCAL); - A.notNull(keys, "keys"); String taskName = ctx.kernalContext().job().currentTaskName(); @@ -531,8 +527,6 @@ public GridLocalAtomicCache(GridCacheContext ctx) { final boolean deserializePortable, final boolean skipVals ) { - ctx.denyOnFlag(LOCAL); - A.notNull(keys, "keys"); final boolean swapOrOffheap = ctx.isSwapOrOffheapEnabled(); 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 dab46716f555d..e9e6de78c7aad 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.