Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-26 d89ef5bdf -> a1cc0a9a2


# ignite-26


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

Branch: refs/heads/ignite-26
Commit: a1cc0a9a295d1b73cecaca4a64f6bf627e761ff4
Parents: d89ef5b
Author: sboikov <sboi...@gridgain.com>
Authored: Mon Feb 2 17:54:56 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Mon Feb 2 17:54:56 2015 +0300

----------------------------------------------------------------------
 .../dataload/IgniteDataLoadCacheUpdater.java    |  4 +-
 .../apache/ignite/internal/IgniteKernal.java    | 15 +++--
 .../processors/cache/IgniteCacheProxy.java      |  2 +-
 .../dataload/GridDataLoadCacheUpdaters.java     | 16 ++---
 .../dr/GridDrDataLoadCacheUpdater.java          | 57 +++++++++-------
 .../internal/processors/job/GridJobWorker.java  |  2 +-
 .../ignite/internal/util/IgniteUtils.java       |  2 +-
 .../org/apache/ignite/lang/IgniteFuture.java    | 50 ++++++++++----
 .../apache/ignite/lifecycle/LifecycleBean.java  |  4 +-
 .../ignite/internal/ClusterMetricsSelfTest.java |  2 +-
 .../internal/GridLifecycleAwareSelfTest.java    |  2 +-
 .../internal/GridLifecycleBeanSelfTest.java     |  6 +-
 .../dht/GridCacheDhtPreloadBigDataSelfTest.java | 10 +--
 .../dht/GridCacheDhtPreloadUnloadSelfTest.java  | 16 ++---
 ...achePartitionedPreloadLifecycleSelfTest.java | 67 +++++++++---------
 ...CacheReplicatedPreloadLifecycleSelfTest.java | 71 +++++++++++---------
 .../clock/GridTimeSyncProcessorSelfTest.java    |  2 +-
 .../colocation/GridTestLifecycleBean.java       |  5 +-
 .../loadtests/dsi/GridDsiLifecycleBean.java     | 28 +++++---
 ...idCachePartitionedHitsAndMissesSelfTest.java |  3 +-
 20 files changed, 205 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/dataload/IgniteDataLoadCacheUpdater.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/dataload/IgniteDataLoadCacheUpdater.java
 
