#ignite-629: remove CacheFlag SKIP_STORE.

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

Branch: refs/heads/gg-9998
Commit: aa3864dd0ede52d643f5bfb7f3f060c72b97d3d7
Parents: 5d5e8a3
Author: ivasilinets <vasilinetc....@gmail.com>
Authored: Mon Mar 30 00:52:47 2015 +0300
Committer: ivasilinets <vasilinetc....@gmail.com>
Committed: Mon Mar 30 00:52:47 2015 +0300

----------------------------------------------------------------------
 .../client/impl/ClientCacheFlagsCodecTest.java  | 17 ++--
 .../internal/processors/cache/CacheFlag.java    | 50 ------------
 .../processors/cache/CacheFlagException.java    | 67 ----------------
 .../processors/cache/CacheProjection.java       | 64 ++--------------
 .../processors/cache/GridCacheAdapter.java      | 46 +++++------
 .../processors/cache/GridCacheContext.java      | 18 ++---
 .../processors/cache/GridCacheMapEntry.java     |  1 -
 .../processors/cache/GridCacheProjectionEx.java |  8 --
 .../cache/GridCacheProjectionImpl.java          | 81 ++++++--------------
 .../processors/cache/GridCacheProxyImpl.java    | 41 +++++-----
 .../cache/GridCacheSharedContext.java           | 15 ----
 .../processors/cache/IgniteCacheProxy.java      | 26 ++-----
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  1 -
 .../dht/colocated/GridDhtColocatedCache.java    |  1 -
 .../distributed/near/GridNearAtomicCache.java   |  1 -
 .../distributed/near/GridNearCacheAdapter.java  |  1 -
 .../near/GridNearTransactionalCache.java        |  1 -
 .../local/atomic/GridLocalAtomicCache.java      |  1 -
 .../handlers/cache/GridCacheCommandHandler.java | 56 +++++++-------
 .../GridCacheReturnValueTransferSelfTest.java   |  1 -
 .../cache/IgniteCacheInvokeAbstractTest.java    |  1 -
 ...GridCacheValueConsistencyAtomicSelfTest.java |  1 -
 .../OptimizedObjectStreamSelfTest.java          |  4 -
 .../ignite/scalar/pimps/ScalarCachePimp.scala   | 36 ---------
 24 files changed, 115 insertions(+), 424 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java
----------------------------------------------------------------------
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java
index 1117cd6..973a0a3 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.client.impl;
 import junit.framework.*;
 import org.apache.ignite.internal.client.*;
 import org.apache.ignite.internal.client.impl.connection.*;
-import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.rest.handlers.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
 
