http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java index 1b622c5..5215654 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java @@ -399,10 +399,10 @@ public class GridGainEx { * configuration file. If such file is not found, then all system defaults will be used. * * @return Started grid. - * @throws GridException If default grid could not be started. This exception will be thrown + * @throws IgniteCheckedException If default grid could not be started. This exception will be thrown * also if default grid has already been started. */ - public static Ignite start() throws GridException { + public static Ignite start() throws IgniteCheckedException { return start((GridSpringResourceContext)null); } @@ -416,10 +416,10 @@ public class GridGainEx { * If provided, this context can be injected into grid tasks and grid jobs using * {@link org.apache.ignite.resources.IgniteSpringApplicationContextResource @GridSpringApplicationContextResource} annotation. * @return Started grid. - * @throws GridException If default grid could not be started. This exception will be thrown + * @throws IgniteCheckedException If default grid could not be started. This exception will be thrown * also if default grid has already been started. */ - public static Ignite start(@Nullable GridSpringResourceContext springCtx) throws GridException { + public static Ignite start(@Nullable GridSpringResourceContext springCtx) throws IgniteCheckedException { URL url = U.resolveGridGainUrl(DFLT_CFG); if (url != null) @@ -436,10 +436,10 @@ public class GridGainEx { * * @param cfg Grid configuration. This cannot be {@code null}. * @return Started grid. - * @throws GridException If grid could not be started. This exception will be thrown + * @throws IgniteCheckedException If grid could not be started. This exception will be thrown * also if named grid has already been started. */ - public static Ignite start(IgniteConfiguration cfg) throws GridException { + public static Ignite start(IgniteConfiguration cfg) throws IgniteCheckedException { return start(cfg, null); } @@ -453,10 +453,10 @@ public class GridGainEx { * If provided, this context can be injected into grid tasks and grid jobs using * {@link org.apache.ignite.resources.IgniteSpringApplicationContextResource @GridSpringApplicationContextResource} annotation. * @return Started grid. - * @throws GridException If grid could not be started. This exception will be thrown + * @throws IgniteCheckedException If grid could not be started. This exception will be thrown * also if named grid has already been started. */ - public static Ignite start(IgniteConfiguration cfg, @Nullable GridSpringResourceContext springCtx) throws GridException { + public static Ignite start(IgniteConfiguration cfg, @Nullable GridSpringResourceContext springCtx) throws IgniteCheckedException { A.notNull(cfg, "cfg"); return start0(new GridStartContext(cfg, null, springCtx)).grid(); @@ -474,11 +474,11 @@ public class GridGainEx { * @param springCfgPath Spring XML configuration file path or URL. * @return Started grid. If Spring configuration contains multiple grid instances, * then the 1st found instance is returned. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ - public static Ignite start(@Nullable String springCfgPath) throws GridException { + public static Ignite start(@Nullable String springCfgPath) throws IgniteCheckedException { return springCfgPath == null ? start() : start(springCfgPath, null); } @@ -495,11 +495,11 @@ public class GridGainEx { * @param gridName Grid name that will override default. * @return Started grid. If Spring configuration contains multiple grid instances, * then the 1st found instance is returned. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ - public static Ignite start(@Nullable String springCfgPath, @Nullable String gridName) throws GridException { + public static Ignite start(@Nullable String springCfgPath, @Nullable String gridName) throws IgniteCheckedException { if (springCfgPath == null) { IgniteConfiguration cfg = new IgniteConfiguration(); @@ -519,10 +519,10 @@ public class GridGainEx { * @param gridName Grid name. * @param envPtr Environment pointer. * @return Started Grid. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ public static Ignite startInterop(@Nullable String springCfgPath, @Nullable String gridName, long envPtr) - throws GridException { + throws IgniteCheckedException { GridInteropProcessorAdapter.ENV_PTR.set(envPtr); return start(springCfgPath, gridName); @@ -537,12 +537,12 @@ public class GridGainEx { * * @param springCfgUrl Spring XML configuration file path or URL. This cannot be {@code null}. * @return Tuple containing all loaded configurations and Spring context used to load them. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> loadConfigurations( - URL springCfgUrl) throws GridException { + URL springCfgUrl) throws IgniteCheckedException { GridSpringProcessor spring = SPRING.create(false); return spring.loadConfigurations(springCfgUrl); @@ -557,12 +557,12 @@ public class GridGainEx { * * @param springCfgPath Spring XML configuration file path. This cannot be {@code null}. * @return Tuple containing all loaded configurations and Spring context used to load them. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> loadConfigurations( - String springCfgPath) throws GridException { + String springCfgPath) throws IgniteCheckedException { A.notNull(springCfgPath, "springCfgPath"); URL url; @@ -574,7 +574,7 @@ public class GridGainEx { url = U.resolveGridGainUrl(springCfgPath); if (url == null) - throw new GridException("Spring XML configuration path is invalid: " + springCfgPath + + throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath + ". Note that this path should be either absolute or a relative local file system path, " + "relative to META-INF in classpath or valid URL to GRIDGAIN_HOME.", e); } @@ -591,12 +591,12 @@ public class GridGainEx { * * @param springCfgUrl Spring XML configuration file path or URL. This cannot be {@code null}. * @return First found configuration and Spring context used to load it. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static IgniteBiTuple<IgniteConfiguration, GridSpringResourceContext> loadConfiguration(URL springCfgUrl) - throws GridException { + throws IgniteCheckedException { IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> t = loadConfigurations(springCfgUrl); return F.t(F.first(t.get1()), t.get2()); @@ -611,12 +611,12 @@ public class GridGainEx { * * @param springCfgPath Spring XML configuration file path. This cannot be {@code null}. * @return First found configuration and Spring context used to load it. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static IgniteBiTuple<IgniteConfiguration, GridSpringResourceContext> loadConfiguration(String springCfgPath) - throws GridException { + throws IgniteCheckedException { IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> t = loadConfigurations(springCfgPath); @@ -640,12 +640,12 @@ public class GridGainEx { * {@link org.apache.ignite.resources.IgniteSpringApplicationContextResource @GridSpringApplicationContextResource} annotation. * @return Started grid. If Spring configuration contains multiple grid instances, * then the 1st found instance is returned. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static Ignite start(String springCfgPath, @Nullable String gridName, - @Nullable GridSpringResourceContext springCtx) throws GridException { + @Nullable GridSpringResourceContext springCtx) throws IgniteCheckedException { A.notNull(springCfgPath, "springCfgPath"); URL url; @@ -657,7 +657,7 @@ public class GridGainEx { url = U.resolveGridGainUrl(springCfgPath); if (url == null) - throw new GridException("Spring XML configuration path is invalid: " + springCfgPath + + throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath + ". Note that this path should be either absolute or a relative local file system path, " + "relative to META-INF in classpath or valid URL to GRIDGAIN_HOME.", e); } @@ -677,11 +677,11 @@ public class GridGainEx { * @param springCfgUrl Spring XML configuration file URL. This cannot be {@code null}. * @return Started grid. If Spring configuration contains multiple grid instances, * then the 1st found instance is returned. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ - public static Ignite start(URL springCfgUrl) throws GridException { + public static Ignite start(URL springCfgUrl) throws IgniteCheckedException { return start(springCfgUrl, null, null); } @@ -702,12 +702,12 @@ public class GridGainEx { * {@link org.apache.ignite.resources.IgniteSpringApplicationContextResource @GridSpringApplicationContextResource} annotation. * @return Started grid. If Spring configuration contains multiple grid instances, * then the 1st found instance is returned. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public static Ignite start(URL springCfgUrl, @Nullable String gridName, - @Nullable GridSpringResourceContext springCtx) throws GridException { + @Nullable GridSpringResourceContext springCtx) throws IgniteCheckedException { A.notNull(springCfgUrl, "springCfgUrl"); boolean isLog4jUsed = U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null; @@ -752,7 +752,7 @@ public class GridGainEx { grids.add(grid); } } - catch (GridException e) { + catch (IgniteCheckedException e) { // Stop all instances started so far. for (GridNamedInstance grid : grids) { try { @@ -777,15 +777,15 @@ public class GridGainEx { * * @param startCtx Start context. * @return Started grid. - * @throws GridException If grid could not be started. + * @throws IgniteCheckedException If grid could not be started. */ - private static GridNamedInstance start0(GridStartContext startCtx) throws GridException { + private static GridNamedInstance start0(GridStartContext startCtx) throws IgniteCheckedException { assert startCtx != null; String name = startCtx.config().getGridName(); if (name != null && name.isEmpty()) - throw new GridException("Non default grid instances cannot have empty string name."); + throw new IgniteCheckedException("Non default grid instances cannot have empty string name."); GridNamedInstance grid = new GridNamedInstance(name); @@ -804,9 +804,9 @@ public class GridGainEx { if (old != null) { if (name == null) - throw new GridException("Default grid instance has already been started."); + throw new IgniteCheckedException("Default grid instance has already been started."); else - throw new GridException("Grid instance with this name has already been started: " + name); + throw new IgniteCheckedException("Grid instance with this name has already been started: " + name); } if (startCtx.config().getWarmupClosure() != null) @@ -839,7 +839,7 @@ public class GridGainEx { } if (grid == null) - throw new GridException("Failed to start grid with provided configuration."); + throw new IgniteCheckedException("Failed to start grid with provided configuration."); return grid; } @@ -1243,22 +1243,22 @@ public class GridGainEx { /** * @param spi SPI implementation. - * @throws GridException Thrown in case if multi-instance is not supported. + * @throws IgniteCheckedException Thrown in case if multi-instance is not supported. */ - private void ensureMultiInstanceSupport(IgniteSpi spi) throws GridException { + private void ensureMultiInstanceSupport(IgniteSpi spi) throws IgniteCheckedException { IgniteSpiMultipleInstancesSupport ann = U.getAnnotation(spi.getClass(), IgniteSpiMultipleInstancesSupport.class); if (ann == null || !ann.value()) - throw new GridException("SPI implementation doesn't support multiple grid instances in " + + throw new IgniteCheckedException("SPI implementation doesn't support multiple grid instances in " + "the same VM: " + spi); } /** * @param spis SPI implementations. - * @throws GridException Thrown in case if multi-instance is not supported. + * @throws IgniteCheckedException Thrown in case if multi-instance is not supported. */ - private void ensureMultiInstanceSupport(IgniteSpi[] spis) throws GridException { + private void ensureMultiInstanceSupport(IgniteSpi[] spis) throws IgniteCheckedException { for (IgniteSpi spi : spis) ensureMultiInstanceSupport(spi); } @@ -1267,9 +1267,9 @@ public class GridGainEx { * Starts grid with given configuration. * * @param startCtx Starting context. - * @throws GridException If start failed. + * @throws IgniteCheckedException If start failed. */ - synchronized void start(GridStartContext startCtx) throws GridException { + synchronized void start(GridStartContext startCtx) throws IgniteCheckedException { if (startGuard.compareAndSet(false, true)) { try { starterThread = Thread.currentThread(); @@ -1292,10 +1292,10 @@ public class GridGainEx { /** * @param startCtx Starting context. - * @throws GridException If start failed. + * @throws IgniteCheckedException If start failed. */ @SuppressWarnings({"unchecked", "TooBroadScope"}) - private void start0(GridStartContext startCtx) throws GridException { + private void start0(GridStartContext startCtx) throws IgniteCheckedException { assert grid == null : "Grid is already started: " + name; IgniteConfiguration cfg = startCtx.config(); @@ -1350,7 +1350,7 @@ public class GridGainEx { File ggHomeFile = new File(ggHome); if (!ggHomeFile.exists() || !ggHomeFile.isDirectory()) - throw new GridException("Invalid GridGain installation home folder: " + ggHome); + throw new IgniteCheckedException("Invalid GridGain installation home folder: " + ggHome); } myCfg.setGridGainHome(ggHome); @@ -1446,7 +1446,7 @@ public class GridGainEx { myCfg.setDeploymentMode(depMode); } catch (IllegalArgumentException e) { - throw new GridException("Failed to override deployment mode using system property " + + throw new IgniteCheckedException("Failed to override deployment mode using system property " + "(are there any misspellings?)" + "[name=" + GG_DEP_MODE_OVERRIDE + ", value=" + depModeName + ']', e); } @@ -1816,17 +1816,17 @@ public class GridGainEx { if (cacheCfgs != null && cacheCfgs.length > 0) { if (!U.discoOrdered(discoSpi) && !U.relaxDiscoveryOrdered()) - throw new GridException("Discovery SPI implementation does not support node ordering and " + + throw new IgniteCheckedException("Discovery SPI implementation does not support node ordering and " + "cannot be used with cache (use SPI with @GridDiscoverySpiOrderSupport annotation, " + "like GridTcpDiscoverySpi)"); for (GridCacheConfiguration ccfg : cacheCfgs) { if (CU.isHadoopSystemCache(ccfg.getName())) - throw new GridException("Cache name cannot be \"" + CU.SYS_CACHE_HADOOP_MR + + throw new IgniteCheckedException("Cache name cannot be \"" + CU.SYS_CACHE_HADOOP_MR + "\" because it is reserved for internal purposes."); if (CU.isUtilityCache(ccfg.getName())) - throw new GridException("Cache name cannot start with \"" + CU.UTILITY_CACHE_NAME + + throw new IgniteCheckedException("Cache name cannot start with \"" + CU.UTILITY_CACHE_NAME + "\" because this prefix is reserved for internal purposes."); } @@ -1906,7 +1906,7 @@ public class GridGainEx { started = true; } - catch (GridException e) { + catch (IgniteCheckedException e) { unregisterFactoryMBean(); throw e; @@ -1915,7 +1915,7 @@ public class GridGainEx { catch (Throwable e) { unregisterFactoryMBean(); - throw new GridException("Unexpected exception when starting grid.", e); + throw new IgniteCheckedException("Unexpected exception when starting grid.", e); } finally { if (!started) @@ -1941,7 +1941,7 @@ public class GridGainEx { catch (IllegalStateException e) { stop(true); - throw new GridException("Failed to install shutdown hook.", e); + throw new IgniteCheckedException("Failed to install shutdown hook.", e); } } else { @@ -1955,9 +1955,9 @@ public class GridGainEx { * @param cfgLog Configured logger. * @param nodeId Local node ID. * @return Initialized logger. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private IgniteLogger initLogger(@Nullable IgniteLogger cfgLog, UUID nodeId) throws GridException { + private IgniteLogger initLogger(@Nullable IgniteLogger cfgLog, UUID nodeId) throws IgniteCheckedException { try { if (cfgLog == null) { Class<?> log4jCls; @@ -2014,7 +2014,7 @@ public class GridGainEx { return cfgLog; } catch (Exception e) { - throw new GridException("Failed to create logger.", e); + throw new IgniteCheckedException("Failed to create logger.", e); } } @@ -2183,9 +2183,9 @@ public class GridGainEx { * Registers delegate Mbean instance for {@link org.apache.ignite.Ignition}. * * @param srv MBeanServer where mbean should be registered. - * @throws GridException If registration failed. + * @throws IgniteCheckedException If registration failed. */ - private void registerFactoryMbean(MBeanServer srv) throws GridException { + private void registerFactoryMbean(MBeanServer srv) throws IgniteCheckedException { synchronized (mbeans) { GridMBeanServerData data = mbeans.get(srv); @@ -2201,7 +2201,7 @@ public class GridGainEx { // Make check if MBean was already registered. if (!srv.queryMBeans(objName, null).isEmpty()) - throw new GridException("MBean was already registered: " + objName); + throw new IgniteCheckedException("MBean was already registered: " + objName); else { objName = U.registerMBean( srv, @@ -2221,7 +2221,7 @@ public class GridGainEx { } } catch (JMException e) { - throw new GridException("Failed to register MBean.", e); + throw new IgniteCheckedException("Failed to register MBean.", e); } }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java index 705b33a..1d9369f 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.kernal; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; import java.io.*; @@ -17,7 +17,7 @@ import java.io.*; /** * When log debug mode is disabled this exception should be logged in short form - without stack trace. */ -public class GridInternalException extends GridException { +public class GridInternalException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java index 747a594..7db3f51 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java @@ -228,7 +228,7 @@ public class GridJobContextImpl extends GridMetadataAwareAdapter implements Comp try { return (String)job.getDeployment().annotatedValue(job.getJob(), GridCacheName.class); } - catch (GridException e) { + catch (IgniteCheckedException e) { throw F.wrap(e); } } @@ -238,7 +238,7 @@ public class GridJobContextImpl extends GridMetadataAwareAdapter implements Comp try { return (T)job.getDeployment().annotatedValue(job.getJob(), GridCacheAffinityKeyMapped.class); } - catch (GridException e) { + catch (IgniteCheckedException e) { throw F.wrap(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java index 94b6581..b605753 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java @@ -9,11 +9,11 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.direct.*; -import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.grid.util.tostring.*; +import org.gridgain.grid.util.typedef.internal.*; import org.jetbrains.annotations.*; import java.io.*; @@ -41,7 +41,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** */ @GridDirectTransient - private GridException gridEx; + private IgniteCheckedException gridEx; /** */ private byte[] resBytes; @@ -63,7 +63,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** */ @GridToStringExclude @GridDirectTransient - private GridException fakeEx; + private IgniteCheckedException fakeEx; /** * No-op constructor to support {@link Externalizable} interface. This @@ -86,7 +86,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i * @param isCancelled Whether job was cancelled or not. */ public GridJobExecuteResponse(UUID nodeId, IgniteUuid sesId, IgniteUuid jobId, byte[] gridExBytes, - GridException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, + IgniteCheckedException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, Map<Object, Object> jobAttrs, boolean isCancelled) { assert nodeId != null; assert sesId != null; @@ -142,7 +142,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** * @return Job exception. */ - @Nullable public GridException getException() { + @Nullable public IgniteCheckedException getException() { return gridEx; } @@ -177,14 +177,14 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** * @return Fake exception. */ - public GridException getFakeException() { + public IgniteCheckedException getFakeException() { return fakeEx; } /** * @param fakeEx Fake exception. */ - public void setFakeException(GridException fakeEx) { + public void setFakeException(IgniteCheckedException fakeEx) { this.fakeEx = fakeEx; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java index 9695aa1..e2ef4fb 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java @@ -9,12 +9,13 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.internal.*; import org.jetbrains.annotations.*; + import java.util.*; /** @@ -37,7 +38,7 @@ public class GridJobResultImpl implements ComputeJobResult { private Object data; /** */ - private GridException ex; + private IgniteCheckedException ex; /** */ private boolean hasRes; @@ -96,7 +97,7 @@ public class GridJobResultImpl implements ComputeJobResult { } /** {@inheritDoc} */ - @Override public synchronized GridException getException() { + @Override public synchronized IgniteCheckedException getException() { return ex; } @@ -118,7 +119,7 @@ public class GridJobResultImpl implements ComputeJobResult { * @param jobAttrs Job attributes. * @param isCancelled Whether job was cancelled or not. */ - public synchronized void onResponse(@Nullable Object data, @Nullable GridException ex, + public synchronized void onResponse(@Nullable Object data, @Nullable IgniteCheckedException ex, @Nullable Map<Object, Object> jobAttrs, boolean isCancelled) { this.data = data; this.ex = ex; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java index 4fe43db..429ad54 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.compute.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.future.*; import org.gridgain.grid.util.typedef.internal.*; import org.jetbrains.annotations.*; @@ -118,7 +118,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws GridException { + @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws IgniteCheckedException { if (!isTaskNode()) { Collection<ComputeJobSibling> sibs = ctx.job().requestJobSiblings(this); @@ -139,7 +139,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> getJobSiblings() throws GridException { + @Override public Collection<ComputeJobSibling> getJobSiblings() throws IgniteCheckedException { Collection<ComputeJobSibling> sibs = ses.getJobSiblings(); if (sibs == null) { @@ -160,7 +160,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws GridException { + @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws IgniteCheckedException { for (ComputeJobSibling sib : getJobSiblings()) if (sib.getJobId().equals(jobId)) return sib; @@ -169,7 +169,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttribute(Object key, @Nullable Object val) throws GridException { + @Override public void setAttribute(Object key, @Nullable Object val) throws IgniteCheckedException { setAttributes(Collections.singletonMap(key, val)); } @@ -180,7 +180,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttributes(Map<?, ?> attrs) throws GridException { + @Override public void setAttributes(Map<?, ?> attrs) throws IgniteCheckedException { ses.setAttributes(attrs); if (!isTaskNode()) @@ -226,30 +226,30 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void saveCheckpoint(String key, Object state) throws GridException { + @Override public void saveCheckpoint(String key, Object state) throws IgniteCheckedException { saveCheckpoint(key, state, ComputeTaskSessionScope.SESSION_SCOPE, 0); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, long timeout) - throws GridException { + throws IgniteCheckedException { saveCheckpoint(key, state, scope, timeout, true); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, - long timeout, boolean overwrite) throws GridException { + long timeout, boolean overwrite) throws IgniteCheckedException { ses.saveCheckpoint0(this, key, state, scope, timeout, overwrite); } /** {@inheritDoc} */ @SuppressWarnings({"unchecked"}) - @Override public <T> T loadCheckpoint(String key) throws GridException { + @Override public <T> T loadCheckpoint(String key) throws IgniteCheckedException { return ses.loadCheckpoint0(this, key); } /** {@inheritDoc} */ - @Override public boolean removeCheckpoint(String key) throws GridException { + @Override public boolean removeCheckpoint(String key) throws IgniteCheckedException { return ses.removeCheckpoint0(this, key); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java index 19e3d66..c8efde8 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java @@ -9,12 +9,12 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.grid.util.lang.*; +import org.gridgain.grid.util.typedef.internal.*; import java.io.*; import java.util.*; @@ -129,7 +129,7 @@ public class GridJobSiblingImpl extends GridMetadataAwareAdapter implements Comp } /** {@inheritDoc} */ - @Override public void cancel() throws GridException { + @Override public void cancel() throws IgniteCheckedException { GridTaskSessionImpl ses = ctx.session().getSession(sesId); if (ses == null) { @@ -152,7 +152,7 @@ public class GridJobSiblingImpl extends GridMetadataAwareAdapter implements Comp try { ctx.io().send(node, TOPIC_JOB_CANCEL, new GridJobCancelRequest(ses.getId(), jobId), SYSTEM_POOL); } - catch (GridException e) { + catch (IgniteCheckedException e) { // Avoid stack trace for left nodes. if (ctx.discovery().node(node.id()) != null && ctx.discovery().pingNode(node.id())) U.error(ctx.log(GridJobSiblingImpl.class), "Failed to send cancel request to node " + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingsResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingsResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingsResponse.java index 5e90cdb..b72b03d 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingsResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingsResponse.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.compute.*; import org.apache.ignite.marshaller.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.direct.*; import org.gridgain.grid.util.typedef.internal.*; import org.jetbrains.annotations.*; @@ -59,9 +59,9 @@ public class GridJobSiblingsResponse extends GridTcpCommunicationMessageAdapter /** * @param marsh Marshaller. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - public void unmarshalSiblings(IgniteMarshaller marsh) throws GridException { + public void unmarshalSiblings(IgniteMarshaller marsh) throws IgniteCheckedException { assert marsh != null; if (siblingsBytes != null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java index 7f4b89b..62dc0d4 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java @@ -486,16 +486,16 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param attrs Current attributes. * @param name New attribute name. * @param val New attribute value. - * @throws GridException If duplicated SPI name found. + * @throws IgniteCheckedException If duplicated SPI name found. */ - private void add(Map<String, Object> attrs, String name, @Nullable Serializable val) throws GridException { + private void add(Map<String, Object> attrs, String name, @Nullable Serializable val) throws IgniteCheckedException { assert attrs != null; assert name != null; if (attrs.put(name, val) != null) { if (name.endsWith(ATTR_SPI_CLASS)) // User defined duplicated names for the different SPIs. - throw new GridException("Failed to set SPI attribute. Duplicated SPI name found: " + + throw new IgniteCheckedException("Failed to set SPI attribute. Duplicated SPI name found: " + name.substring(0, name.length() - ATTR_SPI_CLASS.length())); // Otherwise it's a mistake of setting up duplicated attribute. @@ -507,10 +507,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * Notifies life-cycle beans of grid event. * * @param evt Grid event. - * @throws GridException If user threw exception during start. + * @throws IgniteCheckedException If user threw exception during start. */ @SuppressWarnings({"CatchGenericClass"}) - private void notifyLifecycleBeans(LifecycleEventType evt) throws GridException { + private void notifyLifecycleBeans(LifecycleEventType evt) throws IgniteCheckedException { if (!cfg.isDaemon() && cfg.getLifecycleBeans() != null) for (LifecycleBean bean : cfg.getLifecycleBeans()) if (bean != null) @@ -538,11 +538,11 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param cfg Grid configuration to use. * @param utilityCachePool Utility cache pool. * @param errHnd Error handler to use for notification about startup problems. - * @throws GridException Thrown in case of any errors. + * @throws IgniteCheckedException Thrown in case of any errors. */ @SuppressWarnings({"CatchGenericClass", "unchecked"}) public void start(final IgniteConfiguration cfg, ExecutorService utilityCachePool, GridAbsClosure errHnd) - throws GridException { + throws IgniteCheckedException { gw.compareAndSet(null, new GridKernalGatewayImpl(cfg.getGridName())); GridKernalGateway gw = this.gw.get(); @@ -564,7 +564,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } case STOPPING: { - throw new GridException("Grid is in process of being stopped"); + throw new IgniteCheckedException("Grid is in process of being stopped"); } case STOPPED: { @@ -620,7 +620,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe verChecker0.checkForNewVersion(cfg.getExecutorService(), log); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (log.isDebugEnabled()) log.debug("Failed to create GridUpdateNotifier: " + e); } @@ -637,7 +637,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe // with internally reserved names. for (String name : cfg.getUserAttributes().keySet()) if (name.startsWith(ATTR_PREFIX)) - throw new GridException("User attribute has illegal name: '" + name + "'. Note that all names " + + throw new IgniteCheckedException("User attribute has illegal name: '" + name + "'. Note that all names " + "starting with '" + ATTR_PREFIX + "' are reserved for internal use."); // Ack local node user attributes. @@ -822,10 +822,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe stop(true); - if (e instanceof GridException) - throw (GridException)e; + if (e instanceof IgniteCheckedException) + throw (IgniteCheckedException)e; else - throw new GridException(e); + throw new IgniteCheckedException(e); } // Mark start timestamp. @@ -975,7 +975,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe nodes = metrics.getTotalNodes(); cpus = metrics.getTotalCpus(); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { } int pubPoolActiveThreads = 0; @@ -1220,10 +1220,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param cfg Grid configuration. * @param build Build string. * @return Map of all node attributes. - * @throws GridException thrown if was unable to set up attribute. + * @throws IgniteCheckedException thrown if was unable to set up attribute. */ @SuppressWarnings({"SuspiciousMethodCalls", "unchecked", "TypeMayBeWeakened"}) - private Map<String, Object> createNodeAttributes(IgniteConfiguration cfg, String build) throws GridException { + private Map<String, Object> createNodeAttributes(IgniteConfiguration cfg, String build) throws IgniteCheckedException { Map<String, Object> attrs = new HashMap<>(); final String[] incProps = cfg.getIncludeProperties(); @@ -1241,7 +1241,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe log.debug("Added environment properties to node attributes."); } catch (SecurityException e) { - throw new GridException("Failed to add environment properties to node attributes due to " + + throw new IgniteCheckedException("Failed to add environment properties to node attributes due to " + "security violation: " + e.getMessage()); } @@ -1269,7 +1269,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe log.debug("Added system properties to node attributes."); } catch (SecurityException e) { - throw new GridException("Failed to add system properties to node attributes due to security " + + throw new IgniteCheckedException("Failed to add system properties to node attributes due to security " + "violation: " + e.getMessage()); } @@ -1360,15 +1360,15 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe if (cred != null) add(attrs, ATTR_SECURITY_CREDENTIALS, cred); else if (securityEnabled) - throw new GridException("Failed to start node (authentication SPI is configured, " + + throw new IgniteCheckedException("Failed to start node (authentication SPI is configured, " + "by security credentials provider returned null)."); } else if (securityEnabled) - throw new GridException("Failed to start node (authentication SPI is configured, " + + throw new IgniteCheckedException("Failed to start node (authentication SPI is configured, " + "but security credentials provider is not set. Fix the configuration and restart the node)."); } - catch (GridException e) { - throw new GridException("Failed to create node security credentials", e); + catch (IgniteCheckedException e) { + throw new IgniteCheckedException("Failed to create node security credentials", e); } // Stick in SPI versions and classes attributes. @@ -1403,9 +1403,9 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * * @param attrs Node attributes map to add SPI attributes to. * @param spiList Collection of SPIs to get attributes from. - * @throws GridException Thrown if was unable to set up attribute. + * @throws IgniteCheckedException Thrown if was unable to set up attribute. */ - private void addAttributes(Map<String, Object> attrs, IgniteSpi... spiList) throws GridException { + private void addAttributes(Map<String, Object> attrs, IgniteSpi... spiList) throws IgniteCheckedException { for (IgniteSpi spi : spiList) { Class<? extends IgniteSpi> spiCls = spi.getClass(); @@ -1413,8 +1413,8 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } } - /** @throws GridException If registration failed. */ - private void registerKernalMBean() throws GridException { + /** @throws IgniteCheckedException If registration failed. */ + private void registerKernalMBean() throws IgniteCheckedException { try { kernalMBean = U.registerMBean( cfg.getMBeanServer(), @@ -1430,12 +1430,12 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe catch (JMException e) { kernalMBean = null; - throw new GridException("Failed to register kernal MBean.", e); + throw new IgniteCheckedException("Failed to register kernal MBean.", e); } } - /** @throws GridException If registration failed. */ - private void registerLocalNodeMBean() throws GridException { + /** @throws IgniteCheckedException If registration failed. */ + private void registerLocalNodeMBean() throws IgniteCheckedException { ClusterNodeMetricsMBean mbean = new ClusterLocalNodeMetrics(ctx.discovery().localNode()); try { @@ -1453,12 +1453,12 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe catch (JMException e) { locNodeMBean = null; - throw new GridException("Failed to register local node MBean.", e); + throw new IgniteCheckedException("Failed to register local node MBean.", e); } } - /** @throws GridException If registration failed. */ - private void registerExecutorMBeans() throws GridException { + /** @throws IgniteCheckedException If registration failed. */ + private void registerExecutorMBeans() throws IgniteCheckedException { pubExecSvcMBean = registerExecutorMBean(cfg.getExecutorService(), "GridExecutionExecutor"); sysExecSvcMBean = registerExecutorMBean(cfg.getSystemExecutorService(), "GridSystemExecutor"); mgmtExecSvcMBean = registerExecutorMBean(cfg.getManagementExecutorService(), "GridManagementExecutor"); @@ -1476,9 +1476,9 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param exec Executor service to register. * @param name Property name for executor. * @return Name for created MBean. - * @throws GridException If registration failed. + * @throws IgniteCheckedException If registration failed. */ - private ObjectName registerExecutorMBean(ExecutorService exec, String name) throws GridException { + private ObjectName registerExecutorMBean(ExecutorService exec, String name) throws IgniteCheckedException { assert exec != null; try { @@ -1496,7 +1496,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe return res; } catch (JMException e) { - throw new GridException("Failed to register executor service MBean [name=" + name + ", exec=" + exec + ']', + throw new IgniteCheckedException("Failed to register executor service MBean [name=" + name + ", exec=" + exec + ']', e); } } @@ -1530,10 +1530,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param ctx Kernal context. * @param mgr Manager to start. * @param attrs SPI attributes to set. - * @throws GridException Throw in case of any errors. + * @throws IgniteCheckedException Throw in case of any errors. */ private void startManager(GridKernalContextImpl ctx, GridManager mgr, Map<String, Object> attrs) - throws GridException { + throws IgniteCheckedException { mgr.addSpiAttributes(attrs); // Set all node attributes into discovery manager, @@ -1549,8 +1549,8 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { mgr.start(); } - catch (GridException e) { - throw new GridException("Failed to start manager: " + mgr, e); + catch (IgniteCheckedException e) { + throw new IgniteCheckedException("Failed to start manager: " + mgr, e); } } @@ -1558,10 +1558,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param ctx Kernal context. * @param proc Processor to start. * @param attrs Attributes. - * @throws GridException Thrown in case of any error. + * @throws IgniteCheckedException Thrown in case of any error. */ private void startProcessor(GridKernalContextImpl ctx, GridProcessor proc, Map<String, Object> attrs) - throws GridException { + throws IgniteCheckedException { ctx.add(proc); try { @@ -1569,8 +1569,8 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe proc.addAttributes(attrs); } - catch (GridException e) { - throw new GridException("Failed to start processor: " + proc, e); + catch (IgniteCheckedException e) { + throw new IgniteCheckedException("Failed to start processor: " + proc, e); } } @@ -2091,7 +2091,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe false, Arrays.asList(cfg.getAdminEmails())); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to send lifecycle email notification.", e); } } @@ -2490,7 +2490,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { compute().undeployTask(taskName); } - catch (GridException e) { + catch (IgniteCheckedException e) { throw U.jmException(e); } } @@ -2501,7 +2501,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { return compute().<String, String>execute(taskName, arg); } - catch (GridException e) { + catch (IgniteCheckedException e) { throw U.jmException(e); } } @@ -2605,7 +2605,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(File file, boolean restart, - int timeout, int maxConn) throws GridException { + int timeout, int maxConn) throws IgniteCheckedException { return startNodesAsync(file, restart, timeout, maxConn).get(); } @@ -2615,10 +2615,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param timeout Connection timeout. * @param maxConn Number of parallel SSH connections to one host. * @return Future with results. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @see {@link org.apache.ignite.IgniteCluster#startNodes(java.io.File, boolean, int, int)}. */ - IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, int timeout, int maxConn) throws GridException { + IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, int timeout, int maxConn) throws IgniteCheckedException { A.notNull(file, "file"); A.ensure(file.exists(), "file doesn't exist."); A.ensure(file.isFile(), "file is a directory."); @@ -2646,7 +2646,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes( Collection<Map<String, Object>> hosts, @Nullable Map<String, Object> dflts, boolean restart, int timeout, - int maxConn) throws GridException { + int maxConn) throws IgniteCheckedException { return startNodesAsync(hosts, dflts, restart, timeout, maxConn).get(); } @@ -2657,12 +2657,12 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param timeout Connection timeout in milliseconds. * @param maxConn Number of parallel SSH connections to one host. * @return Future with results. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @see {@link org.apache.ignite.IgniteCluster#startNodes(java.util.Collection, java.util.Map, boolean, int, int)}. */ IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync( Collection<Map<String, Object>> hosts, @Nullable Map<String, Object> dflts, boolean restart, int timeout, - int maxConn) throws GridException { + int maxConn) throws IgniteCheckedException { A.notNull(hosts, "hosts"); guard(); @@ -2683,7 +2683,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe addr = InetAddress.getByName(host); } catch (UnknownHostException e) { - throw new GridException("Invalid host name: " + host, e); + throw new IgniteCheckedException("Invalid host name: " + host, e); } Collection<? extends ClusterNode> neighbors = null; @@ -2818,7 +2818,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void stopNodes() throws GridException { + @Override public void stopNodes() throws IgniteCheckedException { guard(); try { @@ -2830,7 +2830,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void stopNodes(Collection<UUID> ids) throws GridException { + @Override public void stopNodes(Collection<UUID> ids) throws IgniteCheckedException { guard(); try { @@ -2842,7 +2842,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void restartNodes() throws GridException { + @Override public void restartNodes() throws IgniteCheckedException { guard(); try { @@ -2854,7 +2854,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void restartNodes(Collection<UUID> ids) throws GridException { + @Override public void restartNodes(Collection<UUID> ids) throws IgniteCheckedException { guard(); try { @@ -3089,7 +3089,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public <K> Map<ClusterNode, Collection<K>> mapKeysToNodes(String cacheName, - @Nullable Collection<? extends K> keys) throws GridException { + @Nullable Collection<? extends K> keys) throws IgniteCheckedException { if (F.isEmpty(keys)) return Collections.emptyMap(); @@ -3104,7 +3104,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Nullable @Override public <K> ClusterNode mapKeyToNode(String cacheName, K key) throws GridException { + @Nullable @Override public <K> ClusterNode mapKeyToNode(String cacheName, K key) throws IgniteCheckedException { A.notNull(key, "key"); guard(); @@ -3204,7 +3204,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void close() throws GridException { + @Override public void close() throws IgniteCheckedException { Ignition.stop(gridName, true); } @@ -3214,9 +3214,9 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @param cls Component interface. * @param ctx Kernal context. * @return Created component. - * @throws GridException If failed to create component. + * @throws IgniteCheckedException If failed to create component. */ - private static <T extends GridComponent> T createComponent(Class<T> cls, GridKernalContext ctx) throws GridException { + private static <T extends GridComponent> T createComponent(Class<T> cls, GridKernalContext ctx) throws IgniteCheckedException { assert cls.isInterface() : cls; T comp = ctx.plugins().createComponent(cls); @@ -3244,10 +3244,10 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } if (implCls == null) - throw new GridException("Failed to find component implementation: " + cls.getName()); + throw new IgniteCheckedException("Failed to find component implementation: " + cls.getName()); if (!cls.isAssignableFrom(implCls)) - throw new GridException("Component implementation does not implement component interface " + + throw new IgniteCheckedException("Component implementation does not implement component interface " + "[component=" + cls.getName() + ", implementation=" + implCls.getName() + ']'); Constructor<T> constructor; @@ -3256,14 +3256,14 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe constructor = implCls.getConstructor(GridKernalContext.class); } catch (NoSuchMethodException e) { - throw new GridException("Component does not have expected constructor: " + implCls.getName(), e); + throw new IgniteCheckedException("Component does not have expected constructor: " + implCls.getName(), e); } try { return constructor.newInstance(ctx); } catch (ReflectiveOperationException e) { - throw new GridException("Failed to create component [component=" + cls.getName() + + throw new IgniteCheckedException("Failed to create component [component=" + cls.getName() + ", implementation=" + implCls.getName() + ']', e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java index 41e435e..b6f4ac8 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java @@ -333,7 +333,7 @@ public class GridKernalContextImpl extends GridMetadataAwareAdapter implements G try { spring = SPRING.create(false); } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { if (log != null && log.isDebugEnabled()) log.debug("Failed to load spring component, will not be able to extract userVersion from " + "META-INF/gridgain.xml."); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java index 820769d..cca5988 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.processors.task.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; @@ -33,7 +33,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Boolean restart) - throws GridException { + throws IgniteCheckedException { assert restart != null; this.restart = restart; @@ -63,7 +63,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { } /** {@inheritDoc} */ - @Override public Void reduce(List<ComputeJobResult> results) throws GridException { + @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException { return null; } @@ -75,7 +75,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { private static final long serialVersionUID = 0L; /** {@inheritDoc} */ - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { if (restart) new Thread(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java index cf004d7..065488b 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java @@ -80,12 +80,12 @@ public class GridLoggerProxy extends GridMetadataAwareAdapter implements IgniteL } /** {@inheritDoc} */ - @Override public void start() throws GridException { + @Override public void start() throws IgniteCheckedException { U.startLifecycleAware(Collections.singleton(impl)); } /** {@inheritDoc} */ - @Override public void stop() throws GridException { + @Override public void stop() throws IgniteCheckedException { U.stopLifecycleAware(this, Collections.singleton(impl)); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridMessageListenHandler.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridMessageListenHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridMessageListenHandler.java index 805d21f..a2e6ecf 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridMessageListenHandler.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridMessageListenHandler.java @@ -9,6 +9,7 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.gridgain.grid.*; import org.gridgain.grid.kernal.managers.deployment.*; @@ -82,7 +83,7 @@ public class GridMessageListenHandler implements GridContinuousHandler { } /** {@inheritDoc} */ - @Override public boolean register(UUID nodeId, UUID routineId, final GridKernalContext ctx) throws GridException { + @Override public boolean register(UUID nodeId, UUID routineId, final GridKernalContext ctx) throws IgniteCheckedException { ctx.io().addUserMessageListener(topic, pred); return true; @@ -104,7 +105,7 @@ public class GridMessageListenHandler implements GridContinuousHandler { } /** {@inheritDoc} */ - @Override public void p2pMarshal(GridKernalContext ctx) throws GridException { + @Override public void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException { assert ctx != null; assert ctx.config().isPeerClassLoadingEnabled(); @@ -129,7 +130,7 @@ public class GridMessageListenHandler implements GridContinuousHandler { } /** {@inheritDoc} */ - @Override public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws GridException { + @Override public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException { assert nodeId != null; assert ctx != null; assert ctx.config().isPeerClassLoadingEnabled(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridPluginComponent.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridPluginComponent.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridPluginComponent.java index 4936ed4..6bef7fd 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridPluginComponent.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridPluginComponent.java @@ -9,10 +9,10 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.plugin.*; import org.apache.ignite.spi.*; -import org.gridgain.grid.*; import org.jetbrains.annotations.*; import java.util.*; @@ -40,17 +40,17 @@ public class GridPluginComponent implements GridComponent { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public void start() throws GridException { + @Override public void start() throws IgniteCheckedException { throw new UnsupportedOperationException(); } /** {@inheritDoc} */ - @Override public void stop(boolean cancel) throws GridException { + @Override public void stop(boolean cancel) throws IgniteCheckedException { plugin.stop(cancel); } /** {@inheritDoc} */ - @Override public void onKernalStart() throws GridException { + @Override public void onKernalStart() throws IgniteCheckedException { plugin.onIgniteStart(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java index 0117f9c..77cb10e 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; -import org.gridgain.grid.*; import org.apache.ignite.plugin.security.*; import org.gridgain.grid.util.future.*; import org.gridgain.grid.util.typedef.internal.*; @@ -67,7 +67,7 @@ public class GridTaskFutureImpl<R> extends GridFutureAdapter<R> implements Compu } /** {@inheritDoc} */ - @Override public boolean cancel() throws GridException { + @Override public boolean cancel() throws IgniteCheckedException { ctx.security().authorize(ses.getTaskName(), GridSecurityPermission.TASK_CANCEL, null); checkValid(); @@ -86,9 +86,9 @@ public class GridTaskFutureImpl<R> extends GridFutureAdapter<R> implements Compu * callback on local jobs. * * @return {@code True} if future was cancelled (i.e. was not finished prior to this call). - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public boolean cancelOnMasterLeave() throws GridException { + public boolean cancelOnMasterLeave() throws IgniteCheckedException { checkValid(); if (onCancelled()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java index 0f85bc9..1466b76 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal; +import org.apache.ignite.*; import org.apache.ignite.compute.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.managers.deployment.*; import org.gridgain.grid.util.future.*; import org.gridgain.grid.util.typedef.*; @@ -450,12 +450,12 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws GridException { + @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws IgniteCheckedException { return getJobSiblings(); } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> getJobSiblings() throws GridException { + @Override public Collection<ComputeJobSibling> getJobSiblings() throws IgniteCheckedException { synchronized (mux) { return siblings; } @@ -486,7 +486,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws GridException { + @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws IgniteCheckedException { A.notNull(jobId, "jobId"); Collection<ComputeJobSibling> tmp = getJobSiblings(); @@ -499,7 +499,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttribute(Object key, Object val) throws GridException { + @Override public void setAttribute(Object key, Object val) throws IgniteCheckedException { A.notNull(key, "key"); checkFullSupport(); @@ -520,7 +520,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttributes(Map<?, ?> attrs) throws GridException { + @Override public void setAttributes(Map<?, ?> attrs) throws IgniteCheckedException { A.notNull(attrs, "attrs"); checkFullSupport(); @@ -635,19 +635,19 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void saveCheckpoint(String key, Object state) throws GridException { + @Override public void saveCheckpoint(String key, Object state) throws IgniteCheckedException { saveCheckpoint(key, state, ComputeTaskSessionScope.SESSION_SCOPE, 0); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, long timeout) - throws GridException { + throws IgniteCheckedException { saveCheckpoint(key, state, scope, timeout, true); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, - long timeout, boolean overwrite) throws GridException { + long timeout, boolean overwrite) throws IgniteCheckedException { saveCheckpoint0(this, key, state, scope, timeout, overwrite); } @@ -658,17 +658,17 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { * @param scope Scope. * @param timeout Timeout. * @param overwrite Overwrite. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ protected void saveCheckpoint0(GridTaskSessionInternal ses, String key, Object state, ComputeTaskSessionScope scope, - long timeout, boolean overwrite) throws GridException { + long timeout, boolean overwrite) throws IgniteCheckedException { assert ses != null; // Internal call, so assert should be enough. A.notNull(key, "key"); A.ensure(timeout >= 0, "timeout >= 0"); if (closed) - throw new GridException("Failed to save checkpoint (session closed): " + ses); + throw new IgniteCheckedException("Failed to save checkpoint (session closed): " + ses); checkFullSupport(); @@ -677,7 +677,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public <T> T loadCheckpoint(String key) throws GridException { + @Override public <T> T loadCheckpoint(String key) throws IgniteCheckedException { return loadCheckpoint0(this, key); } @@ -685,15 +685,15 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { * @param ses Session. * @param key Key. * @return Checkpoint. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - protected <T> T loadCheckpoint0(GridTaskSessionInternal ses, String key) throws GridException { + protected <T> T loadCheckpoint0(GridTaskSessionInternal ses, String key) throws IgniteCheckedException { assert ses != null; // Internal call, so assert should be enough. A.notNull(key, "key"); if (closed) - throw new GridException("Failed to load checkpoint (session closed): " + ses); + throw new IgniteCheckedException("Failed to load checkpoint (session closed): " + ses); checkFullSupport(); @@ -701,7 +701,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public boolean removeCheckpoint(String key) throws GridException { + @Override public boolean removeCheckpoint(String key) throws IgniteCheckedException { return removeCheckpoint0(this, key); } @@ -709,15 +709,15 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal { * @param ses Session. * @param key Key. * @return {@code True} if removed. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - protected boolean removeCheckpoint0(GridTaskSessionInternal ses, String key) throws GridException { + protected boolean removeCheckpoint0(GridTaskSessionInternal ses, String key) throws IgniteCheckedException { assert ses != null; // Internal call, so assert should be enough. A.notNull(key, "key"); if (closed) - throw new GridException("Failed to remove checkpoint (session closed): " + ses); + throw new IgniteCheckedException("Failed to remove checkpoint (session closed): " + ses); checkFullSupport(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/GridUpdateNotifier.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridUpdateNotifier.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridUpdateNotifier.java index f928fcb..98b4c75 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridUpdateNotifier.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridUpdateNotifier.java @@ -86,10 +86,10 @@ class GridUpdateNotifier { * @param site Site. * @param reportOnlyNew Whether or not to report only new version. * @param gw Kernal gateway. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ GridUpdateNotifier(String gridName, String ver, String site, GridKernalGateway gw, boolean reportOnlyNew) - throws GridException { + throws IgniteCheckedException { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); @@ -115,7 +115,7 @@ class GridUpdateNotifier { vmProps = getSystemProperties(); } catch (ParserConfigurationException e) { - throw new GridException("Failed to create xml parser.", e); + throw new IgniteCheckedException("Failed to create xml parser.", e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteClusterAsyncImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteClusterAsyncImpl.java index fcd5a3e..613ce00 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteClusterAsyncImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteClusterAsyncImpl.java @@ -67,45 +67,45 @@ public class IgniteClusterAsyncImpl extends IgniteAsyncSupportAdapter implements /** {@inheritDoc} */ @Override public <K> Map<ClusterNode, Collection<K>> mapKeysToNodes(@Nullable String cacheName, - @Nullable Collection<? extends K> keys) throws GridException { + @Nullable Collection<? extends K> keys) throws IgniteCheckedException { return grid.mapKeysToNodes(cacheName, keys); } /** {@inheritDoc} */ - @Nullable @Override public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key) throws GridException { + @Nullable @Override public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key) throws IgniteCheckedException { return grid.mapKeyToNode(cacheName, key); } /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(File file, - boolean restart, int timeout, int maxConn) throws GridException { + boolean restart, int timeout, int maxConn) throws IgniteCheckedException { return saveOrGet(grid.startNodesAsync(file, restart, timeout, maxConn)); } /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes( Collection<Map<String, Object>> hosts, @Nullable Map<String, Object> dflts, boolean restart, int timeout, - int maxConn) throws GridException { + int maxConn) throws IgniteCheckedException { return saveOrGet(grid.startNodesAsync(hosts, dflts, restart, timeout, maxConn)); } /** {@inheritDoc} */ - @Override public void stopNodes() throws GridException { + @Override public void stopNodes() throws IgniteCheckedException { grid.stopNodes(); } /** {@inheritDoc} */ - @Override public void stopNodes(Collection<UUID> ids) throws GridException { + @Override public void stopNodes(Collection<UUID> ids) throws IgniteCheckedException { grid.stopNodes(ids); } /** {@inheritDoc} */ - @Override public void restartNodes() throws GridException { + @Override public void restartNodes() throws IgniteCheckedException { grid.restartNodes(); } /** {@inheritDoc} */ - @Override public void restartNodes(Collection<UUID> ids) throws GridException { + @Override public void restartNodes(Collection<UUID> ids) throws IgniteCheckedException { grid.restartNodes(ids); } @@ -225,7 +225,7 @@ public class IgniteClusterAsyncImpl extends IgniteAsyncSupportAdapter implements } /** {@inheritDoc} */ - @Override public ClusterMetrics metrics() throws GridException { + @Override public ClusterMetrics metrics() throws IgniteCheckedException { return grid.metrics(); } }