ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [33/56] [abbrv] [partial] incubator-ignite git commit: Rename GridException to IgniteCheckedException, GridRuntimeException to IgniteException.
Date Thu, 11 Dec 2014 13:54:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
index 9ea2b4f..d28f728 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
@@ -346,11 +346,11 @@ public class GridCacheUtils {
      * Checks that cache store is present.
      *
      * @param ctx Registry.
-     * @throws GridException If cache store is not present.
+     * @throws IgniteCheckedException If cache store is not present.
      */
-    public static void checkStore(GridCacheContext<?, ?> ctx) throws GridException {
+    public static void checkStore(GridCacheContext<?, ?> ctx) throws IgniteCheckedException {
         if (!ctx.store().configured())
-            throw new GridException("Failed to find cache store for method 'reload(..)' " +
+            throw new IgniteCheckedException("Failed to find cache store for method 'reload(..)' " +
                 "(is GridCacheStore configured?)");
     }
 
@@ -1059,7 +1059,7 @@ public class GridCacheUtils {
                 try {
                     f.get();
                 }
-                catch (GridException e) {
+                catch (IgniteCheckedException e) {
                     if (!F.isEmpty(excl))
                         for (Class cls : excl)
                             if (e.hasCause(cls))
@@ -1122,7 +1122,7 @@ public class GridCacheUtils {
         if (t == null)
             return false;
 
-        while (t instanceof GridException || t instanceof GridRuntimeException)
+        while (t instanceof IgniteCheckedException || t instanceof IgniteException)
             t = t.getCause();
 
         return t instanceof GridCacheLockTimeoutException;
@@ -1136,7 +1136,7 @@ public class GridCacheUtils {
         if (t == null)
             return false;
 
-        while (t instanceof GridException || t instanceof GridRuntimeException)
+        while (t instanceof IgniteCheckedException || t instanceof IgniteException)
             t = t.getCause();
 
         return t instanceof GridCacheLockTimeoutException || t instanceof GridDistributedLockCancelledException;
@@ -1146,11 +1146,11 @@ public class GridCacheUtils {
      * @param ctx Cache context.
      * @param obj Object to marshal.
      * @return Buffer that contains obtained byte array.
-     * @throws GridException If marshalling failed.
+     * @throws IgniteCheckedException If marshalling failed.
      */
     @SuppressWarnings("unchecked")
     public static byte[] marshal(GridCacheSharedContext ctx, Object obj)
-        throws GridException {
+        throws IgniteCheckedException {
         assert ctx != null;
 
         if (ctx.gridDeploy().enabled()) {
@@ -1176,20 +1176,20 @@ public class GridCacheUtils {
      * @param cmd Callable.
      * @param ctx Cache context.
      * @return T Callable result.
-     * @throws GridException If execution failed.
+     * @throws IgniteCheckedException If execution failed.
      */
-    public static <T> T outTx(Callable<T> cmd, GridCacheContext ctx) throws GridException {
+    public static <T> T outTx(Callable<T> cmd, GridCacheContext ctx) throws IgniteCheckedException {
         if (ctx.tm().inUserTx())
             return ctx.closures().callLocalSafe(cmd, false).get();
         else {
             try {
                 return cmd.call();
             }
-            catch (GridException | GridRuntimeException e) {
+            catch (IgniteCheckedException | IgniteException e) {
                 throw e;
             }
             catch (Exception e) {
-                throw new GridException(e);
+                throw new IgniteCheckedException(e);
             }
         }
     }
@@ -1377,11 +1377,11 @@ public class GridCacheUtils {
      * @param rmtCfg Remote configuration.
      * @param rmt Remote node.
      * @param attr Attribute name.
-     * @param fail If true throws GridException in case of attribute values mismatch, otherwise logs warning.
-     * @throws GridException If attribute values are different and fail flag is true.
+     * @param fail If true throws IgniteCheckedException in case of attribute values mismatch, otherwise logs warning.
+     * @throws IgniteCheckedException If attribute values are different and fail flag is true.
      */
     public static void checkAttributeMismatch(IgniteLogger log, GridCacheConfiguration locCfg,
-        GridCacheConfiguration rmtCfg, ClusterNode rmt, T2<String, String> attr, boolean fail) throws GridException {
+        GridCacheConfiguration rmtCfg, ClusterNode rmt, T2<String, String> attr, boolean fail) throws IgniteCheckedException {
         assert rmt != null;
         assert attr != null;
         assert attr.get1() != null;
@@ -1404,18 +1404,18 @@ public class GridCacheUtils {
      * @param attrMsg Full attribute name for error message.
      * @param locVal Local value.
      * @param rmtVal Remote value.
-     * @param fail If true throws GridException in case of attribute values mismatch, otherwise logs warning.
-     * @throws GridException If attribute values are different and fail flag is true.
+     * @param fail If true throws IgniteCheckedException in case of attribute values mismatch, otherwise logs warning.
+     * @throws IgniteCheckedException If attribute values are different and fail flag is true.
      */
     public static void checkAttributeMismatch(IgniteLogger log, String cfgName, ClusterNode rmt, String attrName,
-        String attrMsg, @Nullable Object locVal, @Nullable Object rmtVal, boolean fail) throws GridException {
+        String attrMsg, @Nullable Object locVal, @Nullable Object rmtVal, boolean fail) throws IgniteCheckedException {
         assert rmt != null;
         assert attrName != null;
         assert attrMsg != null;
 
         if (!F.eq(locVal, rmtVal)) {
             if (fail) {
-                throw new GridException(attrMsg + " mismatch (fix " + attrMsg.toLowerCase() + " in cache " +
+                throw new IgniteCheckedException(attrMsg + " mismatch (fix " + attrMsg.toLowerCase() + " in cache " +
                     "configuration or set -D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true " +
                     "system property) [cacheName=" + cfgName +
                     ", local" + capitalize(attrName) + "=" + locVal +
@@ -1604,10 +1604,10 @@ public class GridCacheUtils {
      * @param concurrency Concurrency.
      * @param isolation Isolation.
      * @param clo Closure.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     public static <K, V> void inTx(GridCacheProjection<K, V> cache, GridCacheTxConcurrency concurrency,
-        GridCacheTxIsolation isolation, IgniteInClosureX<GridCacheProjection<K ,V>> clo) throws GridException {
+        GridCacheTxIsolation isolation, IgniteInClosureX<GridCacheProjection<K ,V>> clo) throws IgniteCheckedException {
 
         try (GridCacheTx tx = cache.txStart(concurrency, isolation)) {
             clo.applyx(cache);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheValueCollection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheValueCollection.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheValueCollection.java
index afd5f43..f836a24 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheValueCollection.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheValueCollection.java
@@ -9,13 +9,13 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
+import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
-import org.gridgain.grid.util.*;
 
 import java.util.*;
 
@@ -130,8 +130,8 @@ public class GridCacheValueCollection<K, V> extends GridSerializableCollection<V
                 try {
                     e.removex();
                 }
-                catch (GridException ex) {
-                    throw new GridRuntimeException(ex);
+                catch (IgniteCheckedException ex) {
+                    throw new IgniteException(ex);
                 }
 
                 rmv = true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheVersionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheVersionManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheVersionManager.java
index 49f4012..3c2d8e7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheVersionManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheVersionManager.java
@@ -9,10 +9,10 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -76,7 +76,7 @@ public class GridCacheVersionManager<K, V> extends GridCacheSharedManagerAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public void start0() throws GridException {
+    @Override public void start0() throws IgniteCheckedException {
         txSerEnabled = cctx.gridConfig().getTransactionsConfiguration().isTxSerializableEnabled();
 
         dataCenterId = 0; //cctx.dataCenterId(); TODO GG-9141 Grab data center ID from DR manager.
@@ -87,7 +87,7 @@ public class GridCacheVersionManager<K, V> extends GridCacheSharedManagerAdapter
     }
 
     /** {@inheritDoc} */
-    @Override protected void onKernalStart0() throws GridException {
+    @Override protected void onKernalStart0() throws IgniteCheckedException {
         for (ClusterNode n : cctx.discovery().remoteNodes())
             onReceived(n.id(), n.metrics().getLastDataVersion());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
index b39d725..873b5e2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
@@ -250,9 +250,9 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
      * Performs all the initialization logic for write-behind cache store.
      * This class must not be used until this method returns.
      *
-     * @throws GridException If cache cannot be started due to some reasons.
+     * @throws IgniteCheckedException If cache cannot be started due to some reasons.
      */
-    @Override public void start() throws GridException {
+    @Override public void start() throws IgniteCheckedException {
         assert cacheFlushFreq != 0 || cacheMaxSize != 0;
 
         if (stopping.compareAndSet(true, false)) {
@@ -280,13 +280,13 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
     }
 
     /** {@inheritDoc} */
-    @Override public void initialize(GridKernalContext ctx) throws GridException {
+    @Override public void initialize(GridKernalContext ctx) throws IgniteCheckedException {
         if (store instanceof GridInteropAware)
             ((GridInteropAware)store).initialize(ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public void destroy(GridKernalContext ctx) throws GridException {
+    @Override public void destroy(GridKernalContext ctx) throws IgniteCheckedException {
         if (store instanceof GridInteropAware)
             ((GridInteropAware)store).destroy(ctx);
     }
@@ -326,9 +326,9 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
      * Performs shutdown logic for store. No put, get and remove requests will be processed after
      * this method is called.
      *
-     * @throws GridException If shutdown failed for some reason.
+     * @throws IgniteCheckedException If shutdown failed for some reason.
      */
-    @Override public void stop() throws GridException {
+    @Override public void stop() throws IgniteCheckedException {
         if (stopping.compareAndSet(false, true)) {
             if (log.isDebugEnabled())
                 log.debug("Stopping write-behind store for cache '" + cacheName + '\'');
@@ -350,9 +350,9 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
 
     /**
      * Forces all entries collected to be flushed to the underlying store.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
-    public void forceFlush() throws GridException {
+    public void forceFlush() throws IgniteCheckedException {
         wakeUp();
     }
 
@@ -363,17 +363,17 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
      *
      * @param clo {@inheritDoc}
      * @param args {@inheritDoc}
-     * @throws GridException {@inheritDoc}
+     * @throws IgniteCheckedException {@inheritDoc}
      */
     @Override public void loadCache(IgniteBiInClosure<K, V> clo, @Nullable Object... args)
-        throws GridException {
+        throws IgniteCheckedException {
         store.loadCache(clo, args);
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings({"NullableProblems"})
     @Override public void loadAll(@Nullable GridCacheTx tx,
-        @Nullable Collection<? extends K> keys, IgniteBiInClosure<K, V> c) throws GridException {
+        @Nullable Collection<? extends K> keys, IgniteBiInClosure<K, V> c) throws IgniteCheckedException {
         if (log.isDebugEnabled())
             log.debug("Store load all [keys=" + keys + ", tx=" + tx + ']');
 
@@ -415,7 +415,7 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
     }
 
     /** {@inheritDoc} */
-    @Override public V load(@Nullable GridCacheTx tx, K key) throws GridException {
+    @Override public V load(@Nullable GridCacheTx tx, K key) throws IgniteCheckedException {
         if (log.isDebugEnabled())
             log.debug("Store load [key=" + key + ", tx=" + tx + ']');
 
@@ -446,13 +446,13 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
 
     /** {@inheritDoc} */
     @Override public void putAll(@Nullable GridCacheTx tx, @Nullable Map<? extends K, ? extends V> map)
-        throws GridException {
+        throws IgniteCheckedException {
         for (Map.Entry<? extends K, ? extends V> e : map.entrySet())
             put(tx, e.getKey(), e.getValue());
     }
 
     /** {@inheritDoc} */
-    @Override public void put(@Nullable GridCacheTx tx, K key, V val) throws GridException {
+    @Override public void put(@Nullable GridCacheTx tx, K key, V val) throws IgniteCheckedException {
         if (log.isDebugEnabled())
             log.debug("Store put [key=" + key + ", val=" + val + ", tx=" + tx + ']');
 
@@ -461,13 +461,13 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
 
     /** {@inheritDoc} */
     @Override public void removeAll(@Nullable GridCacheTx tx, @Nullable Collection<? extends K> keys)
-        throws GridException {
+        throws IgniteCheckedException {
         for (K key : keys)
             remove(tx, key);
     }
 
     /** {@inheritDoc} */
-    @Override public void remove(@Nullable GridCacheTx tx, K key) throws GridException {
+    @Override public void remove(@Nullable GridCacheTx tx, K key) throws IgniteCheckedException {
         if (log.isDebugEnabled())
             log.debug("Store remove [key=" + key + ", tx=" + tx + ']');
 
@@ -475,7 +475,7 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
     }
 
     /** {@inheritDoc} */
-    @Override public void txEnd(GridCacheTx tx, boolean commit) throws GridException {
+    @Override public void txEnd(GridCacheTx tx, boolean commit) throws IgniteCheckedException {
         // No-op.
     }
 
@@ -679,7 +679,7 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
 
             return true;
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             LT.warn(log, e, "Unable to update underlying store: " + store);
 
             if (writeCache.sizex() > cacheCriticalSize || stopping.get()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridAtomicCacheQueueImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridAtomicCacheQueueImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridAtomicCacheQueueImpl.java
index b6272c4..9ef3b7b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridAtomicCacheQueueImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridAtomicCacheQueueImpl.java
@@ -9,8 +9,8 @@
 
 package org.gridgain.grid.kernal.processors.cache.datastructures;
 
+import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.*;
@@ -37,7 +37,7 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public boolean offer(T item) throws GridRuntimeException {
+    @Override public boolean offer(T item) throws IgniteException {
         try {
             Long idx = transformHeader(new AddClosure(id, 1));
 
@@ -71,14 +71,14 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
 
             return true;
         }
-        catch (GridException e) {
-            throw new GridRuntimeException(e);
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
         }
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Nullable @Override public T poll() throws GridRuntimeException {
+    @Nullable @Override public T poll() throws IgniteException {
         try {
             while (true) {
                 Long idx = transformHeader(new PollClosure(id));
@@ -127,8 +127,8 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
                 U.warn(log, "Failed to get item, will retry poll [queue=" + queueName + ", idx=" + idx + ']');
             }
         }
-        catch (GridException e) {
-            throw new GridRuntimeException(e);
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
         }
     }
 
@@ -174,14 +174,14 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
 
             return true;
         }
-        catch (GridException e) {
-            throw new GridRuntimeException(e);
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
         }
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override protected void removeItem(long rmvIdx) throws GridException {
+    @Override protected void removeItem(long rmvIdx) throws IgniteCheckedException {
         Long idx = (Long)cache.transformAndCompute(queueKey, new RemoveClosure(id, rmvIdx));
 
         if (idx != null) {
@@ -226,11 +226,11 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
     /**
      * @param c Transform closure to be applied for queue header.
      * @return Value computed by the transform closure.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings("unchecked")
     @Nullable private Long transformHeader(IgniteClosure<GridCacheQueueHeader, IgniteBiTuple<GridCacheQueueHeader, Long>> c)
-        throws GridException {
+        throws IgniteCheckedException {
         int cnt = 0;
 
         while (true) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAnnotationHelper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAnnotationHelper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAnnotationHelper.java
index df162c6..e2083df 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAnnotationHelper.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAnnotationHelper.java
@@ -9,8 +9,8 @@
 
 package org.gridgain.grid.kernal.processors.cache.datastructures;
 
+import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.*;
 
@@ -70,9 +70,9 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
      *
      * @param target Object to find a value in.
      * @return Value of annotated field or method.
-     * @throws GridException If failed to find.
+     * @throws IgniteCheckedException If failed to find.
      */
-    public Object annotatedValue(Object target) throws GridException {
+    public Object annotatedValue(Object target) throws IgniteCheckedException {
         IgniteBiTuple<Object, Boolean> res = annotatedValue(target, new HashSet<>(), false);
 
         assert res != null;
@@ -87,10 +87,10 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
      * @param visited Set of visited objects to avoid cycling.
      * @param annFound Flag indicating if value has already been found.
      * @return Value of annotated field or method.
-     * @throws GridException If failed to find.
+     * @throws IgniteCheckedException If failed to find.
      */
     private IgniteBiTuple<Object, Boolean> annotatedValue(Object target, Set<Object> visited, boolean annFound)
-        throws GridException {
+        throws IgniteCheckedException {
         assert target != null;
 
         // To avoid infinite recursion.
@@ -112,7 +112,7 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
                     fieldVal = f.get(target);
                 }
                 catch (IllegalAccessException e) {
-                    throw new GridException("Failed to get annotated field value [cls=" + cls.getName() +
+                    throw new IgniteCheckedException("Failed to get annotated field value [cls=" + cls.getName() +
                         ", ann=" + annCls.getSimpleName()+']', e);
                 }
 
@@ -130,7 +130,7 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
                 }
                 else {
                     if (annFound)
-                        throw new GridException("Multiple annotations has been found [cls=" + cls.getName() +
+                        throw new IgniteCheckedException("Multiple annotations has been found [cls=" + cls.getName() +
                             ", ann=" + annCls.getSimpleName() + ']');
 
                     val = fieldVal;
@@ -142,7 +142,7 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
             // Methods.
             for (Method m : methodsWithAnnotation(cls)) {
                 if (annFound)
-                    throw new GridException("Multiple annotations has been found [cls=" + cls.getName() +
+                    throw new IgniteCheckedException("Multiple annotations has been found [cls=" + cls.getName() +
                         ", ann=" + annCls.getSimpleName() + ']');
 
                 m.setAccessible(true);
@@ -151,7 +151,7 @@ public class GridCacheAnnotationHelper<A extends Annotation> {
                     val = m.invoke(target);
                 }
                 catch (Exception e) {
-                    throw new GridException("Failed to get annotated method value [cls=" + cls.getName() +
+                    throw new IgniteCheckedException("Failed to get annotated method value [cls=" + cls.getName() +
                         ", ann=" + annCls.getSimpleName()+']', e);
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicLongImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicLongImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicLongImpl.java
index ee6ef24..18f31b0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicLongImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicLongImpl.java
@@ -9,12 +9,11 @@
 
 package org.gridgain.grid.kernal.processors.cache.datastructures;
 
+import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.*;
-import org.apache.ignite.IgniteLogger;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -64,7 +63,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
             GridCacheAtomicLongValue val = atomicView.get(key);
 
             if (val == null)
-                throw new GridException("Failed to find atomic long with given name: " + name);
+                throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
             return val.get();
         }
@@ -79,7 +78,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                 GridCacheAtomicLongValue val = atomicView.get(key);
 
                 if (val == null)
-                    throw new GridException("Failed to find atomic long with given name: " + name);
+                    throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                 long retVal = val.get() + 1;
 
@@ -110,7 +109,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                 GridCacheAtomicLongValue val = atomicView.get(key);
 
                 if (val == null)
-                    throw new GridException("Failed to find atomic long with given name: " + name);
+                    throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                 long retVal = val.get();
 
@@ -141,7 +140,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                 GridCacheAtomicLongValue val = atomicView.get(key);
 
                 if (val == null)
-                    throw new GridException("Failed to find atomic long with given name: " + name);
+                    throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                 long retVal = val.get() - 1;
 
@@ -172,7 +171,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                 GridCacheAtomicLongValue val = atomicView.get(key);
 
                 if (val == null)
-                    throw new GridException("Failed to find atomic long with given name: " + name);
+                    throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                 long retVal = val.get();
 
@@ -230,56 +229,56 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
     }
 
     /** {@inheritDoc} */
-    @Override public long get() throws GridException {
+    @Override public long get() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(getCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long incrementAndGet() throws GridException {
+    @Override public long incrementAndGet() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(incAndGetCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndIncrement() throws GridException {
+    @Override public long getAndIncrement() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(getAndIncCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long addAndGet(long l) throws GridException {
+    @Override public long addAndGet(long l) throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(internalAddAndGet(l), ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndAdd(long l) throws GridException {
+    @Override public long getAndAdd(long l) throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(internalGetAndAdd(l), ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long decrementAndGet() throws GridException {
+    @Override public long decrementAndGet() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(decAndGetCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndDecrement() throws GridException {
+    @Override public long getAndDecrement() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(getAndDecCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndSet(long l) throws GridException {
+    @Override public long getAndSet(long l) throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(internalGetAndSet(l), ctx);
@@ -287,7 +286,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
 
     /** {@inheritDoc} */
     @Override public boolean compareAndSet(long expVal, long newVal)
-        throws GridException {
+        throws IgniteCheckedException {
         checkRemoved();
         return CU.outTx(internalCompareAndSet(expVal, newVal), ctx);
     }
@@ -295,9 +294,9 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
     /**
      * Check removed flag.
      *
-     * @throws GridException If removed.
+     * @throws IgniteCheckedException If removed.
      */
-    private void checkRemoved() throws GridException {
+    private void checkRemoved() throws IgniteCheckedException {
         if (rmvd)
             throw new GridCacheDataStructureRemovedException("Atomic long was removed from cache: " + name);
     }
@@ -337,7 +336,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                     GridCacheAtomicLongValue val = atomicView.get(key);
 
                     if (val == null)
-                        throw new GridException("Failed to find atomic long with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                     long retVal = val.get() + l;
 
@@ -375,7 +374,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                     GridCacheAtomicLongValue val = atomicView.get(key);
 
                     if (val == null)
-                        throw new GridException("Failed to find atomic long with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                     long retVal = val.get();
 
@@ -413,7 +412,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                     GridCacheAtomicLongValue val = atomicView.get(key);
 
                     if (val == null)
-                        throw new GridException("Failed to find atomic long with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                     long retVal = val.get();
 
@@ -453,7 +452,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
                     GridCacheAtomicLongValue val = atomicView.get(key);
 
                     if (val == null)
-                        throw new GridException("Failed to find atomic long with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic long with given name: " + name);
 
                     boolean retVal = val.get() == expVal;
 
@@ -504,7 +503,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
 
             return t.get1().dataStructures().atomicLong(t.get2(), 0L, false);
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             throw U.withCause(new InvalidObjectException(e.getMessage()), e);
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceImpl.java
index fdb9cbc..492c6df 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceImpl.java
@@ -64,7 +64,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
             GridCacheAtomicReferenceValue<T> ref = atomicView.get(key);
 
             if (ref == null)
-                throw new GridException("Failed to find atomic reference with given name: " + name);
+                throw new IgniteCheckedException("Failed to find atomic reference with given name: " + name);
 
             return ref.get();
         }
@@ -108,21 +108,21 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
     }
 
     /** {@inheritDoc} */
-    @Override public T get() throws GridException {
+    @Override public T get() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(getCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public void set(T val) throws GridException {
+    @Override public void set(T val) throws IgniteCheckedException {
         checkRemoved();
 
         CU.outTx(internalSet(val), ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean compareAndSet(T expVal, T newVal) throws GridException {
+    @Override public boolean compareAndSet(T expVal, T newVal) throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(internalCompareAndSet(wrapperPredicate(expVal), wrapperClosure(newVal)), ctx);
@@ -192,7 +192,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
                     GridCacheAtomicReferenceValue<T> ref = atomicView.get(key);
 
                     if (ref == null)
-                        throw new GridException("Failed to find atomic reference with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic reference with given name: " + name);
 
                     ref.set(val);
 
@@ -231,7 +231,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
                     GridCacheAtomicReferenceValue<T> ref = atomicView.get(key);
 
                     if (ref == null)
-                        throw new GridException("Failed to find atomic reference with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic reference with given name: " + name);
 
                     if (!expValPred.apply(ref.get())) {
                         tx.setRollbackOnly();
@@ -263,9 +263,9 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
     /**
      * Check removed status.
      *
-     * @throws GridException If removed.
+     * @throws IgniteCheckedException If removed.
      */
-    private void checkRemoved() throws GridException {
+    private void checkRemoved() throws IgniteCheckedException {
         if (rmvd)
             throw new GridCacheDataStructureRemovedException("Atomic reference was removed from cache: " + name);
     }
@@ -297,7 +297,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
 
             return t.get1().dataStructures().atomicReference(t.get2(), null, false);
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             throw U.withCause(new InvalidObjectException(e.getMessage()), e);
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
index e2f5c93..8785b2a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
@@ -128,7 +128,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
     }
 
     /** {@inheritDoc} */
-    @Override public long get() throws GridException {
+    @Override public long get() throws IgniteCheckedException {
         checkRemoved();
 
         lock.lock();
@@ -142,24 +142,24 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
     }
 
     /** {@inheritDoc} */
-    @Override public long incrementAndGet() throws GridException {
+    @Override public long incrementAndGet() throws IgniteCheckedException {
         return internalUpdate(1, incAndGetCall, true);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndIncrement() throws GridException {
+    @Override public long getAndIncrement() throws IgniteCheckedException {
         return internalUpdate(1, getAndIncCall, false);
     }
 
     /** {@inheritDoc} */
-    @Override public long addAndGet(long l) throws GridException {
+    @Override public long addAndGet(long l) throws IgniteCheckedException {
         A.ensure(l > 0, " Parameter mustn't be less then 1: " + l);
 
         return internalUpdate(l, null, true);
     }
 
     /** {@inheritDoc} */
-    @Override public long getAndAdd(long l) throws GridException {
+    @Override public long getAndAdd(long l) throws IgniteCheckedException {
         A.ensure(l > 0, " Parameter mustn't be less then 1: " + l);
 
         return internalUpdate(l, null, false);
@@ -173,10 +173,10 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
      * @param updated If {@code true}, will return sequence value after update, otherwise will return sequence value
      *      prior to update.
      * @return Sequence value.
-     * @throws GridException If update failed.
+     * @throws IgniteCheckedException If update failed.
      */
     @SuppressWarnings("SignalWithoutCorrespondingAwait")
-    private long internalUpdate(long l, @Nullable Callable<Long> updateCall, boolean updated) throws GridException {
+    private long internalUpdate(long l, @Nullable Callable<Long> updateCall, boolean updated) throws IgniteCheckedException {
         checkRemoved();
 
         assert l > 0;
@@ -252,11 +252,11 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
      * @param updated If {@code true}, will return sequence value after update, otherwise will return sequence value
      *      prior to update.
      * @return Future indicating sequence value.
-     * @throws GridException If update failed.
+     * @throws IgniteCheckedException If update failed.
      */
     @SuppressWarnings("SignalWithoutCorrespondingAwait")
     private IgniteFuture<Long> internalUpdateAsync(long l, @Nullable Callable<Long> updateCall, boolean updated)
-        throws GridException {
+        throws IgniteCheckedException {
         checkRemoved();
 
         A.ensure(l > 0, " Parameter mustn't be less then 1: " + l);
@@ -353,9 +353,9 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
     /**
      * Check removed status.
      *
-     * @throws GridException If removed.
+     * @throws IgniteCheckedException If removed.
      */
-    private void checkRemoved() throws GridException {
+    private void checkRemoved() throws IgniteCheckedException {
         if (rmvd)
             throw new GridCacheDataStructureRemovedException("Sequence was removed from cache: " + name);
     }
@@ -493,7 +493,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
 
             return t.get1().dataStructures().sequence(t.get2(), 0L, false);
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             throw U.withCause(new InvalidObjectException(e.getMessage()), e);
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicStampedImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicStampedImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicStampedImpl.java
index 3fd2147..2f6aaf0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicStampedImpl.java
@@ -66,7 +66,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
             GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
             if (stmp == null)
-                throw new GridException("Failed to find atomic stamped with given name: " + name);
+                throw new IgniteCheckedException("Failed to find atomic stamped with given name: " + name);
 
             return stmp.get();
         }
@@ -78,7 +78,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
             GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
             if (stmp == null)
-                throw new GridException("Failed to find atomic stamped with given name: " + name);
+                throw new IgniteCheckedException("Failed to find atomic stamped with given name: " + name);
 
             return stmp.value();
         }
@@ -90,7 +90,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
             GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
             if (stmp == null)
-                throw new GridException("Failed to find atomic stamped with given name: " + name);
+                throw new IgniteCheckedException("Failed to find atomic stamped with given name: " + name);
 
             return stmp.stamp();
         }
@@ -132,21 +132,21 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteBiTuple<T, S> get() throws GridException {
+    @Override public IgniteBiTuple<T, S> get() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(getCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public void set(T val, S stamp) throws GridException {
+    @Override public void set(T val, S stamp) throws IgniteCheckedException {
         checkRemoved();
 
         CU.outTx(internalSet(val, stamp), ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws GridException {
+    @Override public boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(internalCompareAndSet(F0.equalTo(expVal), wrapperClosure(newVal),
@@ -154,14 +154,14 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
     }
 
     /** {@inheritDoc} */
-    @Override public S stamp() throws GridException {
+    @Override public S stamp() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(stampCall, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public T value() throws GridException {
+    @Override public T value() throws IgniteCheckedException {
         checkRemoved();
 
         return CU.outTx(valCall, ctx);
@@ -218,7 +218,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
                     GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
                     if (stmp == null)
-                        throw new GridException("Failed to find atomic stamped with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic stamped with given name: " + name);
 
                     stmp.set(val, stamp);
 
@@ -260,7 +260,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
                     GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
                     if (stmp == null)
-                        throw new GridException("Failed to find atomic stamped with given name: " + name);
+                        throw new IgniteCheckedException("Failed to find atomic stamped with given name: " + name);
 
                     if (!(expValPred.apply(stmp.value()) && expStampPred.apply(stmp.stamp()))) {
                         tx.setRollbackOnly();
@@ -317,7 +317,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
 
             return t.get1().dataStructures().atomicStamped(t.get2(), null, null, false);
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             throw U.withCause(new InvalidObjectException(e.getMessage()), e);
         }
         finally {
@@ -328,9 +328,9 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
     /**
      * Check removed status.
      *
-     * @throws GridException If removed.
+     * @throws IgniteCheckedException If removed.
      */
-    private void checkRemoved() throws GridException {
+    private void checkRemoved() throws IgniteCheckedException {
         if (rmvd)
             throw new GridCacheDataStructureRemovedException("Atomic stamped was removed from cache: " + name);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java
index 692b994..039a286 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchImpl.java
@@ -135,38 +135,38 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
     }
 
     /** {@inheritDoc} */
-    @Override public void await() throws GridException {
+    @Override public void await() throws IgniteCheckedException {
         initializeLatch();
 
         U.await(internalLatch);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean await(long timeout, TimeUnit unit) throws GridException {
+    @Override public boolean await(long timeout, TimeUnit unit) throws IgniteCheckedException {
         initializeLatch();
 
         return U.await(internalLatch, timeout, unit);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean await(long timeout) throws GridException {
+    @Override public boolean await(long timeout) throws IgniteCheckedException {
         return await(timeout, TimeUnit.MILLISECONDS);
     }
 
     /** {@inheritDoc} */
-    @Override public int countDown() throws GridException {
+    @Override public int countDown() throws IgniteCheckedException {
         return CU.outTx(new CountDownCallable(1), ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public int countDown(int val) throws GridException {
+    @Override public int countDown(int val) throws IgniteCheckedException {
         A.ensure(val > 0, "val should be positive");
 
         return CU.outTx(new CountDownCallable(val), ctx);
     }
 
     /** {@inheritDoc}*/
-    @Override public void countDownAll() throws GridException {
+    @Override public void countDownAll() throws IgniteCheckedException {
         CU.outTx(new CountDownCallable(0), ctx);
     }
 
@@ -203,9 +203,9 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
     }
 
     /**
-     * @throws GridException If operation failed.
+     * @throws IgniteCheckedException If operation failed.
      */
-    private void initializeLatch() throws GridException {
+    private void initializeLatch() throws IgniteCheckedException {
         if (initGuard.compareAndSet(false, true)) {
             try {
                 internalLatch = CU.outTx(
@@ -248,7 +248,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
             U.await(initLatch);
 
             if (internalLatch == null)
-                throw new GridException("Internal latch has not been properly initialized.");
+                throw new IgniteCheckedException("Internal latch has not been properly initialized.");
         }
     }
 
@@ -279,7 +279,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
 
             return t.get1().dataStructures().countDownLatch(t.get2(), 0, false, false);
         }
-        catch (GridException e) {
+        catch (IgniteCheckedException e) {
             throw U.withCause(new InvalidObjectException(e.getMessage()), e);
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresImpl.java
index 308e36b..9fc8ada 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresImpl.java
@@ -9,7 +9,7 @@
 
 package org.gridgain.grid.kernal.processors.cache.datastructures;
 
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
 import org.gridgain.grid.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.jetbrains.annotations.*;
@@ -30,82 +30,82 @@ public class GridCacheDataStructuresImpl<K, V> implements GridCacheDataStructure
 
     /** {@inheritDoc} */
     @Override public GridCacheAtomicSequence atomicSequence(String name, long initVal, boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         return dsMgr.sequence(name, initVal, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeAtomicSequence(String name) throws GridException {
+    @Override public boolean removeAtomicSequence(String name) throws IgniteCheckedException {
         return dsMgr.removeSequence(name);
     }
 
     /** {@inheritDoc} */
-    @Override public GridCacheAtomicLong atomicLong(String name, long initVal, boolean create) throws GridException {
+    @Override public GridCacheAtomicLong atomicLong(String name, long initVal, boolean create) throws IgniteCheckedException {
         return dsMgr.atomicLong(name, initVal, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeAtomicLong(String name) throws GridException {
+    @Override public boolean removeAtomicLong(String name) throws IgniteCheckedException {
         return dsMgr.removeAtomicLong(name);
     }
 
     /** {@inheritDoc} */
     @Override public <T> GridCacheAtomicReference<T> atomicReference(String name, T initVal, boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         return dsMgr.atomicReference(name, initVal, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeAtomicReference(String name) throws GridException {
+    @Override public boolean removeAtomicReference(String name) throws IgniteCheckedException {
         return dsMgr.removeAtomicReference(name);
     }
 
     /** {@inheritDoc} */
     @Override public <T, S> GridCacheAtomicStamped<T, S> atomicStamped(String name, T initVal, S initStamp,
-        boolean create) throws GridException {
+        boolean create) throws IgniteCheckedException {
         return dsMgr.atomicStamped(name, initVal, initStamp, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeAtomicStamped(String name) throws GridException {
+    @Override public boolean removeAtomicStamped(String name) throws IgniteCheckedException {
         return dsMgr.removeAtomicStamped(name);
     }
 
     /** {@inheritDoc} */
     @Override public <T> GridCacheQueue<T> queue(String name, int cap, boolean collocated, boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         return dsMgr.queue(name, cap <= 0 ? Integer.MAX_VALUE : cap, collocated, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeQueue(String name) throws GridException {
+    @Override public boolean removeQueue(String name) throws IgniteCheckedException {
         return dsMgr.removeQueue(name, 0);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeQueue(String name, int batchSize) throws GridException {
+    @Override public boolean removeQueue(String name, int batchSize) throws IgniteCheckedException {
         return dsMgr.removeQueue(name, batchSize);
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public <T> GridCacheSet<T> set(String name, boolean collocated, boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         return dsMgr.set(name, collocated, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeSet(String name) throws GridException {
+    @Override public boolean removeSet(String name) throws IgniteCheckedException {
         return dsMgr.removeSet(name);
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public GridCacheCountDownLatch countDownLatch(String name, int cnt, boolean autoDel,
-        boolean create) throws GridException {
+        boolean create) throws IgniteCheckedException {
         return dsMgr.countDownLatch(name, cnt, autoDel, create);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removeCountDownLatch(String name) throws GridException {
+    @Override public boolean removeCountDownLatch(String name) throws IgniteCheckedException {
         return dsMgr.removeCountDownLatch(name);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
index c3961a4..3b768d9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
@@ -154,7 +154,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             try {
                 queueQry.close();
             }
-            catch (GridException e) {
+            catch (IgniteCheckedException e) {
                 U.warn(log, "Failed to cancel queue header query.", e);
             }
         }
@@ -170,10 +170,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param initVal Initial value for sequence. If sequence already cached, {@code initVal} will be ignored.
      * @param create  If {@code true} sequence will be created in case it is not in cache.
      * @return Sequence.
-     * @throws GridException If loading failed.
+     * @throws IgniteCheckedException If loading failed.
      */
     public final GridCacheAtomicSequence sequence(final String name, final long initVal,
-        final boolean create) throws GridException {
+        final boolean create) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -254,7 +254,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             }, cctx);
         }
         catch (Exception e) {
-            throw new GridException("Failed to get sequence by name: " + name, e);
+            throw new IgniteCheckedException("Failed to get sequence by name: " + name, e);
         }
     }
 
@@ -263,9 +263,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Sequence name.
      * @return Method returns {@code true} if sequence has been removed and {@code false} if it's not cached.
-     * @throws GridException If removing failed.
+     * @throws IgniteCheckedException If removing failed.
      */
-    public final boolean removeSequence(String name) throws GridException {
+    public final boolean removeSequence(String name) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -276,7 +276,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             return removeInternal(key, GridCacheAtomicSequenceValue.class);
         }
         catch (Exception e) {
-            throw new GridException("Failed to remove sequence by name: " + name, e);
+            throw new IgniteCheckedException("Failed to remove sequence by name: " + name, e);
         }
     }
 
@@ -288,10 +288,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *        will be ignored.
      * @param create If {@code true} atomic long will be created in case it is not in cache.
      * @return Atomic long.
-     * @throws GridException If loading failed.
+     * @throws IgniteCheckedException If loading failed.
      */
     public final GridCacheAtomicLong atomicLong(final String name, final long initVal,
-        final boolean create) throws GridException {
+        final boolean create) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -349,7 +349,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             }, cctx);
         }
         catch (Exception e) {
-            throw new GridException("Failed to get atomic long by name: " + name, e);
+            throw new IgniteCheckedException("Failed to get atomic long by name: " + name, e);
         }
     }
 
@@ -358,9 +358,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Atomic long name.
      * @return Method returns {@code true} if atomic long has been removed and {@code false} if it's not cached.
-     * @throws GridException If removing failed.
+     * @throws IgniteCheckedException If removing failed.
      */
-    public final boolean removeAtomicLong(String name) throws GridException {
+    public final boolean removeAtomicLong(String name) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -371,7 +371,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             return removeInternal(key, GridCacheAtomicLongValue.class);
         }
         catch (Exception e) {
-            throw new GridException("Failed to remove atomic long by name: " + name, e);
+            throw new IgniteCheckedException("Failed to remove atomic long by name: " + name, e);
         }
     }
 
@@ -383,11 +383,11 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *        will be ignored.
      * @param create If {@code true} atomic reference will be created in case it is not in cache.
      * @return Atomic reference.
-     * @throws GridException If loading failed.
+     * @throws IgniteCheckedException If loading failed.
      */
     @SuppressWarnings("unchecked")
     public final <T> GridCacheAtomicReference<T> atomicReference(final String name, final T initVal,
-        final boolean create) throws GridException {
+        final boolean create) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -446,7 +446,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             }, cctx);
         }
         catch (Exception e) {
-            throw new GridException("Failed to get atomic reference by name: " + name, e);
+            throw new IgniteCheckedException("Failed to get atomic reference by name: " + name, e);
         }
     }
 
@@ -455,9 +455,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Atomic reference name.
      * @return Method returns {@code true} if atomic reference has been removed and {@code false} if it's not cached.
-     * @throws GridException If removing failed.
+     * @throws IgniteCheckedException If removing failed.
      */
-    public final boolean removeAtomicReference(String name) throws GridException {
+    public final boolean removeAtomicReference(String name) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -468,7 +468,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             return removeInternal(key, GridCacheAtomicReferenceValue.class);
         }
         catch (Exception e) {
-            throw new GridException("Failed to remove atomic reference by name: " + name, e);
+            throw new IgniteCheckedException("Failed to remove atomic reference by name: " + name, e);
         }
     }
 
@@ -482,11 +482,11 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *        will be ignored.
      * @param create If {@code true} atomic stamped will be created in case it is not in cache.
      * @return Atomic stamped.
-     * @throws GridException If loading failed.
+     * @throws IgniteCheckedException If loading failed.
      */
     @SuppressWarnings("unchecked")
     public final <T, S> GridCacheAtomicStamped<T, S> atomicStamped(final String name, final T initVal,
-        final S initStamp, final boolean create) throws GridException {
+        final S initStamp, final boolean create) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -545,7 +545,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             }, cctx);
         }
         catch (Exception e) {
-            throw new GridException("Failed to get atomic stamped by name: " + name, e);
+            throw new IgniteCheckedException("Failed to get atomic stamped by name: " + name, e);
         }
     }
 
@@ -554,9 +554,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Atomic stamped name.
      * @return Method returns {@code true} if atomic stamped has been removed and {@code false} if it's not cached.
-     * @throws GridException If removing failed.
+     * @throws IgniteCheckedException If removing failed.
      */
-    public final boolean removeAtomicStamped(String name) throws GridException {
+    public final boolean removeAtomicStamped(String name) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -567,7 +567,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             return removeInternal(key, GridCacheAtomicStampedValue.class);
         }
         catch (Exception e) {
-            throw new GridException("Failed to remove atomic stamped by name: " + name, e);
+            throw new IgniteCheckedException("Failed to remove atomic stamped by name: " + name, e);
         }
     }
 
@@ -579,10 +579,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param colloc Collocation flag.
      * @param create If {@code true} queue will be created in case it is not in cache.
      * @return Instance of queue.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     public final <T> GridCacheQueue<T> queue(final String name, final int cap, boolean colloc,
-        final boolean create) throws GridException {
+        final boolean create) throws IgniteCheckedException {
         waitInitialization();
 
         checkSupportsQueue();
@@ -608,11 +608,11 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param colloc Collocation flag.
      * @param create If {@code true} queue will be created in case it is not in cache.
      * @return Queue.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings({"unchecked", "NonPrivateFieldAccessedInSynchronizedContext"})
     private <T> GridCacheQueue<T> queue0(final String name, final int cap, boolean colloc, final boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         GridCacheQueueHeaderKey key = new GridCacheQueueHeaderKey(name);
 
         GridCacheQueueHeader header;
@@ -624,7 +624,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
 
             if (old != null) {
                 if (old.capacity() != cap || old.collocated() != colloc)
-                    throw new GridException("Failed to create queue, queue with the same name but different " +
+                    throw new IgniteCheckedException("Failed to create queue, queue with the same name but different " +
                         "configuration already exists [name=" + name + ']');
 
                 header = old;
@@ -702,9 +702,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param name Queue name.
      * @param batchSize Batch size.
      * @return Method returns {@code true} if queue has been removed and {@code false} if it's not cached.
-     * @throws GridException If removing failed.
+     * @throws IgniteCheckedException If removing failed.
      */
-    public final boolean removeQueue(final String name, final int batchSize) throws GridException {
+    public final boolean removeQueue(final String name, final int batchSize) throws IgniteCheckedException {
         waitInitialization();
 
         checkSupportsQueue();
@@ -723,9 +723,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param name Queue name.
      * @param batchSize Batch size.
      * @return {@code True} if queue was removed.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
-    private boolean removeQueue0(String name, final int batchSize) throws GridException {
+    private boolean removeQueue0(String name, final int batchSize) throws IgniteCheckedException {
         GridCacheQueueHeader hdr = queueHdrView.remove(new GridCacheQueueHeaderKey(name));
 
         if (hdr == null)
@@ -753,10 +753,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *      if it is {@code false} all parameters except {@code name} are ignored.
      * @return Count down latch for the given name or {@code null} if it is not found and
      *      {@code create} is false.
-     * @throws GridException If operation failed.
+     * @throws IgniteCheckedException If operation failed.
      */
     public GridCacheCountDownLatch countDownLatch(final String name, final int cnt, final boolean autoDel,
-        final boolean create) throws GridException {
+        final boolean create) throws IgniteCheckedException {
         A.ensure(cnt >= 0, "count can not be negative");
 
         waitInitialization();
@@ -816,7 +816,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
                 }, cctx);
         }
         catch (Exception e) {
-            throw new GridException("Failed to get count down latch by name: " + name, e);
+            throw new IgniteCheckedException("Failed to get count down latch by name: " + name, e);
         }
     }
 
@@ -825,9 +825,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Name of the latch.
      * @return Count down latch for the given name.
-     * @throws GridException If operation failed.
+     * @throws IgniteCheckedException If operation failed.
      */
-    public boolean removeCountDownLatch(final String name) throws GridException {
+    public boolean removeCountDownLatch(final String name) throws IgniteCheckedException {
         waitInitialization();
 
         checkTransactionalWithNear();
@@ -845,7 +845,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
 
                             if (val != null) {
                                 if (val.get() > 0) {
-                                    throw new GridException("Failed to remove count down latch " +
+                                    throw new IgniteCheckedException("Failed to remove count down latch " +
                                         "with non-zero count: " + val.get());
                                 }
 
@@ -869,7 +869,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             );
         }
         catch (Exception e) {
-            throw new GridException("Failed to remove count down latch by name: " + name, e);
+            throw new IgniteCheckedException("Failed to remove count down latch by name: " + name, e);
         }
     }
 
@@ -879,9 +879,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param key Internal entry key.
      * @param cls Class of object which will be removed. If cached object has different type exception will be thrown.
      * @return Method returns true if sequence has been removed and false if it's not cached.
-     * @throws GridException If removing failed or class of object is different to expected class.
+     * @throws IgniteCheckedException If removing failed or class of object is different to expected class.
      */
-    private <R> boolean removeInternal(final GridCacheInternal key, final Class<R> cls) throws GridException {
+    private <R> boolean removeInternal(final GridCacheInternal key, final Class<R> cls) throws IgniteCheckedException {
         return CU.outTx(
             new Callable<Boolean>() {
                 @Override public Boolean call() throws Exception {
@@ -920,7 +920,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
             try {
                 waitInitialization();
             }
-            catch (GridException e) {
+            catch (IgniteCheckedException e) {
                 U.error(log, "Failed to wait for manager initialization.", e);
 
                 return;
@@ -978,15 +978,15 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     }
 
     /**
-     * @throws GridException If thread is interrupted or manager
+     * @throws IgniteCheckedException If thread is interrupted or manager
      *     was not successfully initialized.
      */
-    private void waitInitialization() throws GridException {
+    private void waitInitialization() throws IgniteCheckedException {
         if (initLatch.getCount() > 0)
             U.await(initLatch);
 
         if (!initFlag)
-            throw new GridException("DataStructures manager was not properly initialized for cache: " +
+            throw new IgniteCheckedException("DataStructures manager was not properly initialized for cache: " +
                 cctx.cache().name());
     }
 
@@ -1006,24 +1006,24 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     }
 
     /**
-     * @throws GridException If {@link GridCacheQueue} can not be used with current cache configuration.
+     * @throws IgniteCheckedException If {@link GridCacheQueue} can not be used with current cache configuration.
      */
-    private void checkSupportsQueue() throws GridException {
+    private void checkSupportsQueue() throws IgniteCheckedException {
         if (cctx.atomic() && !cctx.isLocal() && cctx.config().getAtomicWriteOrderMode() == CLOCK)
-            throw new GridException("GridCacheQueue can not be used with ATOMIC cache with CLOCK write order mode" +
+            throw new IgniteCheckedException("GridCacheQueue can not be used with ATOMIC cache with CLOCK write order mode" +
                 " (change write order mode to PRIMARY in configuration)");
     }
 
     /**
-     * @throws GridException If cache is not transactional with near cache enabled.
+     * @throws IgniteCheckedException If cache is not transactional with near cache enabled.
      */
-    private void checkTransactionalWithNear() throws GridException {
+    private void checkTransactionalWithNear() throws IgniteCheckedException {
         if (cctx.atomic())
-            throw new GridException("Data structures require GridCacheAtomicityMode.TRANSACTIONAL atomicity mode " +
+            throw new IgniteCheckedException("Data structures require GridCacheAtomicityMode.TRANSACTIONAL atomicity mode " +
                 "(change atomicity mode from ATOMIC to TRANSACTIONAL in configuration)");
 
         if (!cctx.isReplicated() && !cctx.isLocal() && !CU.isNearEnabled(cctx))
-            throw new GridException("Cache data structures can not be used with near cache disabled on cache: " +
+            throw new IgniteCheckedException("Cache data structures can not be used with near cache disabled on cache: " +
                 cctx.cache().name());
     }
 
@@ -1034,10 +1034,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param collocated Collocation flag.
      * @param create If {@code true} set will be created in case it is not in cache.
      * @return Set instance.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @Nullable public <T> GridCacheSet<T> set(final String name, boolean collocated, final boolean create)
-        throws GridException {
+        throws IgniteCheckedException {
         waitInitialization();
 
         // Non collocated mode enabled only for PARTITIONED cache.
@@ -1058,9 +1058,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param name Set name.
      * @return {@code True} if set was removed.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
-    public boolean removeSet(final String name) throws GridException {
+    public boolean removeSet(final String name) throws IgniteCheckedException {
         waitInitialization();
 
         if (cctx.atomic())
@@ -1142,10 +1142,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param collocated Collocation flag.
      * @param create If {@code true} set will be created in case it is not in cache.
      * @return Set.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings("unchecked")
-    @Nullable private <T> GridCacheSet<T> set0(String name, boolean collocated, boolean create) throws GridException {
+    @Nullable private <T> GridCacheSet<T> set0(String name, boolean collocated, boolean create) throws IgniteCheckedException {
         GridCacheSetHeaderKey key = new GridCacheSetHeaderKey(name);
 
         GridCacheSetHeader hdr;
@@ -1182,10 +1182,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     /**
      * @param name Set name.
      * @return {@code True} if set was removed.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings("unchecked")
-    private boolean removeSet0(String name) throws GridException {
+    private boolean removeSet0(String name) throws IgniteCheckedException {
         GridCacheSetHeaderKey key = new GridCacheSetHeaderKey(name);
 
         GridCache cache = cctx.cache();
@@ -1254,10 +1254,10 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     /**
      * @param setId Set ID.
      * @param topVer Topology version.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings("unchecked")
-    private void removeSetData(IgniteUuid setId, long topVer) throws GridException {
+    private void removeSetData(IgniteUuid setId, long topVer) throws IgniteCheckedException {
         boolean local = cctx.isLocal();
 
         GridCacheAffinityManager aff = cctx.affinity();
@@ -1301,9 +1301,9 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     /**
      * @param call Callable.
      * @return Callable result.
-     * @throws GridException If all retrys failed.
+     * @throws IgniteCheckedException If all retrys failed.
      */
-    <R> R retry(Callable<R> call) throws GridException {
+    <R> R retry(Callable<R> call) throws IgniteCheckedException {
         try {
             int cnt = 0;
 
@@ -1312,7 +1312,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
                     return call.call();
                 }
                 catch (ClusterGroupEmptyException e) {
-                    throw new GridRuntimeException(e);
+                    throw new IgniteException(e);
                 }
                 catch (GridCacheTxRollbackException | GridCachePartialUpdateException | ClusterTopologyException e) {
                     if (cnt++ == MAX_UPDATE_RETRIES)
@@ -1325,22 +1325,22 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
                 }
             }
         }
-        catch (GridException | GridRuntimeException e) {
+        catch (IgniteCheckedException | IgniteException e) {
             throw e;
         }
         catch (Exception e) {
-            throw new GridRuntimeException(e);
+            throw new IgniteException(e);
         }
     }
 
     /**
      * @param cache Cache.
      * @param key Key to remove.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      * @return Removed value.
      */
     @SuppressWarnings("unchecked")
-    @Nullable private <T> T retryRemove(final GridCache cache, final Object key) throws GridException {
+    @Nullable private <T> T retryRemove(final GridCache cache, final Object key) throws IgniteCheckedException {
         return retry(new Callable<T>() {
             @Nullable @Override public T call() throws Exception {
                 return (T)cache.remove(key);
@@ -1351,11 +1351,11 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
     /**
      * @param cache Cache.
      * @param keys Keys to remove.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings("unchecked")
     private void retryRemoveAll(final GridCache cache, final Collection<GridCacheSetItemKey> keys)
-        throws GridException {
+        throws IgniteCheckedException {
         retry(new Callable<Void>() {
             @Override public Void call() throws Exception {
                 cache.removeAll(keys);
@@ -1369,12 +1369,12 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param cache Cache.
      * @param key Key.
      * @param val Value.
-     * @throws GridException If failed.
+     * @throws IgniteCheckedException If failed.
      * @return Previous value.
      */
     @SuppressWarnings("unchecked")
     @Nullable private <T> T retryPutIfAbsent(final GridCache cache, final Object key, final T val)
-        throws GridException {
+        throws IgniteCheckedException {
         return retry(new Callable<T>() {
             @Nullable @Override public T call() throws Exception {
                 return (T)cache.putIfAbsent(key, val);
@@ -1389,17 +1389,17 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      * @param cls Class
      * @param <R> Type of expected result.
      * @return Object has casted to expected type.
-     * @throws GridException If {@code obj} has different to {@code cls} type.
+     * @throws IgniteCheckedException If {@code obj} has different to {@code cls} type.
      */
     @SuppressWarnings("unchecked")
-    @Nullable private <R> R cast(@Nullable Object obj, Class<R> cls) throws GridException {
+    @Nullable private <R> R cast(@Nullable Object obj, Class<R> cls) throws IgniteCheckedException {
         if (obj == null)
             return null;
 
         if (cls.isInstance(obj))
             return (R)obj;
         else
-            throw new GridException("Failed to cast object [expected=" + cls + ", actual=" + obj.getClass() + ']');
+            throw new IgniteCheckedException("Failed to cast object [expected=" + cls + ", actual=" + obj.getClass() + ']');
     }
 
     /** {@inheritDoc} */
@@ -1474,7 +1474,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
         }
 
         /** {@inheritDoc} */
-        @Override public Void call() throws GridException {
+        @Override public Void call() throws IgniteCheckedException {
             GridCacheAdapter cache = ((GridKernal) ignite).context().cache().internalCache(cacheName);
 
             assert cache != null;
@@ -1542,7 +1542,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
         }
 
         /** {@inheritDoc} */
-        @Override public Void call() throws GridException {
+        @Override public Void call() throws IgniteCheckedException {
             GridCacheAdapter cache = ((GridKernal) ignite).context().cache().internalCache(cacheName);
 
             assert cache != null;


Mime
View raw message