@@ -29,7 +28,7 @@ import java.util.*;
 import static org.apache.ignite.internal.client.GridClientCacheFlag.*;
 
 /**
- * Tests conversions between GridClientCacheFlag and CacheFlag.
+ * Tests conversions between GridClientCacheFlag.
  */
 public class ClientCacheFlagsCodecTest extends TestCase {
     /**
@@ -44,10 +43,8 @@ public class ClientCacheFlagsCodecTest extends TestCase {
 
             assertTrue(bits != 0);
 
-            CacheFlag[] out = GridCacheCommandHandler.parseCacheFlags(bits);
-            assertEquals(1, out.length);
-
-            assertEquals(f.name(), out[0].name());
+            boolean out = GridCacheCommandHandler.parseCacheFlags(bits);
+            assertEquals(out, true);
         }
     }
 
@@ -70,12 +67,10 @@ public class ClientCacheFlagsCodecTest extends TestCase {
 
         int bits = GridClientConnection.encodeCacheFlags(flagSet);
 
-        CacheFlag[] out = GridCacheCommandHandler.parseCacheFlags(bits);
+        boolean out = GridCacheCommandHandler.parseCacheFlags(bits);
 
-        assertEquals(flagSet.contains(KEEP_PORTABLES) ? flagSet.size() - 1 : 
flagSet.size(), out.length);
+        int length = flagSet.contains(KEEP_PORTABLES) ? flagSet.size() - 1 : 
flagSet.size();
 
-        for (CacheFlag f : out) {
-            
assertTrue(flagSet.contains(GridClientCacheFlag.valueOf(f.name())));
-        }
+        assertEquals(length > 0, out);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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
deleted file mode 100644
index f403a53..0000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.*;
-import org.apache.ignite.transactions.*;
-import org.jetbrains.annotations.*;
-
-import javax.cache.processor.*;
-
-/**
- * Cache projection flags that specify projection behaviour. This flags can be 
explicitly passed into
- * the following methods on {@link CacheProjection}:
- * <ul>
- * <li>{@link CacheProjection#flagsOn(CacheFlag...)}</li>
- * <li>{@link CacheProjection#flagsOff(CacheFlag...)}</li>
- * </ul>
- */
-public enum CacheFlag {
-    /** Skips store, i.e. no read-through and no write-through behavior. */
-    SKIP_STORE;
-
-    /** */
-    private static final CacheFlag[] VALS = values();
-
-    /**
-     * Efficiently gets enumerated value from its ordinal.
-     *
-     * @param ord Ordinal value.
-     * @return Enumerated value or {@code null} if ordinal out of range.
-     */
-    @Nullable public static CacheFlag fromOrdinal(int ord) {
-        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlagException.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlagException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlagException.java
deleted file mode 100644
index feac108..0000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlagException.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Exception thrown when projection flags check fails.
- */
-public class CacheFlagException extends IgniteException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Flags that caused this exception. */
-    private Collection<CacheFlag> flags;
-
-    /**
-     * @param flags Cause flags.
-     */
-    public CacheFlagException(@Nullable CacheFlag... flags) {
-        this(F.asList(flags));
-    }
-
-    /**
-     * @param flags Cause flags.
-     */
-    public CacheFlagException(@Nullable Collection<CacheFlag> flags) {
-        super(message(flags));
-
-        this.flags = flags;
-    }
-
-    /**
-     * @return Cause flags.
-     */
-    public Collection<CacheFlag> flags() {
-        return flags;
-    }
-
-    /**
-     * @param flags Flags.
-     * @return String information about cause flags.
-     */
-    private static String message(Collection<CacheFlag> flags) {
-        return "Cache projection flag violation (if flag is LOCAL, make sure 
to use peek(..) " +
-            "instead of get(..) methods)" + (F.isEmpty(flags) ? "." : " 
[flags=" + flags + ']');
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 9fd1285..fb51620 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
@@ -205,11 +205,9 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public <K1, V1> GridCache<K1, V1> cache();
 
     /**
-     * Gets cache flags enabled on this projection.
-     *
-     * @return Flags for this projection (empty set if no flags have been set).
+     * @return Skip store.
      */
-    public Set<CacheFlag> flags();
+    public boolean skipStore();
 
     /**
      * Returns queries facade responsible for creating various SQL, TEXT, or 
SCAN queries.
@@ -243,25 +241,10 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public CacheProjection<K, V> projection(@Nullable CacheEntryPredicate 
filter);
 
     /**
-     * Gets cache projection base on this one, but with the specified flags 
turned on.
-     * <h1 class="header">Cache Flags</h1>
-     * The resulting projection will inherit all the flags from this 
projection.
-     *
-     * @param flags Flags to turn on (if empty, then no-op).
-     * @return New projection based on this one, but with the specified flags 
turned on.
-     */
-    public CacheProjection<K, V> flagsOn(@Nullable CacheFlag... flags);
-
-    /**
-     * Gets cache projection base on this but with the specified flags turned 
off.
-     * <h1 class="header">Cache Flags</h1>
-     * The resulting projection will inherit all the flags from this 
projection except for
-     * the ones that were turned off.
-     *
-     * @param flags Flags to turn off (if empty, then all flags will be turned 
off).
-     * @return New projection based on this one, but with the specified flags 
turned off.
+     * @param skipStore Skip store.
+     * @retur New projection based on this one, but with skip store.
      */
-    public CacheProjection<K, V> flagsOff(@Nullable CacheFlag... flags);
+    public CacheProjection<K, V> setSkipStore(boolean skipStore);
 
     /**
      * Creates projection that will operate with portable objects.
@@ -447,7 +430,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param key Key to retrieve the value for.
      * @return Value for the given key.
      * @throws IgniteCheckedException If get operation failed.
-     * @throws CacheFlagException If failed projection flags validation.
      * @throws NullPointerException if the key is {@code null}.
      */
     @Nullable public V get(K key) throws IgniteCheckedException;
@@ -470,7 +452,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param key Key for the value to get.
      * @return Future for the get operation.
      * @throws NullPointerException if the key is {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<V> getAsync(K key);
 
@@ -492,7 +473,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param keys Keys to get.
      * @return Map of key-value pairs.
      * @throws IgniteCheckedException If get operation failed.
-     * @throws CacheFlagException If failed projection flags validation.
      */
     public Map<K, V> getAll(@Nullable Collection<? extends K> keys) throws 
IgniteCheckedException;
 
@@ -513,7 +493,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *
      * @param keys Key for the value to get.
      * @return Future for the get operation.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? 
extends K> keys);
 
@@ -546,7 +525,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *  or in persistent storage.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     @Nullable public V put(K key, V val, @Nullable CacheEntryPredicate... 
filter)
         throws IgniteCheckedException;
@@ -579,7 +557,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      that filter check is atomic with put operation.
      * @return Future for the put operation.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable 
CacheEntryPredicate... filter);
 
@@ -608,7 +585,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      specified.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
         throws IgniteCheckedException;
@@ -637,7 +613,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      passed and value was stored in cache, {@code false} otherwise. 
Note that future will
      *      return {@code true} if filter is not specified.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable 
CacheEntryPredicate... filter);
 
@@ -665,7 +640,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Previously contained value regardless of whether put happened 
or not.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     @Nullable public V putIfAbsent(K key, V val) throws IgniteCheckedException;
 
@@ -693,7 +667,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Future of put operation which will provide previously contained 
value
      *   regardless of whether put happened or not.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val);
 
@@ -716,7 +689,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return {@code true} if value is stored in cache and {@code false} 
otherwise.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean putxIfAbsent(K key, V val) throws IgniteCheckedException;
 
@@ -738,7 +710,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param val Value to be associated with the given key.
      * @return Future for this put operation.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val);
 
@@ -765,7 +736,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Previously contained value regardless of whether replace 
happened or not.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If replace operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     @Nullable public V replace(K key, V val) throws IgniteCheckedException;
 
@@ -791,7 +761,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param val Value to be associated with the given key.
      * @return Future for replace operation.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<V> replaceAsync(K key, V val);
 
@@ -814,7 +783,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return {@code True} if replace happened, {@code false} otherwise.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If replace operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean replacex(K key, V val) throws IgniteCheckedException;
 
@@ -836,7 +804,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param val Value to be associated with the given key.
      * @return Future for the replace operation.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> replacexAsync(K key, V val);
 
@@ -858,7 +825,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return {@code True} if replace happened, {@code false} otherwise.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If replace operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean replace(K key, V oldVal, V newVal) throws 
IgniteCheckedException;
 
@@ -879,7 +845,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param newVal Value to be associated with the given key.
      * @return Future for the replace operation.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V 
newVal);
 
@@ -898,7 +863,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param filter Optional entry filter. If provided, then entry will
      *      be stored only if the filter returned {@code true}.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public void putAll(@Nullable Map<? extends K, ? extends V> m,
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
@@ -918,7 +882,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param filter Optional entry filter. If provided, then entry will
      *      be stored only if the filter returned {@code true}.
      * @return Future for putAll operation.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? 
extends V> m,
         @Nullable CacheEntryPredicate... filter);
@@ -1287,7 +1250,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      if there was no value for this key.
      * @throws NullPointerException If key is {@code null}.
      * @throws IgniteCheckedException If remove operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     @Nullable public V remove(K key, @Nullable CacheEntryPredicate... filter)
         throws IgniteCheckedException;
@@ -1315,7 +1277,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      that filter is checked atomically together with remove operation.
      * @return Future for the remove operation.
      * @throws NullPointerException if the key is {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate... 
filter);
 
@@ -1338,7 +1299,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      Note that if filter is not specified, this method will return 
{@code true}.
      * @throws NullPointerException if the key is {@code null}.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean removex(K key, @Nullable CacheEntryPredicate... filter)
         throws IgniteCheckedException;
@@ -1362,7 +1322,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      if optional filters passed validation and remove did occur, {@code 
false} otherwise.
      *      Note that if filter is not specified, this method will return 
{@code true}.
      * @throws NullPointerException if the key is {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> removexAsync(K key,
         @Nullable CacheEntryPredicate... filter);
@@ -1382,7 +1341,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      {@code false} otherwise.
      * @throws NullPointerException if the key or value is {@code null}.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public boolean remove(K key, V val) throws IgniteCheckedException;
 
@@ -1403,7 +1361,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Future for the remove operation. The future will return {@code 
true}
      *      if currently cached value will match the passed in one.
      * @throws NullPointerException if the key or value is {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<Boolean> removeAsync(K key, V val);
 
@@ -1421,7 +1378,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param filter Optional filter to check prior to removing value form 
cache. Note
      *      that filter is checked atomically together with remove operation.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If flags validation failed.
      */
     public void removeAll(@Nullable Collection<? extends K> keys,
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
@@ -1441,7 +1397,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *      that filter is checked atomically together with remove operation.
      * @return Future for the remove operation. The future will complete 
whenever
      *      remove operation completes.
-     * @throws CacheFlagException If flags validation failed.
      */
     public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? 
extends K> keys,
         @Nullable CacheEntryPredicate... filter);
@@ -1463,7 +1418,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * if there is one.
      *
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If flags validation failed.
      */
     public void removeAll() throws IgniteCheckedException;
 
@@ -1495,7 +1449,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return {@code True} if all filters passed and lock was acquired,
      *      {@code false} otherwise.
      * @throws IgniteCheckedException If lock acquisition resulted in error.
-     * @throws CacheFlagException If flags validation failed.
      */
     public boolean lock(K key, long timeout, @Nullable CacheEntryPredicate... 
filter)
         throws IgniteCheckedException;
@@ -1518,7 +1471,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Future for the lock operation. The future will return {@code 
true}
      *      whenever all filters pass and locks are acquired before timeout is 
expired,
      *      {@code false} otherwise.
-     * @throws CacheFlagException If flags validation failed.
      */
     public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout,
         @Nullable CacheEntryPredicate... filter);
@@ -1541,7 +1493,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return {@code True} if all filters passed and locks were acquired 
before
      *      timeout has expired, {@code false} otherwise.
      * @throws IgniteCheckedException If lock acquisition resulted in error.
-     * @throws CacheFlagException If flags validation failed.
      */
     public boolean lockAll(@Nullable Collection<? extends K> keys, long 
timeout,
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
@@ -1564,7 +1515,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @return Future for the collection of locks. The future will return
      *      {@code true} if all filters passed and locks were acquired before
      *      timeout has expired, {@code false} otherwise.
-     * @throws CacheFlagException If flags validation failed.
      */
     public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? 
extends K> keys, long timeout,
         @Nullable CacheEntryPredicate... filter);
@@ -1582,7 +1532,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param key Key to unlock.
      * @param filter Optional filter that needs to pass prior to unlock taking 
effect.
      * @throws IgniteCheckedException If unlock execution resulted in error.
-     * @throws CacheFlagException If flags validation failed.
      */
     public void unlock(K key, CacheEntryPredicate... filter) throws 
IgniteCheckedException;
 
@@ -1601,7 +1550,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param filter Optional filter which needs to pass for individual entries
      *      to be unlocked.
      * @throws IgniteCheckedException If unlock execution resulted in error.
-     * @throws CacheFlagException If flags validation failed.
      */
     public void unlockAll(@Nullable Collection<? extends K> keys,
         @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
@@ -1710,7 +1658,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * @param key Key to promote entry for.
      * @return Unswapped entry value or {@code null} for non-existing key.
      * @throws IgniteCheckedException If promote failed.
-     * @throws CacheFlagException If flags validation failed.
      */
     @Nullable public V promote(K key) throws IgniteCheckedException;
 
@@ -1722,7 +1669,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      *
      * @param keys Keys to promote entries for.
      * @throws IgniteCheckedException If promote failed.
-     * @throws CacheFlagException If flags validation failed.
      */
     public void promoteAll(@Nullable Collection<? extends K> keys) throws 
IgniteCheckedException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 177b9b2..864d6b2 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
@@ -63,7 +63,6 @@ import static java.util.Collections.*;
 import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.events.EventType.*;
 import static org.apache.ignite.internal.GridClosureCallMode.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*;
 import static org.apache.ignite.internal.processors.dr.GridDrType.*;
 import static 
org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.*;
@@ -380,11 +379,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public Set<CacheFlag> flags() {
-        return new HashSet<>();
-    }
-
-    /** {@inheritDoc} */
     @Override public CacheEntryPredicate predicate() {
         return null;
     }
@@ -394,7 +388,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
             ctx,
             null,
-            null,
+            false,
             subjId,
             false,
             null);
@@ -403,27 +397,27 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOn(@Nullable CacheFlag[] 
flags) {
-        if (F.isEmpty(flags))
+    @Override public boolean skipStore() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public CacheProjection<K, V> setSkipStore(boolean skipStore) {
+        if (!skipStore)
             return this;
 
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-            ctx,
-            null,
-            EnumSet.copyOf(F.asList(flags)),
-            null,
-            false,
-            null);
+                ctx,
+                null,
+                skipStore,
+                null,
+                false,
+                null);
 
         return new GridCacheProxyImpl<>(ctx, prj, prj);
     }
 
     /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOff(@Nullable CacheFlag[] 
flags) {
-        return this;
-    }
-
-    /** {@inheritDoc} */
     @Override public <K1, V1> CacheProjection<K1, V1> keepPortable() {
         GridCacheProjectionImpl<K1, V1> prj = keepPortable0();
 
@@ -440,7 +434,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
             (CacheProjection<K1, V1>)this,
             (GridCacheContext<K1, V1>)ctx,
             null,
-            null,
+            false,
             null,
             true,
             null
@@ -458,7 +452,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
             this,
             ctx,
             null,
-            null,
+            false,
             null,
             false,
             plc);
@@ -482,7 +476,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         GridCacheProjectionImpl<K1, V1> prj = new 
GridCacheProjectionImpl<>((CacheProjection<K1, V1>)this,
             (GridCacheContext<K1, V1>)ctx,
             CU.typeFilter0(keyType, valType),
-            /*flags*/null,
+            false,
             /*clientId*/null,
             false,
             null);
@@ -508,7 +502,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
             this,
             ctx,
             filter,
-            null,
+            false,
             null,
             false,
             null);