b/modules/core/src/main/java/org/apache/ignite/dataload/IgniteDataLoadCacheUpdater.java
index 468c066..ac6148f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/dataload/IgniteDataLoadCacheUpdater.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/dataload/IgniteDataLoadCacheUpdater.java
@@ -36,7 +36,7 @@ public interface IgniteDataLoadCacheUpdater<K, V> extends 
Serializable {
      *
      * @param cache Cache.
      * @param entries Collection of entries.
-     * @throws IgniteCheckedException If failed.
+     * @throws IgniteException If failed.
      */
-    public void update(IgniteCache<K, V> cache, Collection<Map.Entry<K, V>> 
entries) throws IgniteCheckedException;
+    public void update(IgniteCache<K, V> cache, Collection<Map.Entry<K, V>> 
entries) throws IgniteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 3d52051..827f2c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -519,10 +519,17 @@ public class IgniteKernal extends ClusterGroupAdapter 
implements IgniteEx, Ignit
      */
     @SuppressWarnings({"CatchGenericClass"})
     private void notifyLifecycleBeans(LifecycleEventType evt) throws 
IgniteCheckedException {
-        if (!cfg.isDaemon() && cfg.getLifecycleBeans() != null)
+        if (!cfg.isDaemon() && cfg.getLifecycleBeans() != null) {
             for (LifecycleBean bean : cfg.getLifecycleBeans())
-                if (bean != null)
-                    bean.onLifecycleEvent(evt);
+                if (bean != null) {
+                    try {
+                        bean.onLifecycleEvent(evt);
+                    }
+                    catch (Exception e) {
+                        throw new IgniteCheckedException(e);
+                    }
+                }
+        }
     }
 
     /**
@@ -986,7 +993,7 @@ public class IgniteKernal extends ClusterGroupAdapter 
implements IgniteEx, Ignit
                             nodes = nodes0.size();
                             cpus = metrics.getTotalCpus();
                         }
-                        catch (IgniteCheckedException ignore) {
+                        catch (IgniteException ignore) {
                             // No-op.
                         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/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 3599fcb..7943294 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
@@ -1066,7 +1066,7 @@ public class IgniteCacheProxy<K, V> extends 
IgniteAsyncSupportAdapter<IgniteCach
      * @return Cache exception.
      */
     private CacheException cacheException(IgniteCheckedException e) {
-        return U.convertCacheException(e);
+        return U.convertToCacheException(e);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadCacheUpdaters.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadCacheUpdaters.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadCacheUpdaters.java
index 34f0b88..392658f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadCacheUpdaters.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/GridDataLoadCacheUpdaters.java
@@ -98,10 +98,10 @@ public class GridDataLoadCacheUpdaters {
      * @param cache Cache.
      * @param rmvCol Keys to remove.
      * @param putMap Entries to put.
-     * @throws IgniteCheckedException If failed.
+     * @throws IgniteException If failed.
      */
     protected static <K, V> void updateAll(IgniteCache<K, V> cache, @Nullable 
Collection<K> rmvCol,
-        Map<K, V> putMap) throws IgniteCheckedException {
+        Map<K, V> putMap) {
         assert rmvCol != null || putMap != null;
 
         // Here we assume that there are no key duplicates, so the following 
calls are valid.
@@ -120,8 +120,7 @@ public class GridDataLoadCacheUpdaters {
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries)
-            throws IgniteCheckedException {
+        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries) {
             assert cache != null;
             assert !F.isEmpty(entries);
 
@@ -148,8 +147,7 @@ public class GridDataLoadCacheUpdaters {
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries)
-            throws IgniteCheckedException {
+        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries) {
             assert cache != null;
             assert !F.isEmpty(entries);
 
@@ -189,8 +187,7 @@ public class GridDataLoadCacheUpdaters {
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries)
-            throws IgniteCheckedException {
+        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries) {
             assert cache != null;
             assert !F.isEmpty(entries);
 
@@ -230,8 +227,7 @@ public class GridDataLoadCacheUpdaters {
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries)
-            throws IgniteCheckedException {
+        @Override public void update(IgniteCache<K, V> cache, 
Collection<Map.Entry<K, V>> entries) {
             assert cache != null;
             assert !F.isEmpty(entries);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/GridDrDataLoadCacheUpdater.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/GridDrDataLoadCacheUpdater.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/GridDrDataLoadCacheUpdater.java
index 6e7e385..4ef5e33 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/GridDrDataLoadCacheUpdater.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/GridDrDataLoadCacheUpdater.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.processors.cache.dr.*;
 import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.util.*;
 
@@ -36,42 +37,46 @@ public class GridDrDataLoadCacheUpdater<K, V> implements 
IgniteDataLoadCacheUpda
     private static final long serialVersionUID = 0L;
 
     /** {@inheritDoc} */
-    @Override public void update(IgniteCache<K, V> cache0, 
Collection<Map.Entry<K, V>> col)
-        throws IgniteCheckedException {
-        String cacheName = 
cache0.getConfiguration(CacheConfiguration.class).getName();
+    @Override public void update(IgniteCache<K, V> cache0, 
Collection<Map.Entry<K, V>> col) {
+        try {
+            String cacheName = 
cache0.getConfiguration(CacheConfiguration.class).getName();
 
-        GridKernalContext ctx = 
((IgniteKernal)cache0.unwrap(Ignite.class)).context();
-        IgniteLogger log = ctx.log(GridDrDataLoadCacheUpdater.class);
-        GridCacheAdapter<K, V> cache = ctx.cache().internalCache(cacheName);
+            GridKernalContext ctx = 
((IgniteKernal)cache0.unwrap(Ignite.class)).context();
+            IgniteLogger log = ctx.log(GridDrDataLoadCacheUpdater.class);
+            GridCacheAdapter<K, V> cache = 
ctx.cache().internalCache(cacheName);
 
-        assert !F.isEmpty(col);
+            assert !F.isEmpty(col);
 
-        if (log.isDebugEnabled())
-            log.debug("Running DR put job [nodeId=" + ctx.localNodeId() + ", 
cacheName=" + cacheName + ']');
+            if (log.isDebugEnabled())
+                log.debug("Running DR put job [nodeId=" + ctx.localNodeId() + 
", cacheName=" + cacheName + ']');
 
-        IgniteInternalFuture<?> f = cache.context().preloader().startFuture();
+            IgniteInternalFuture<?> f = 
cache.context().preloader().startFuture();
 
-        if (!f.isDone())
-            f.get();
+            if (!f.isDone())
+                f.get();
 
-        for (Map.Entry<K, V> entry0 : col) {
-            GridCacheRawVersionedEntry<K, V> entry = 
(GridCacheRawVersionedEntry<K, V>)entry0;
+            for (Map.Entry<K, V> entry0 : col) {
+                GridCacheRawVersionedEntry<K, V> entry = 
(GridCacheRawVersionedEntry<K, V>)entry0;
 
-            entry.unmarshal(ctx.config().getMarshaller());
+                entry.unmarshal(ctx.config().getMarshaller());
 
-            K key = entry.key();
+                K key = entry.key();
 
-            GridCacheDrInfo<V> val = entry.value() != null ? 
entry.expireTime() != 0 ?
-                new GridCacheDrExpirationInfo<>(entry.value(), 
entry.version(), entry.ttl(), entry.expireTime()) :
-                new GridCacheDrInfo<>(entry.value(), entry.version()) : null;
+                GridCacheDrInfo<V> val = entry.value() != null ? 
entry.expireTime() != 0 ?
+                    new GridCacheDrExpirationInfo<>(entry.value(), 
entry.version(), entry.ttl(), entry.expireTime()) :
+                    new GridCacheDrInfo<>(entry.value(), entry.version()) : 
null;
 
-            if (val == null)
-                cache.removeAllDr(Collections.singletonMap(key, 
entry.version()));
-            else
-                cache.putAllDr(Collections.singletonMap(key, val));
-        }
+                if (val == null)
+                    cache.removeAllDr(Collections.singletonMap(key, 
entry.version()));
+                else
+                    cache.putAllDr(Collections.singletonMap(key, val));
+            }
 
-        if (log.isDebugEnabled())
-            log.debug("DR put job finished [nodeId=" + ctx.localNodeId() + ", 
cacheName=" + cacheName + ']');
+            if (log.isDebugEnabled())
+                log.debug("DR put job finished [nodeId=" + ctx.localNodeId() + 
", cacheName=" + cacheName + ']');
+        }
+        catch (IgniteCheckedException e) {
+            throw U.convertException(e);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
index 3bfdf89..632364d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
@@ -815,7 +815,7 @@ public class GridJobWorker extends GridWorker implements 
GridTimeoutObject {
                         log.debug("Successfully executed 
GridComputeJobMasterLeaveAware.onMasterNodeLeft() callback " +
                             "[nodeId=" + taskNode.id() + ", jobId=" + 
ses.getJobId() + ", job=" + job + ']');
                 }
-                catch (IgniteException e) {
+                catch (Exception e) {
                     U.error(log, "Failed to execute 
GridComputeJobMasterLeaveAware.onMasterNodeLeft() callback " +
                         "[nodeId=" + taskNode.id() + ", jobId=" + 
ses.getJobId() + ", job=" + job + ']', e);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 9a79a57..185e20d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -655,7 +655,7 @@ public abstract class IgniteUtils {
      * @param e Ignite checked exception.
      * @return Ignite runtime exception.
      */
-    @Nullable public static CacheException 
convertCacheException(IgniteCheckedException e) {
+    @Nullable public static CacheException 
convertToCacheException(IgniteCheckedException e) {
         if (e instanceof CachePartialUpdateCheckedException)
             return new 
CachePartialUpdateException((CachePartialUpdateCheckedException)e);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java 
b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
index bc74203..740acdd 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
@@ -30,21 +30,43 @@ import java.util.concurrent.*;
  */
 public interface IgniteFuture<V> extends Future<V> {
     /**
-     * @throws IgniteException
-     * @throws IgniteInterruptedException
+     * Synchronously waits for completion of the computation and
+     * returns computation result.
+     *
+     * @return Computation result.
+     * @throws IgniteInterruptedException Subclass of {@link IgniteException} 
thrown if the wait was interrupted.
+     * @throws IgniteFutureCancelledException Subclass of {@link 
IgniteException} throws if computation was cancelled.
+     * @throws IgniteException If computation failed.
      */
-    @Override public V get() throws IgniteException, 
IgniteInterruptedException;
+    @Override public V get() throws IgniteException;
 
-    public V get(long timeout);
+    /**
+     * Synchronously waits for completion of the computation for
+     * up to the timeout specified and returns computation result.
+     * This method is equivalent to calling {@link #get(long, TimeUnit) 
get(long, TimeUnit.MILLISECONDS)}.
+     *
+     * @param timeout The maximum time to wait in milliseconds.
+     * @return Computation result.
+     * @throws IgniteInterruptedException Subclass of {@link IgniteException} 
thrown if the wait was interrupted.
+     * @throws IgniteFutureCancelledException Subclass of {@link 
IgniteException} throws if computation was cancelled.
+     * @throws org.apache.ignite.lang.IgniteFutureTimeoutException Subclass of 
{@link IgniteException} thrown if the wait was timed out.
+     * @throws IgniteException If computation failed.
+     */
+    public V get(long timeout)throws IgniteException;
 
     /**
-     * @param timeout
-     * @param unit
-     * @return
-     * @throws IgniteException
-     * @throws IgniteInterruptedException
+     * Synchronously waits for completion of the computation for
+     * up to the timeout specified and returns computation result.
+     *
+     * @param timeout The maximum time to wait.
+     * @param unit The time unit of the {@code timeout} argument.
+     * @return Computation result.
+     * @throws IgniteInterruptedException Subclass of {@link IgniteException} 
thrown if the wait was interrupted.
+     * @throws IgniteFutureCancelledException Subclass of {@link 
IgniteException} throws if computation was cancelled.
+     * @throws org.apache.ignite.lang.IgniteFutureTimeoutException Subclass of 
{@link IgniteException} thrown if the wait was timed out.
+     * @throws IgniteException If computation failed.
      */
-    @Override public V get(long timeout, TimeUnit unit) throws 
IgniteException, IgniteInterruptedException, IgniteFutureTimeoutException;
+    @Override public V get(long timeout, TimeUnit unit) throws IgniteException;
 
     /**
      * Cancels this future.
@@ -77,7 +99,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * immediately notified within the same thread.
      * <p>
      * Default value is {@code false}. To change the default, set
-     * {@link IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property 
to {@code true}.
+     * {@link IgniteSystemProperties#IGNITE_FUT_SYNC_NOTIFICATION} system 
property to {@code true}.
      *
      * @param syncNotify Flag to turn on or off synchronous listener 
notification.
      */
@@ -91,7 +113,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * immediately notified within the same thread.
      * <p>
      * Default value is {@code false}. To change the default, set
-     * {@link IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property 
to {@code true}.
+     * {@link IgniteSystemProperties#IGNITE_FUT_SYNC_NOTIFICATION} system 
property to {@code true}.
      *
      * @return Synchronous listener notification flag.
      */
@@ -106,7 +128,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * started the future, or in a different thread).
      * <p>
      * Default value is {@code false}. To change the default, set
-     * {@link IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system 
property to {@code true}.
+     * {@link IgniteSystemProperties#IGNITE_FUT_CONCURRENT_NOTIFICATION} 
system property to {@code true}.
      *
      * @param concurNotify Flag to turn on or off concurrent listener 
notification.
      */
@@ -121,7 +143,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * started the future, or in a different thread).
      * <p>
      * Default value is {@code false}. To change the default, set
-     * {@link IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system 
property to {@code true}.
+     * {@link IgniteSystemProperties#IGNITE_FUT_CONCURRENT_NOTIFICATION} 
system property to {@code true}.
      *
      * @return Concurrent listener notification flag
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java 
b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
index 0095661..71a005c 100644
--- a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
@@ -101,7 +101,7 @@ public interface LifecycleBean {
      * This method is called when lifecycle event occurs.
      *
      * @param evt Lifecycle event.
-     * @throws IgniteCheckedException Thrown in case of any errors.
+     * @throws IgniteException Thrown in case of any errors.
      */
-    public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException;
+    public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java
index 6a08035..3404429 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java
@@ -73,7 +73,7 @@ public class ClusterMetricsSelfTest extends 
GridCommonAbstractTest {
 
             assert false;
         }
-        catch (ClusterGroupEmptyCheckedException e) {
+        catch (ClusterGroupEmptyException e) {
             info("Caught expected exception: " + e);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java
index e627193..e89104c 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java
@@ -94,7 +94,7 @@ public class GridLifecycleAwareSelfTest extends 
GridAbstractLifecycleAwareSelfTe
         }
 
         /** {@inheritDoc} */
-        @Override public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException {
+        @Override public void onLifecycleEvent(LifecycleEventType evt) {
             // No-op.
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
index b177610..5007fee 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java
@@ -250,7 +250,7 @@ public class GridLifecycleBeanSelfTest extends 
GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException {
+        @Override public void onLifecycleEvent(LifecycleEventType evt) {
             callsCntr.get(evt).incrementAndGet();
         }
 
@@ -282,10 +282,10 @@ public class GridLifecycleBeanSelfTest extends 
GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException {
+        @Override public void onLifecycleEvent(LifecycleEventType evt) {
             if (evt == errType) {
                 if (gridErr)
-                    throw new IgniteCheckedException("Expected exception for 
event: " + evt) {
+                    throw new IgniteException("Expected exception for event: " 
+ evt) {
                         @Override public void printStackTrace(PrintStream s) {
                             // No-op.
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
index 9295a05..8a94c88 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
@@ -128,7 +128,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends 
GridCommonAbstractTest {
 
             int cnt = 10000;
 
-            populate(grid(0).<Integer, byte[]>cache(null), cnt, KBSIZE);
+            populate(grid(0).<Integer, byte[]>jcache(null), cnt, KBSIZE);
 
             int gridCnt = 3;
 
@@ -165,11 +165,11 @@ public class GridCacheDhtPreloadBigDataSelfTest extends 
GridCommonAbstractTest {
                 @IgniteInstanceResource
                 private Ignite ignite;
 
-                @Override public void onLifecycleEvent(LifecycleEventType evt) 
throws IgniteCheckedException {
+                @Override public void onLifecycleEvent(LifecycleEventType evt) 
{
                     if (evt == LifecycleEventType.AFTER_GRID_START) {
-                        GridCache<Integer, byte[]> c = ignite.cache(null);
+                        IgniteCache<Integer, byte[]> c = ignite.jcache(null);
 
-                        if (c.putxIfAbsent(-1, new byte[1])) {
+                        if (c.putIfAbsent(-1, new byte[1])) {
                             populate(c, cnt, KBSIZE);
 
                             info(">>> POPULATED GRID <<<");
@@ -208,7 +208,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends 
GridCommonAbstractTest {
      * @param kbSize Size in KB.
      * @throws IgniteCheckedException If failed.
      */
-    private void populate(GridCache<Integer, byte[]> c, int cnt, int kbSize) 
throws IgniteCheckedException {
+    private void populate(IgniteCache<Integer, byte[]> c, int cnt, int kbSize) 
{
         for (int i = 0; i < cnt; i++)
             c.put(i, value(kbSize));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
index b8818b0..49f11d2 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
@@ -125,7 +125,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends 
GridCommonAbstractTest {
 
             int cnt = 1000;
 
-            populate(grid(0).<Integer, String>cache(null), cnt);
+            populate(grid(0).<Integer, String>jcache(null), cnt);
 
             int gridCnt = 2;
 
@@ -152,7 +152,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends 
GridCommonAbstractTest {
 
             int cnt = 1000;
 
-            populate(grid(0).<Integer, String>cache(null), cnt);
+            populate(grid(0).<Integer, String>jcache(null), cnt);
 
             int gridCnt = 2;
 
@@ -231,7 +231,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends 
GridCommonAbstractTest {
 
             int cnt = 1000;
 
-            populate(grid(0).<Integer, String>cache(null), cnt);
+            populate(grid(0).<Integer, String>jcache(null), cnt);
 
             int gridCnt = 3;
 
@@ -263,12 +263,12 @@ public class GridCacheDhtPreloadUnloadSelfTest extends 
GridCommonAbstractTest {
                 @IgniteInstanceResource
                 private Ignite ignite;
 
-                @Override public void onLifecycleEvent(LifecycleEventType evt) 
throws IgniteCheckedException {
+                @Override public void onLifecycleEvent(LifecycleEventType evt) 
{
                     if (evt == LifecycleEventType.AFTER_GRID_START) {
-                        GridCache<Integer, String> c = ignite.cache(null);
+                        IgniteCache<Integer, String> c = ignite.jcache(null);
 
-                        if (c.putxIfAbsent(-1, "true")) {
-                            populate(ignite.<Integer, String>cache(null), cnt);
+                        if (c.putIfAbsent(-1, "true")) {
+                            populate(ignite.<Integer, String>jcache(null), 
cnt);
 
                             info(">>> POPULATED GRID <<<");
                         }
@@ -301,7 +301,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends 
GridCommonAbstractTest {
      * @param cnt Key count.
      * @throws IgniteCheckedException If failed.
      */
-    private void populate(GridCache<Integer, String> c, int cnt) throws 
IgniteCheckedException {
+    private void populate(IgniteCache<Integer, String> c, int cnt) {
         for (int i = 0; i < cnt; i++)
             c.put(i, value(1024));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
index 7f68b6d..eaa8a0c 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
@@ -81,51 +81,56 @@ public class GridCachePartitionedPreloadLifecycleSelfTest 
extends GridCachePrelo
             @IgniteInstanceResource
             private Ignite ignite;
 
-            @Override public void onLifecycleEvent(LifecycleEventType evt) 
throws IgniteCheckedException {
-                switch (evt) {
-                    case AFTER_GRID_START: {
-                        GridCache<Object, MyValue> c1 = ignite.cache("one");
-                        GridCache<Object, MyValue> c2 = ignite.cache("two");
+            @Override public void onLifecycleEvent(LifecycleEventType evt) {
+                try {
+                    switch (evt) {
+                        case AFTER_GRID_START: {
+                            GridCache<Object, MyValue> c1 = 
ignite.cache("one");
+                            GridCache<Object, MyValue> c2 = 
ignite.cache("two");
 
-                        if (!ignite.name().contains("Test0")) {
-                            info("Keys already in cache:");
+                            if (!ignite.name().contains("Test0")) {
+                                info("Keys already in cache:");
 
-                            for (Object k : c1.keySet())
-                                info("Cache1: " + k.toString());
+                                for (Object k : c1.keySet())
+                                    info("Cache1: " + k.toString());
 
-                            for (Object k : c2.keySet())
-                                info("Cache2: " + k.toString());
+                                for (Object k : c2.keySet())
+                                    info("Cache2: " + k.toString());
 
-                            return;
-                        }
+                                return;
+                            }
 
-                        info("Populating cache data...");
+                            info("Populating cache data...");
 
-                        int i = 0;
+                            int i = 0;
 
-                        for (Object key : keys) {
-                            c1.put(key, new MyValue(value(key)));
+                            for (Object key : keys) {
+                                c1.put(key, new MyValue(value(key)));
 
-                            if (i++ % 2 == 0)
-                                c2.put(key, new MyValue(value(key)));
-                        }
+                                if (i++ % 2 == 0)
+                                    c2.put(key, new MyValue(value(key)));
+                            }
 
-                        assert c1.size() == keys.length : "Invalid cache1 size 
[size=" + c1.size() +
-                            ", entries=" + c1.entrySet() + ']';
-                        assert c2.size() == keys.length / 2 : "Invalid cache2 
size [size=" + c2.size() +
-                            ", entries=" + c2.entrySet() + ']';
+                            assert c1.size() == keys.length : "Invalid cache1 
size [size=" + c1.size() +
+                                ", entries=" + c1.entrySet() + ']';
+                            assert c2.size() == keys.length / 2 : "Invalid 
cache2 size [size=" + c2.size() +
+                                ", entries=" + c2.entrySet() + ']';
 
-                        break;
-                    }
+                            break;
+                        }
 
-                    case BEFORE_GRID_START:
-                    case BEFORE_GRID_STOP:
-                    case AFTER_GRID_STOP: {
-                        info("Lifecycle event: " + evt);
+                        case BEFORE_GRID_START:
+                        case BEFORE_GRID_STOP:
+                        case AFTER_GRID_STOP: {
+                            info("Lifecycle event: " + evt);
 
-                        break;
+                            break;
+                        }
                     }
                 }
+                catch (IgniteCheckedException e) {
+                    throw new IgniteException(e);
+                }
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
index 266ba56..4696ed8 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
@@ -82,53 +82,58 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest 
extends GridCachePreloa
             @IgniteInstanceResource
             private Ignite ignite;
 
-            @Override public void onLifecycleEvent(LifecycleEventType evt) 
throws IgniteCheckedException {
-                switch (evt) {
-                    case AFTER_GRID_START: {
-                        GridCache<Object, MyValue> c1 = ignite.cache("one");
-                        GridCache<Object, MyValue> c2 = ignite.cache("two");
+            @Override public void onLifecycleEvent(LifecycleEventType evt) {
+                try {
+                    switch (evt) {
+                        case AFTER_GRID_START: {
+                            GridCache<Object, MyValue> c1 = 
ignite.cache("one");
+                            GridCache<Object, MyValue> c2 = 
ignite.cache("two");
 
-                        if (!ignite.name().contains("Test0")) {
-                            if (!quiet) {
-                                info("Keys already in cache:");
+                            if (!ignite.name().contains("Test0")) {
+                                if (!quiet) {
+                                    info("Keys already in cache:");
 
-                                for (Object k : c1.keySet())
-                                    info("Cache1: " + k.toString());
+                                    for (Object k : c1.keySet())
+                                        info("Cache1: " + k.toString());
 
-                                for (Object k : c2.keySet())
-                                    info("Cache2: " + k.toString());
-                            }
+                                    for (Object k : c2.keySet())
+                                        info("Cache2: " + k.toString());
+                                }
 
-                            return;
-                        }
+                                return;
+                            }
 
-                        info("Populating cache data...");
+                            info("Populating cache data...");
 
-                        int i = 0;
+                            int i = 0;
 
-                        for (Object key : keys) {
-                            c1.put(key, new MyValue(value(key)));
+                            for (Object key : keys) {
+                                c1.put(key, new MyValue(value(key)));
 
-                            if (i++ % 2 == 0)
-                                c2.put(key, new MyValue(value(key)));
-                        }
+                                if (i++ % 2 == 0)
+                                    c2.put(key, new MyValue(value(key)));
+                            }
 
-                        assert c1.size() == keys.length : "Invalid cache1 size 
[size=" + c1.size() +
-                            ", entries=" + c1.entrySet() + ']';
-                        assert c2.size() == keys.length / 2 : "Invalid cache2 
size [size=" + c2.size() +
-                            ", entries=" + c2.entrySet() + ']';
+                            assert c1.size() == keys.length : "Invalid cache1 
size [size=" + c1.size() +
+                                ", entries=" + c1.entrySet() + ']';
+                            assert c2.size() == keys.length / 2 : "Invalid 
cache2 size [size=" + c2.size() +
+                                ", entries=" + c2.entrySet() + ']';
 
-                        break;
-                    }
+                            break;
+                        }
 
-                    case BEFORE_GRID_START:
-                    case BEFORE_GRID_STOP:
-                    case AFTER_GRID_STOP: {
-                        info("Lifecycle event: " + evt);
+                        case BEFORE_GRID_START:
+                        case BEFORE_GRID_STOP:
+                        case AFTER_GRID_STOP: {
+                            info("Lifecycle event: " + evt);
 
-                        break;
+                            break;
+                        }
                     }
                 }
+                catch (IgniteCheckedException e) {
+                    throw new IgniteException(e);
+                }
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
index 5b198d1..90a6eb7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/clock/GridTimeSyncProcessorSelfTest.java
@@ -195,7 +195,7 @@ public class GridTimeSyncProcessorSelfTest extends 
GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException {
+        @Override public void onLifecycleEvent(LifecycleEventType evt) {
             if (evt == LifecycleEventType.BEFORE_GRID_START)
                 
((GridKernalContextImpl)((IgniteKernal)g).context()).timeSource(new 
TimeShiftClockSource(delta));
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
 
b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
index bd011f4..ee58451 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/GridTestLifecycleBean.java
@@ -26,12 +26,13 @@ import org.apache.ignite.resources.*;
  * Lifecycle bean.
  */
 public class GridTestLifecycleBean implements LifecycleBean {
+    /** */
     @IgniteInstanceResource
     private Ignite g;
 
-    @Override public void onLifecycleEvent(LifecycleEventType type) throws 
IgniteCheckedException {
+    @Override public void onLifecycleEvent(LifecycleEventType type) {
         if (type == LifecycleEventType.AFTER_GRID_START) {
-            GridCache<GridTestKey, Long> cache = g.cache("partitioned");
+            IgniteCache<GridTestKey, Long> cache = g.jcache("partitioned");
 
             assert cache != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
 
b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
index b12c94d..ed54a86 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/loadtests/dsi/GridDsiLifecycleBean.java
@@ -40,20 +40,26 @@ public class GridDsiLifecycleBean implements LifecycleBean {
     private ApplicationContext springCtx;
 
     /** {@inheritDoc} */
-    @Override public void onLifecycleEvent(LifecycleEventType evt) throws 
IgniteCheckedException {
-        switch (evt) {
-            case BEFORE_GRID_START:
-                break;
+    @Override public void onLifecycleEvent(LifecycleEventType evt) {
+        try {
+            switch (evt) {
+                case BEFORE_GRID_START:
+                    break;
 
-            case AFTER_GRID_START:
-                
ignite.cache("PARTITIONED_CACHE").dataStructures().atomicSequence("ID", 0, 
true);
-                break;
+                case AFTER_GRID_START:
+                    
ignite.cache("PARTITIONED_CACHE").dataStructures().atomicSequence("ID", 0, 
true);
 
-            case BEFORE_GRID_STOP:
-                break;
+                    break;
 
-            case AFTER_GRID_STOP:
-                break;
+                case BEFORE_GRID_STOP:
+                    break;
+
+                case AFTER_GRID_STOP:
+                    break;
+            }
+        }
+        catch (Exception e) {
+            throw new IgniteException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1cc0a9a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index acfe247..4e6390c 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -170,8 +170,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest 
extends GridCommonAbstrac
         };
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<Integer, Long> cache,
-            Collection<Map.Entry<Integer, Long>> entries) throws 
IgniteCheckedException {
+        @Override public void update(IgniteCache<Integer, Long> cache, 
Collection<Map.Entry<Integer, Long>> entries) {
             for (Map.Entry<Integer, Long> entry : entries)
                 cache.invoke(entry.getKey(), INC);
         }

Reply via email to