@@ -4442,7 +4436,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
                 OPTIMISTIC,
                 READ_COMMITTED,
                 tCfg.getDefaultTxTimeout(),
-                !ctx.hasFlag(SKIP_STORE),
+                !skipStore(),
                 0,
                 /** group lock keys */null,
                 /** partition lock */false
@@ -4513,7 +4507,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
                 OPTIMISTIC,
                 READ_COMMITTED,
                 
ctx.kernalContext().config().getTransactionConfiguration().getDefaultTxTimeout(),
-                !ctx.hasFlag(SKIP_STORE),
+                !ctx.skipStore(),
                 0,
                 null,
                 false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 5e07337..4f1267d 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
@@ -67,7 +67,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheRebalanceMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 import static org.apache.ignite.internal.managers.communication.GridIoPolicy.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 
 /**
  * Cache context.
@@ -1238,22 +1237,19 @@ public class GridCacheContext<K, V> implements 
Externalizable {
     }
 
     /**
-     *
-     * @param flag Flag to check.
-     * @return {@code true} if the given flag is set.
+     * @return {@code true} if the skip store is set.
      */
-    public boolean hasFlag(CacheFlag flag) {
-        assert flag != null;
-
+    public boolean skipStore() {
         if (nearContext())
-            return dht().near().context().hasFlag(flag);
+            return dht().near().context().skipStore();
 
         GridCacheProjectionImpl<K, V> prj = prjPerCall.get();
 
-        return (prj != null && prj.flags().contains(flag));
+        return (prj != null && prj.skipStore());
     }
 
 
+
     /**
      * @return {@code True} if need check near cache context.
      */
@@ -1356,7 +1352,7 @@ public class GridCacheContext<K, V> implements 
Externalizable {
      * @return {@code True} if store read-through mode is enabled.
      */
     public boolean readThrough() {
-        return cacheCfg.isReadThrough() && !hasFlag(SKIP_STORE);
+        return cacheCfg.isReadThrough() && !skipStore();
     }
 
     /**
@@ -1370,7 +1366,7 @@ public class GridCacheContext<K, V> implements 
Externalizable {
      * @return {@code True} if store write-through is enabled.
      */
     public boolean writeThrough() {
-        return cacheCfg.isWriteThrough() && !hasFlag(SKIP_STORE);
+        return cacheCfg.isWriteThrough() && !skipStore();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 d32eb21..6e2dcbd 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
@@ -46,7 +46,6 @@ import java.util.*;
 import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.events.EventType.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.dr.GridDrType.*;
 import static org.apache.ignite.transactions.TransactionState.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 b435d88..30ba66e 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
@@ -110,7 +110,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      *
      * @param drMap DR map.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public void putAllConflict(Map<KeyCacheObject, GridCacheDrInfo> drMap) 
throws IgniteCheckedException;
 
@@ -120,7 +119,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @param drMap DR map.
      * @return Future.
      * @throws IgniteCheckedException If put operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject, 
GridCacheDrInfo> drMap)
         throws IgniteCheckedException;
@@ -153,7 +151,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      *
      * @param drMap DR map.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public void removeAllConflict(Map<KeyCacheObject, GridCacheVersion> drMap) 
throws IgniteCheckedException;
 
@@ -163,7 +160,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @param drMap DR map.
      * @return Future.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject, 
GridCacheVersion> drMap) throws IgniteCheckedException;
 
@@ -208,7 +204,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @return Future for the replace operation. The future will return object 
containing actual old value and success
      *      flag.
      * @throws NullPointerException If either key or value are {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V 
oldVal, V newVal);
 
@@ -230,7 +225,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @return Object containing actual old value and success flag.
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If replace operation failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public GridCacheReturn replacex(K key, V oldVal, V newVal) throws 
IgniteCheckedException;
 
@@ -248,7 +242,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @return Object containing actual old value and success flag.
      * @throws NullPointerException if the key or value is {@code null}.
      * @throws IgniteCheckedException If remove failed.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public GridCacheReturn removex(K key, V val) throws IgniteCheckedException;
 
@@ -269,7 +262,6 @@ public interface GridCacheProjectionEx<K, V> extends 
CacheProjection<K, V> {
      * @return Future for the remove operation. The future will return object 
containing actual old value and success
      *      flag.
      * @throws NullPointerException if the key or value is {@code null}.
-     * @throws CacheFlagException If projection flags validation failed.
      */
     public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 051c532..b3367ca 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -65,9 +65,9 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     /** Queries impl. */
     private CacheQueries<K, V> qry;
 
-    /** Flags. */
+    /** Skip store. */
     @GridToStringInclude
-    private Set<CacheFlag> flags;
+    private boolean skipStore;
 
     /** Client ID which operates over this projection, if any, */
     private UUID subjId;
@@ -89,30 +89,23 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
      * @param parent Parent projection.
      * @param cctx Cache context.
      * @param entryFilter Entry filter.
-     * @param flags Flags for new projection
+     * @param skipStore Skip store.
      */
     @SuppressWarnings({"unchecked", "TypeMayBeWeakened"})
     public GridCacheProjectionImpl(
         CacheProjection<K, V> parent,
         GridCacheContext<K, V> cctx,
         @Nullable CacheEntryPredicate entryFilter,
-        @Nullable Set<CacheFlag> flags,
+        boolean skipStore,
         @Nullable UUID subjId,
         boolean keepPortable,
         @Nullable ExpiryPolicy expiryPlc) {
         assert parent != null;
         assert cctx != null;
 
-        // Check if projection flags are conflicting with an ongoing 
transaction, if any.
-        cctx.shared().checkTxFlags(flags);
-
         this.cctx = cctx;
 
-        this.flags = !F.isEmpty(flags) ? EnumSet.copyOf(flags) : 
EnumSet.noneOf(CacheFlag.class);
-
-        Set<CacheFlag> f = this.flags;
-
-        this.flags = Collections.unmodifiableSet(f);
+        this.skipStore = skipStore;
 
         this.filter = entryFilter;
 
@@ -261,7 +254,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
             cctx,
             filter,
-            flags,
+            skipStore,
             subjId,
             keepPortable,
             expiryPlc);
@@ -299,7 +292,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
             (CacheProjection<K1, V1>)this,
             (GridCacheContext<K1, V1>)cctx,
             CU.typeFilter0(keyType, valType),
-            flags,
+            skipStore,
             subjId,
             keepPortable,
             expiryPlc);
@@ -328,7 +321,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
             cctx,
             filter,
-            flags,
+            skipStore,
             subjId,
             keepPortable,
             expiryPlc);
@@ -338,47 +331,17 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
 
 
     /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOn(@Nullable CacheFlag[] 
flags) {
-        if (F.isEmpty(flags))
+    @Override public CacheProjection<K, V> setSkipStore(boolean skipStore) {
+        if (this.skipStore == skipStore)
             return new GridCacheProxyImpl<>(cctx, this, this);
 
-        Set<CacheFlag> res = EnumSet.noneOf(CacheFlag.class);
-
-        if (!F.isEmpty(this.flags))
-            res.addAll(this.flags);
-
-        res.addAll(EnumSet.copyOf(F.asList(flags)));
-
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-            cctx,
-            filter,
-            res,
-            subjId,
-            keepPortable,
-            expiryPlc);
-
-        return new GridCacheProxyImpl<>(cctx, prj, prj);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOff(@Nullable CacheFlag[] 
flags) {
-        if (F.isEmpty(flags))
-            return new GridCacheProxyImpl<>(cctx, this, this);
-
-        Set<CacheFlag> res = EnumSet.noneOf(CacheFlag.class);
-
-        if (!F.isEmpty(this.flags))
-            res.addAll(this.flags);
-
-        res.removeAll(EnumSet.copyOf(F.asList(flags)));
-
-        GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-            cctx,
-            filter,
-            res,
-            subjId,
-            keepPortable,
-            expiryPlc);
+                cctx,
+                filter,
+                skipStore,
+                subjId,
+                keepPortable,
+                expiryPlc);
 
         return new GridCacheProxyImpl<>(cctx, prj, prj);
     }
@@ -389,7 +352,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
             (CacheProjection<K1, V1>)this,
             (GridCacheContext<K1, V1>)cctx,
             filter,
-            flags,
+            skipStore,
             subjId,
             true,
             expiryPlc);
@@ -782,8 +745,8 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public Set<CacheFlag> flags() {
-        return flags;
+    @Override public boolean skipStore() {
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -1147,7 +1110,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
             this,
             cctx,
             filter,
-            flags,
+            skipStore,
             subjId,
             true,
             plc);
@@ -1159,7 +1122,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
 
         out.writeObject(filter);
 
-        U.writeCollection(out, flags);
+        out.writeBoolean(skipStore);
 
         out.writeBoolean(keepPortable);
     }
@@ -1171,7 +1134,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
 
         filter = (CacheEntryPredicate)in.readObject();
 
-        flags = U.readSet(in);
+        skipStore = in.readBoolean();
 
         cache = cctx.cache();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 1c25ef0..bd2aa31 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -138,6 +138,18 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
+    @Override public boolean skipStore() {
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            return delegate.skipStore();
+        }
+        finally {
+            gate.leave(prev);
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public CacheQueries<K, V> queries() {
         return qry;
     }
@@ -278,20 +290,7 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
 
         try {
             return cache.toMap();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public Set<CacheFlag> flags() {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.flags();
-        }
-        finally {
+        } finally {
             gate.leave(prev);
         }
     }
@@ -321,13 +320,15 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOn(@Nullable CacheFlag[] 
flags) {
-        return delegate.flagsOn(flags);
-    }
+    @Override public CacheProjection<K, V> setSkipStore(boolean skipStore) {
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
-    /** {@inheritDoc} */
-    @Override public CacheProjection<K, V> flagsOff(@Nullable CacheFlag[] 
flags) {
-        return delegate.flagsOff(flags);
+        try {
+            return delegate.setSkipStore(skipStore);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 449dc63..af38faf 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -38,8 +38,6 @@ import org.jetbrains.annotations.*;
 import java.util.*;
 import java.util.concurrent.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
-
 /**
  * Shared context.
  */
@@ -453,19 +451,6 @@ public class GridCacheSharedContext<K, V> {
     }
 
     /**
-     * @param flags Flags to turn on.
-     * @throws CacheFlagException If given flags are conflicting with given 
transaction.
-     */
-    public void checkTxFlags(@Nullable Collection<CacheFlag> flags) throws 
CacheFlagException {
-        IgniteInternalTx tx = tm().userTxx();
-
-        if (tx == null || F.isEmpty(flags))
-            return;
-
-        assert flags != null;
-    }
-
-    /**
      * Nulling references to potentially leak-prone objects.
      */
     public void cleanup() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 2e1deaa..2196fba 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -189,7 +189,7 @@ public class IgniteCacheProxy<K, V> extends 
AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withSkipStore() {
-        return flagOn(CacheFlag.SKIP_STORE);
+        return skipStore();
     }
 
     /** {@inheritDoc} */
@@ -1385,7 +1385,7 @@ public class IgniteCacheProxy<K, V> extends 
AsyncSupportAdapter<IgniteCache<K, V
                 (CacheProjection<K1, V1>)(prj != null ? prj : delegate),
                 (GridCacheContext<K1, V1>)ctx,
                 null,
-                prj != null ? prj.flags() : null,
+                prj != null ? prj.skipStore() : false,
                 prj != null ? prj.subjectId() : null,
                 true,
                 prj != null ? prj.expiry() : null);
@@ -1401,33 +1401,23 @@ public class IgniteCacheProxy<K, V> extends 
AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * @param flag Flag to turn on.
-     * @return Cache with given flags enabled.
+     * @return Cache with skip store enabled.
      */
-    public IgniteCache<K, V> flagOn(CacheFlag flag) {
+    public IgniteCache<K, V> skipStore() {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            Set<CacheFlag> res;
 
-            Set<CacheFlag> flags0 = prj != null ? prj.flags() : null;
+            boolean skip = prj != null ? prj.skipStore() : false;
 
-            if (flags0 != null) {
-                if (flags0.contains(flag))
-                    return this;
-
-                res = EnumSet.copyOf(flags0);
-            }
-            else
-                res = EnumSet.noneOf(CacheFlag.class);
-
-            res.add(flag);
+            if (skip)
+                return this;
 
             GridCacheProjectionImpl<K, V> prj0 = new GridCacheProjectionImpl<>(
                 (prj != null ? prj : delegate),
                 ctx,
                 null,
-                res,
+                skip,
                 prj != null ? prj.subjectId() : null,
                 true,
                 prj != null ? prj.expiry() : null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 50051fe..ac4ae2c2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -44,7 +44,6 @@ import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 279cac6..eb6d9a6 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
@@ -39,7 +39,6 @@ import javax.cache.*;
 import java.io.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 4f949a1..e677403 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
@@ -39,7 +39,6 @@ import java.io.*;
 import java.util.*;
 
 import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
 import static org.apache.ignite.internal.processors.dr.GridDrType.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 c986926..75c8978 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
@@ -38,7 +38,6 @@ import javax.cache.expiry.*;
 import java.io.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 eb602aa..5f982e6 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
@@ -37,7 +37,6 @@ import org.jetbrains.annotations.*;
 import java.io.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.transactions.TransactionConcurrency.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 626bd99..80ef55c 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
@@ -40,7 +40,6 @@ import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index 0724605..549662e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -81,9 +81,6 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
         CACHE_PREPEND
     );
 
-    /** */
-    private static final CacheFlag[] EMPTY_FLAGS = new CacheFlag[0];
-
     /**
      * @param ctx Context.
      */
@@ -102,16 +99,14 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
      * @param cacheFlagsBits Integer representation of cache flags bit set.
      * @return Array of cache flags.
      */
-    public static CacheFlag[] parseCacheFlags(int cacheFlagsBits) {
+    public static boolean parseCacheFlags(int cacheFlagsBits) {
         if (cacheFlagsBits == 0)
-            return EMPTY_FLAGS;
-
-        EnumSet<CacheFlag> flagSet = EnumSet.noneOf(CacheFlag.class);
+            return false;
 
         if ((cacheFlagsBits & 1) != 0)
-            flagSet.add(CacheFlag.SKIP_STORE);
+            return true;
 
-        return flagSet.toArray(new CacheFlag[flagSet.size()]);
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -129,7 +124,8 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
 
         final Object key = req0.key();
 
-        final CacheFlag[] flags = parseCacheFlags(req0.cacheFlags());
+        final boolean skip= parseCacheFlags(req0.cacheFlags());
+
 
         try {
             GridRestCommand cmd = req0.command();
@@ -143,7 +139,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
 
             switch (cmd) {
                 case CACHE_GET: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new GetCommand(key));
 
                     break;
@@ -165,7 +161,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                         keys0.add(getKey);
                     }
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new GetAllCommand(keys0));
 
                     break;
@@ -177,7 +173,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     if (val == null)
                         throw new 
IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key, new
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key, new
                         PutCommand(key, ttl, val));
 
                     break;
@@ -189,7 +185,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     if (val == null)
                         throw new 
IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new AddCommand(key, ttl, val));
 
                     break;
@@ -212,14 +208,14 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     // HashMap wrapping for correct serialization
                     map = new HashMap<>(map);
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new PutAllCommand(map));
 
                     break;
                 }
 
                 case CACHE_REMOVE: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new RemoveCommand(key));
 
                     break;
@@ -231,7 +227,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     // HashSet wrapping for correct serialization
                     Set<Object> keys = map == null ? null : new 
HashSet<>(map.keySet());
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new RemoveAllCommand(keys));
 
                     break;
@@ -243,7 +239,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     if (val == null)
                         throw new 
IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new ReplaceCommand(key, ttl, val));
 
                     break;
@@ -253,21 +249,21 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                     final Object val1 = req0.value();
                     final Object val2 = req0.value2();
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new CasCommand(val2, val1, key));
 
                     break;
                 }
 
                 case CACHE_APPEND: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new AppendCommand(key, req0));
 
                     break;
                 }
 
                 case CACHE_PREPEND: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, skip, key,
                         new PrependCommand(key, req0));
 
                     break;
@@ -309,7 +305,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
      *      If {@code null} - operation could be executed anywhere.
      * @param clientId Client ID.
      * @param cacheName Cache name.
-     * @param flags Cache flags.
+     * @param skipStore Skip store.
      * @param key Key to set affinity mapping in the response.
      * @param op Operation to perform.
      * @return Operation result in future.
@@ -319,7 +315,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
         @Nullable UUID destId,
         UUID clientId,
         final String cacheName,
-        final CacheFlag[] flags,
+        final boolean skipStore,
         final Object key,
         final CacheProjectionCommand op) throws IgniteCheckedException {
 
@@ -327,7 +323,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
             destId == null || destId.equals(ctx.localNodeId()) || 
replicatedCacheAvailable(cacheName);
 
         if (locExec) {
-            CacheProjection<?,?> prj = 
localCache(cacheName).forSubjectId(clientId).flagsOn(flags);
+            CacheProjection<?,?> prj = 
localCache(cacheName).forSubjectId(clientId).setSkipStore(skipStore);
 
             return op.apply((CacheProjection<Object, Object>)prj, ctx).
                 chain(resultWrapper((CacheProjection<Object, Object>)prj, 
key));
@@ -338,7 +334,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
             ctx.task().setThreadContext(TC_NO_FAILOVER, true);
 
             return ctx.closure().callAsync(BALANCE,
-                new FlaggedCacheOperationCallable(clientId, cacheName, flags, 
op, key),
+                new FlaggedCacheOperationCallable(clientId, cacheName, 
skipStore, op, key),
                 prj.nodes());
         }
     }
@@ -615,7 +611,7 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
         private final String cacheName;
 
         /** */
-        private final CacheFlag[] flags;
+        private final boolean skipStore;
 
         /** */
         private final CacheProjectionCommand op;
@@ -630,25 +626,25 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
         /**
          * @param clientId Client ID.
          * @param cacheName Cache name.
-         * @param flags Flags.
+         * @param skipStore Skip store.
          * @param op Operation.
          * @param key Key.
          */
         private FlaggedCacheOperationCallable(UUID clientId,
             String cacheName,
-            CacheFlag[] flags,
+            boolean skipStore,
             CacheProjectionCommand op,
             Object key) {
             this.clientId = clientId;
             this.cacheName = cacheName;
-            this.flags = flags;
+            this.skipStore = skipStore;
             this.op = op;
             this.key = key;
         }
 
         /** {@inheritDoc} */
         @Override public GridRestResponse call() throws Exception {
-            CacheProjection<?, ?> prj = cache(g, 
cacheName).forSubjectId(clientId).flagsOn(flags);
+            CacheProjection<?, ?> prj = cache(g, 
cacheName).forSubjectId(clientId).setSkipStore(skipStore);
 
             // Need to apply both operation and response transformation 
remotely
             // as cache could be inaccessible on local node and

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
index 9771376..5b3e19d 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
@@ -30,7 +30,6 @@ import java.util.*;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 
 /**
  * Tests transform for extra traffic.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index b5af288..6cbb287 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -32,7 +32,6 @@ import java.util.concurrent.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.transactions.TransactionConcurrency.*;
 import static org.apache.ignite.transactions.TransactionIsolation.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
index a77e78c..4166369 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
@@ -29,7 +29,6 @@ import java.io.*;
 import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 
 /**
  * Tests cache value consistency for ATOMIC mode.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 dbed25e..3988357 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
@@ -1006,10 +1006,6 @@ public class OptimizedObjectStreamSelfTest extends 
GridCommonAbstractTest {
         Throwable t = new Throwable("Throwable");
 
         assertEquals(t.getMessage(), 
((Throwable)marshalUnmarshal(t)).getMessage());
-
-        CacheFlagException flagEx = new 
CacheFlagException(CacheFlag.SKIP_STORE);
-
-        assertEquals(flagEx.flags(), 
((CacheFlagException)marshalUnmarshal(flagEx)).flags());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa3864dd/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 e9e6de7..95916dd 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
@@ -213,10 +213,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param kv Key-Value pair to store in cache.
      * @return `True` if value was stored in cache, `false` otherwise.
      * @see `IgniteCache#putx(...)`
@@ -235,10 +231,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param kv Key-Value pair to store in cache.
      * @return Previous value associated with specified key, or `null`
      *      if entry did not pass the filter, or if there was no mapping for 
the key in swap
@@ -259,10 +251,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param kv Key-Value pair to store in cache.
      * @return Previous value associated with specified key as an option.
      * @see `IgniteCache#put(...)`
@@ -289,10 +277,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param kv1 Key-value pair to store in cache.
      * @param kv2 Key-value pair to store in cache.
      * @param kvs Optional key-value pairs to store in cache.
@@ -319,10 +303,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param kvs Key-value pairs to store in cache. If `null` this function 
is no-op.
      * @see `IgniteCache#putAll(...)`
      */
@@ -341,10 +321,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param ks Sequence of additional keys to remove. If `null` - this 
function is no-op.
      * @see `IgniteCache#removeAll(...)`
      */
@@ -386,10 +362,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param k Key whose mapping is to be removed from cache.
      * @return Previous value associated with specified key, or `null`
      *      if there was no value for this key.
@@ -418,10 +390,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param k Key whose mapping is to be removed from cache.
      * @return Previous value associated with specified key as an option.
      * @see `IgniteCache#remove(...)`
@@ -449,10 +417,6 @@ with Iterable[Cache.Entry[K, V]] with 
Ordered[IgniteCache[K, V]] {
      * This method is transactional and will enlist the entry into ongoing 
transaction
      * if there is one.
      *
-     * ===Cache Flags===
-     * This method is not available if any of the following flags are set on 
projection:
-     * `CacheFlag#READ`.
-     *
      * @param k1 1st key to remove.
      * @param k2 2nd key to remove.
      * @param ks Optional sequence of additional keys to remove.

Reply via email to