http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteEvents.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteEvents.java b/modules/core/src/main/java/org/apache/ignite/IgniteEvents.java index 4993f91..728320e 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteEvents.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteEvents.java @@ -62,10 +62,10 @@ public interface IgniteEvents extends IgniteAsyncSupport { * @param timeout Maximum time to wait for result, {@code 0} to wait forever. * @param types Event types to be queried. * @return Collection of grid events returned from specified nodes. - * @throws GridException If query failed. + * @throws IgniteCheckedException If query failed. */ public <T extends IgniteEvent> List<T> remoteQuery(IgnitePredicate<T> p, long timeout, @Nullable int... types) - throws GridException; + throws IgniteCheckedException; /** * Adds event listener for specified events to all nodes in the projection (possibly including @@ -89,10 +89,10 @@ public interface IgniteEvents extends IgniteAsyncSupport { * provided remote filter will be sent to local node. * @param <T> Type of the event. * @return {@code Operation ID} that can be passed to {@link #stopRemoteListen(UUID)} method to stop listening. - * @throws GridException If failed to add listener. + * @throws IgniteCheckedException If failed to add listener. */ public <T extends IgniteEvent> UUID remoteListen(@Nullable IgniteBiPredicate<UUID, T> locLsnr, - @Nullable IgnitePredicate<T> rmtFilter, @Nullable int... types) throws GridException; + @Nullable IgnitePredicate<T> rmtFilter, @Nullable int... types) throws IgniteCheckedException; /** * Adds event listener for specified events to all nodes in the projection (possibly including @@ -127,11 +127,11 @@ public interface IgniteEvents extends IgniteAsyncSupport { * @param <T> Type of the event. * @return {@code Operation ID} that can be passed to {@link #stopRemoteListen(UUID)} method to stop listening. * @see #stopRemoteListen(UUID) - * @throws GridException If failed to add listener. + * @throws IgniteCheckedException If failed to add listener. */ public <T extends IgniteEvent> UUID remoteListen(int bufSize, long interval, boolean autoUnsubscribe, @Nullable IgniteBiPredicate<UUID, T> locLsnr, @Nullable IgnitePredicate<T> rmtFilter, - @Nullable int... types) throws GridException; + @Nullable int... types) throws IgniteCheckedException; /** * Stops listening to remote events. This will unregister all listeners identified with provided @@ -142,9 +142,9 @@ public interface IgniteEvents extends IgniteAsyncSupport { * @param opId Operation ID that was returned from * {@link #remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)} method. * @see #remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...) - * @throws GridException If failed to stop listeners. + * @throws IgniteCheckedException If failed to stop listeners. */ - public void stopRemoteListen(UUID opId) throws GridException; + public void stopRemoteListen(UUID opId) throws IgniteCheckedException; /** * Waits for the specified events. @@ -155,10 +155,10 @@ public interface IgniteEvents extends IgniteAsyncSupport { * end the wait. * @param types Types of the events to wait for. If not provided, all events will be passed to the filter. * @return Grid event. - * @throws GridException If wait was interrupted. + * @throws IgniteCheckedException If wait was interrupted. */ public <T extends IgniteEvent> T waitForLocal(@Nullable IgnitePredicate<T> filter, @Nullable int... types) - throws GridException; + throws IgniteCheckedException; /** * Queries local node for events using passed-in predicate filter for event selection.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteException.java b/modules/core/src/main/java/org/apache/ignite/IgniteException.java index d80e1e2..29c4a61 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteException.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteException.java @@ -86,7 +86,7 @@ public class IgniteException extends RuntimeException { * Adds troubleshooting links if they where not added by below in {@code cause} hierarchy. */ @Override public String getMessage() { - return X.hasCauseExcludeRoot(this, IgniteException.class, GridRuntimeException.class) ? + return X.hasCauseExcludeRoot(this, IgniteException.class, IgniteException.class) ? super.getMessage() : errorMessageWithHelpUrls(super.getMessage()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java index 11e4732..279ac37 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java @@ -76,19 +76,19 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param path Path to get information for. * @return Summary object. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path is not found. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public IgniteFsPathSummary summary(IgniteFsPath path) throws GridException; + public IgniteFsPathSummary summary(IgniteFsPath path) throws IgniteCheckedException; /** * Opens a file for reading. * * @param path File path to read. * @return File input stream to read data from. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist. */ - public IgniteFsInputStream open(IgniteFsPath path) throws GridException; + public IgniteFsInputStream open(IgniteFsPath path) throws IgniteCheckedException; /** * Opens a file for reading. @@ -96,10 +96,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param path File path to read. * @param bufSize Read buffer size (bytes) or {@code zero} to use default value. * @return File input stream to read data from. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist. */ - @Override public IgniteFsInputStream open(IgniteFsPath path, int bufSize) throws GridException; + @Override public IgniteFsInputStream open(IgniteFsPath path, int bufSize) throws IgniteCheckedException; /** * Opens a file for reading. @@ -108,10 +108,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param bufSize Read buffer size (bytes) or {@code zero} to use default value. * @param seqReadsBeforePrefetch Amount of sequential reads before prefetch is started. * @return File input stream to read data from. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist. */ - public IgniteFsInputStream open(IgniteFsPath path, int bufSize, int seqReadsBeforePrefetch) throws GridException; + public IgniteFsInputStream open(IgniteFsPath path, int bufSize, int seqReadsBeforePrefetch) throws IgniteCheckedException; /** * Creates a file and opens it for writing. @@ -119,9 +119,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param path File path to create. * @param overwrite Overwrite file if it already exists. Note: you cannot overwrite an existent directory. * @return File output stream to write data to. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - @Override public IgniteFsOutputStream create(IgniteFsPath path, boolean overwrite) throws GridException; + @Override public IgniteFsOutputStream create(IgniteFsPath path, boolean overwrite) throws IgniteCheckedException; /** * Creates a file and opens it for writing. @@ -133,10 +133,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param blockSize Block size. * @param props File properties to set. * @return File output stream to write data to. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ @Override public IgniteFsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite, int replication, - long blockSize, @Nullable Map<String, String> props) throws GridException; + long blockSize, @Nullable Map<String, String> props) throws IgniteCheckedException; /** * Creates a file and opens it for writing. @@ -150,11 +150,11 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param blockSize Block size. * @param props File properties to set. * @return File output stream to write data to. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ public IgniteFsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite, @Nullable IgniteUuid affKey, int replication, long blockSize, @Nullable Map<String, String> props) - throws GridException; + throws IgniteCheckedException; /** * Opens an output stream to an existing file for appending data. @@ -162,10 +162,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param path File path to append. * @param create Create file if it doesn't exist yet. * @return File output stream to append data to. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist and create flag is {@code false}. */ - public IgniteFsOutputStream append(IgniteFsPath path, boolean create) throws GridException; + public IgniteFsOutputStream append(IgniteFsPath path, boolean create) throws IgniteCheckedException; /** * Opens an output stream to an existing file for appending data. @@ -175,11 +175,11 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param create Create file if it doesn't exist yet. * @param props File properties to set only in case it file was just created. * @return File output stream to append data to. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist and create flag is {@code false}. */ @Override public IgniteFsOutputStream append(IgniteFsPath path, int bufSize, boolean create, - @Nullable Map<String, String> props) throws GridException; + @Nullable Map<String, String> props) throws IgniteCheckedException; /** * Sets last access time and last modification time for a given path. If argument is {@code null}, @@ -190,9 +190,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param modificationTime Optional last modification time to set. Value {@code -1} does not update * modification time. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If target was not found. - * @throws GridException If error occurred. + * @throws IgniteCheckedException If error occurred. */ - public void setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws GridException; + public void setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws IgniteCheckedException; /** * Gets affinity block locations for data blocks of the file, i.e. the nodes, on which the blocks @@ -202,10 +202,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param start Position in the file to start affinity resolution from. * @param len Size of data in the file to resolve affinity for. * @return Affinity block locations. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist. */ - public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len) throws GridException; + public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len) throws IgniteCheckedException; /** * Get affinity block locations for data blocks of the file. In case {@code maxLen} parameter is set and @@ -217,26 +217,26 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param len Size of data in the file to resolve affinity for. * @param maxLen Maximum length of a single returned block location length. * @return Affinity block locations. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. * @throws org.apache.ignite.fs.IgniteFsFileNotFoundException If path doesn't exist. */ public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len, long maxLen) - throws GridException; + throws IgniteCheckedException; /** * Gets metrics snapshot for this file system. * * @return Metrics. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - public IgniteFsMetrics metrics() throws GridException; + public IgniteFsMetrics metrics() throws IgniteCheckedException; /** * Resets metrics for this file system. * - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - public void resetMetrics() throws GridException; + public void resetMetrics() throws IgniteCheckedException; /** * Determines size of the file denoted by provided path. In case if path is a directory, then @@ -244,18 +244,18 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * * @param path File system path. * @return Total size. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - public long size(IgniteFsPath path) throws GridException; + public long size(IgniteFsPath path) throws IgniteCheckedException; /** * Formats the file system removing all existing entries from it. * <p> * Supports asynchronous execution (see {@link IgniteAsyncSupport}). * - * @throws GridException In case format has failed. + * @throws IgniteCheckedException In case format has failed. */ - public void format() throws GridException; + public void format() throws IgniteCheckedException; /** * Executes GGFS task. @@ -267,10 +267,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param paths Collection of paths to be processed within this task. * @param arg Optional task argument. * @return Task result. - * @throws GridException If execution failed. + * @throws IgniteCheckedException If execution failed. */ public <T, R> R execute(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr, - Collection<IgniteFsPath> paths, @Nullable T arg) throws GridException; + Collection<IgniteFsPath> paths, @Nullable T arg) throws IgniteCheckedException; /** * Executes GGFS task with overridden maximum range length (see @@ -287,11 +287,11 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * GGFS blocks will be included. * @param arg Optional task argument. * @return Task result. - * @throws GridException If execution failed. + * @throws IgniteCheckedException If execution failed. */ public <T, R> R execute(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg) - throws GridException; + throws IgniteCheckedException; /** * Executes GGFS task. @@ -303,10 +303,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param paths Collection of paths to be processed within this task. * @param arg Optional task argument. * @return Task result. - * @throws GridException If execution failed. + * @throws IgniteCheckedException If execution failed. */ public <T, R> R execute(Class<? extends IgniteFsTask<T, R>> taskCls, - @Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, @Nullable T arg) throws GridException; + @Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, @Nullable T arg) throws IgniteCheckedException; /** * Executes GGFS task with overridden maximum range length (see @@ -322,11 +322,11 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport { * @param maxRangeLen Maximum range length. * @param arg Optional task argument. * @return Task result. - * @throws GridException If execution failed. + * @throws IgniteCheckedException If execution failed. */ public <T, R> R execute(Class<? extends IgniteFsTask<T, R>> taskCls, @Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, boolean skipNonExistentFiles, - long maxRangeLen, @Nullable T arg) throws GridException; + long maxRangeLen, @Nullable T arg) throws IgniteCheckedException; /** {@inheritDoc} */ @Override public IgniteFs enableAsync(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java b/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java index 44fe314..9aaa644 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java @@ -141,9 +141,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * * @param name Service name. * @param svc Service instance. - * @throws GridException If failed to deploy service. + * @throws IgniteCheckedException If failed to deploy service. */ - public void deployClusterSingleton(String name, ManagedService svc) throws GridException; + public void deployClusterSingleton(String name, ManagedService svc) throws IgniteCheckedException; /** * Deploys a per-node singleton service. GridGain will guarantee that there is always @@ -158,9 +158,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * * @param name Service name. * @param svc Service instance. - * @throws GridException If failed to deploy service. + * @throws IgniteCheckedException If failed to deploy service. */ - public void deployNodeSingleton(String name, ManagedService svc) throws GridException; + public void deployNodeSingleton(String name, ManagedService svc) throws IgniteCheckedException; /** * Deploys one instance of this service on the primary node for a given affinity key. @@ -193,10 +193,10 @@ public interface IgniteManaged extends IgniteAsyncSupport { * @param cacheName Name of the cache on which affinity for key should be calculated, {@code null} for * default cache. * @param affKey Affinity cache key. - * @throws GridException If failed to deploy service. + * @throws IgniteCheckedException If failed to deploy service. */ public void deployKeyAffinitySingleton(String name, ManagedService svc, @Nullable String cacheName, Object affKey) - throws GridException; + throws IgniteCheckedException; /** * Deploys multiple instances of the service on the grid. GridGain will deploy a @@ -228,9 +228,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * @param svc Service instance. * @param totalCnt Maximum number of deployed services in the grid, {@code 0} for unlimited. * @param maxPerNodeCnt Maximum number of deployed services on each node, {@code 0} for unlimited. - * @throws GridException If failed to deploy service. + * @throws IgniteCheckedException If failed to deploy service. */ - public void deployMultiple(String name, ManagedService svc, int totalCnt, int maxPerNodeCnt) throws GridException; + public void deployMultiple(String name, ManagedService svc, int totalCnt, int maxPerNodeCnt) throws IgniteCheckedException; /** * Deploys multiple instances of the service on the grid according to provided @@ -268,9 +268,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * </pre> * * @param cfg Service configuration. - * @throws GridException If failed to deploy service. + * @throws IgniteCheckedException If failed to deploy service. */ - public void deploy(ManagedServiceConfiguration cfg) throws GridException; + public void deploy(ManagedServiceConfiguration cfg) throws IgniteCheckedException; /** * Cancels service deployment. If a service with specified name was deployed on the grid, @@ -283,9 +283,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * Supports asynchronous execution (see {@link IgniteAsyncSupport}). * * @param name Name of service to cancel. - * @throws GridException If failed to cancel service. + * @throws IgniteCheckedException If failed to cancel service. */ - public void cancel(String name) throws GridException; + public void cancel(String name) throws IgniteCheckedException; /** * Cancels all deployed services. @@ -295,9 +295,9 @@ public interface IgniteManaged extends IgniteAsyncSupport { * <p> * Supports asynchronous execution (see {@link IgniteAsyncSupport}). * - * @throws GridException If failed to cancel services. + * @throws IgniteCheckedException If failed to cancel services. */ - public void cancelAll() throws GridException; + public void cancelAll() throws IgniteCheckedException; /** * Gets metadata about all deployed services. @@ -335,7 +335,7 @@ public interface IgniteManaged extends IgniteAsyncSupport { * service or try to load-balance between services. * @return Either proxy over remote service or local service if it is deployed locally. */ - public <T> T serviceProxy(String name, Class<? super T> svcItf, boolean sticky) throws GridRuntimeException; + public <T> T serviceProxy(String name, Class<? super T> svcItf, boolean sticky) throws IgniteException; /** {@inheritDoc} */ @Override public IgniteManaged enableAsync(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java index 1f0187a..f11b3a6 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java @@ -57,10 +57,10 @@ public interface IgniteMessaging extends IgniteAsyncSupport { * * @param topic Topic to send to, {@code null} for default topic. * @param msg Message to send. - * @throws GridException If failed to send a message to any of the nodes. + * @throws IgniteCheckedException If failed to send a message to any of the nodes. * @throws org.apache.ignite.cluster.ClusterGroupEmptyException Thrown in case when this projection is empty. */ - public void send(@Nullable Object topic, Object msg) throws GridException; + public void send(@Nullable Object topic, Object msg) throws IgniteCheckedException; /** * Sends given messages with specified topic to the nodes in this projection. @@ -68,10 +68,10 @@ public interface IgniteMessaging extends IgniteAsyncSupport { * @param topic Topic to send to, {@code null} for default topic. * @param msgs Messages to send. Order of the sending is undefined. If the method produces * the exception none or some messages could have been sent already. - * @throws GridException If failed to send a message to any of the nodes. + * @throws IgniteCheckedException If failed to send a message to any of the nodes. * @throws org.apache.ignite.cluster.ClusterGroupEmptyException Thrown in case when this projection is empty. */ - public void send(@Nullable Object topic, Collection<?> msgs) throws GridException; + public void send(@Nullable Object topic, Collection<?> msgs) throws IgniteCheckedException; /** * Sends given message with specified topic to the nodes in this projection. Messages sent with @@ -87,10 +87,10 @@ public interface IgniteMessaging extends IgniteAsyncSupport { * @param msg Message to send. * @param timeout Message timeout in milliseconds, {@code 0} for default * which is {@link org.apache.ignite.configuration.IgniteConfiguration#getNetworkTimeout()}. - * @throws GridException If failed to send a message to any of the nodes. + * @throws IgniteCheckedException If failed to send a message to any of the nodes. * @throws org.apache.ignite.cluster.ClusterGroupEmptyException Thrown in case when this projection is empty. */ - public void sendOrdered(@Nullable Object topic, Object msg, long timeout) throws GridException; + public void sendOrdered(@Nullable Object topic, Object msg, long timeout) throws IgniteCheckedException; /** * Adds local listener for given topic on local node only. This listener will be notified whenever any @@ -123,9 +123,9 @@ public interface IgniteMessaging extends IgniteAsyncSupport { * @param p Predicate that is called on each node for each received message. If predicate returns {@code false}, * then it will be unsubscribed from any further notifications. * @return {@code Operation ID} that can be passed to {@link #stopRemoteListen(UUID)} method to stop listening. - * @throws GridException If failed to add listener. + * @throws IgniteCheckedException If failed to add listener. */ - public UUID remoteListen(@Nullable Object topic, IgniteBiPredicate<UUID, ?> p) throws GridException; + public UUID remoteListen(@Nullable Object topic, IgniteBiPredicate<UUID, ?> p) throws IgniteCheckedException; /** * Unregisters all listeners identified with provided operation ID on all nodes in this projection. @@ -133,9 +133,9 @@ public interface IgniteMessaging extends IgniteAsyncSupport { * Supports asynchronous execution (see {@link IgniteAsyncSupport}). * * @param opId Listen ID that was returned from {@link #remoteListen(Object, org.apache.ignite.lang.IgniteBiPredicate)} method. - * @throws GridException If failed to unregister listeners. + * @throws IgniteCheckedException If failed to unregister listeners. */ - public void stopRemoteListen(UUID opId) throws GridException; + public void stopRemoteListen(UUID opId) throws IgniteCheckedException; /** {@inheritDoc} */ @Override http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java b/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java index ce4699e..59fe5f7 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java @@ -30,7 +30,7 @@ import java.util.concurrent.*; * <pre name="code" class="java"> * GridGain.grid().scheduler().scheduleLocal( * GridSchedulerFuture<?> = GridGain.grid().scheduler().scheduleLocal(new Callable<Object>() { - * @Override public Object call() throws GridException { + * @Override public Object call() throws IgniteCheckedException { * g.broadcast(new GridCallable() {...}).get(); * } * }, "{2, 5} * * * * *" // 2 seconds delay with 5 executions only. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java index a37154e..418c7bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java @@ -60,9 +60,9 @@ public interface IgniteStreamer { * * @param evt Event to add. * @param evts Optional events to add. - * @throws GridException If event submission failed. + * @throws IgniteCheckedException If event submission failed. */ - public void addEvent(Object evt, Object... evts) throws GridException; + public void addEvent(Object evt, Object... evts) throws IgniteCheckedException; /** * Submits group of events to streamer. Events will be processed from a stage with specified name. @@ -70,27 +70,27 @@ public interface IgniteStreamer { * @param stageName Stage name to start with. * @param evt Event tp process. * @param evts Optional events. - * @throws GridException If event submission failed. + * @throws IgniteCheckedException If event submission failed. */ - public void addEventToStage(String stageName, Object evt, Object... evts) throws GridException; + public void addEventToStage(String stageName, Object evt, Object... evts) throws IgniteCheckedException; /** * Submits group of events for processing. This group of events will be processed on default stage, * i.e. stage that is the first in the streamer stages list. * * @param evts Events to add. - * @throws GridException If event submission failed. + * @throws IgniteCheckedException If event submission failed. */ - public void addEvents(Collection<?> evts) throws GridException; + public void addEvents(Collection<?> evts) throws IgniteCheckedException; /** * Submits events to streamer. Events will be processed from a stage with specified name. * * @param stageName Stage name to start with. * @param evts Events to process. - * @throws GridException If event submission failed. + * @throws IgniteCheckedException If event submission failed. */ - public void addEventsToStage(String stageName, Collection<?> evts) throws GridException; + public void addEventsToStage(String stageName, Collection<?> evts) throws IgniteCheckedException; /** * Gets streamer context. Streamer context provides access to streamer local space on this node, configured http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java index 353feec..061ec38 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java @@ -83,11 +83,11 @@ public interface IgniteTransactions { * @param isolation Cache transaction isolation level. * @return Started transaction. * @throws IllegalStateException If transaction is already started by this thread. - * @throws GridException If local node is not primary for any of provided keys. + * @throws IgniteCheckedException If local node is not primary for any of provided keys. * @throws UnsupportedOperationException If cache is {@link GridCacheAtomicityMode#ATOMIC}. */ public GridCacheTx txStartAffinity(Object affinityKey, GridCacheTxConcurrency concurrency, - GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, GridException; + GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException; /** * Starts {@code partition-group-locked} transaction based on partition ID. In this mode the whole partition @@ -119,11 +119,11 @@ public interface IgniteTransactions { * @param isolation Cache transaction isolation level. * @return Started transaction. * @throws IllegalStateException If transaction is already started by this thread. - * @throws GridException If local node is not primary for any of provided keys. + * @throws IgniteCheckedException If local node is not primary for any of provided keys. * @throws UnsupportedOperationException If cache is {@link GridCacheAtomicityMode#ATOMIC}. */ public GridCacheTx txStartPartition(int partId, GridCacheTxConcurrency concurrency, - GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, GridException; + GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException; /** * Gets transaction started by this thread or {@code null} if this thread does http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/Ignition.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/Ignition.java b/modules/core/src/main/java/org/apache/ignite/Ignition.java index b4bfa12..1a8d17f 100644 --- a/modules/core/src/main/java/org/apache/ignite/Ignition.java +++ b/modules/core/src/main/java/org/apache/ignite/Ignition.java @@ -261,10 +261,10 @@ public class Ignition { * 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 GridGainEx.start(); } @@ -274,10 +274,10 @@ public class Ignition { * * @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 GridGainEx.start(cfg); } @@ -293,11 +293,11 @@ public class Ignition { * @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 GridGainEx.start(springCfgPath); } @@ -313,11 +313,11 @@ public class Ignition { * @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 GridGainEx.start(springCfgUrl); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java index e508d1e..91892e8 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java @@ -9,7 +9,7 @@ package org.apache.ignite.cache.query; -import org.gridgain.grid.*; +import org.apache.ignite.*; import javax.cache.*; import javax.cache.event.*; @@ -191,9 +191,9 @@ public final class QueryContinuousPredicate<K, V> extends QueryPredicate<K, V> i * cancelled, it's non-operational. If you need to repeat execution, use {@link * org.gridgain.grid.cache.query.GridCacheQueries#createContinuousQuery()} method to create new query. * - * @throws org.gridgain.grid.GridException In case of error. + * @throws IgniteCheckedException In case of error. */ - @Override public void close() throws GridException { + @Override public void close() throws IgniteCheckedException { // TODO: implement. } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java index 47f91c3..0035a25 100644 --- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java +++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java @@ -243,7 +243,7 @@ public interface ClusterGroup { * Gets a metrics snapshot for this projection. * * @return Grid projection metrics snapshot. - * @throws org.gridgain.grid.GridException If projection is empty. + * @throws IgniteCheckedException If projection is empty. */ - public ClusterMetrics metrics() throws GridException; + public ClusterMetrics metrics() throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java index bcc7dbe..879e6bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java +++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java @@ -9,13 +9,13 @@ package org.apache.ignite.cluster; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** * This exception is used to indicate error with grid topology (e.g., crashed node, etc.). */ -public class ClusterTopologyException extends GridException { +public class ClusterTopologyException 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/apache/ignite/compute/ComputeExecutionRejectedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeExecutionRejectedException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeExecutionRejectedException.java index c7a1bee..ff526b9 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeExecutionRejectedException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeExecutionRejectedException.java @@ -9,7 +9,7 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -18,7 +18,7 @@ import org.jetbrains.annotations.*; * rejects execution. * @see org.apache.ignite.configuration.IgniteConfiguration#getExecutorService() */ -public class ComputeExecutionRejectedException extends GridException { +public class ComputeExecutionRejectedException 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/apache/ignite/compute/ComputeJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java index 3d38b2d..48926c6 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java @@ -9,8 +9,9 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; + import java.io.*; import java.util.*; @@ -150,11 +151,11 @@ public interface ComputeJob extends Serializable { * @return Job execution result (possibly {@code null}). This result will be returned * in {@link ComputeJobResult#getData()} method passed into * {@link ComputeTask#result(ComputeJobResult, List)} task method on caller node. - * @throws GridException If job execution caused an exception. This exception will be + * @throws IgniteCheckedException If job execution caused an exception. This exception will be * returned in {@link ComputeJobResult#getException()} method passed into * {@link ComputeTask#result(ComputeJobResult, List)} task method on caller node. * If execution produces a {@link RuntimeException} or {@link Error}, then - * it will be wrapped into {@link GridException}. + * it will be wrapped into {@link IgniteCheckedException}. */ - @Nullable public Object execute() throws GridException; + @Nullable public Object execute() throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobContinuationAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobContinuationAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobContinuationAdapter.java index 9c6ab66..f9fff7f 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobContinuationAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobContinuationAdapter.java @@ -35,13 +35,13 @@ import org.jetbrains.annotations.*; * private int multiplier = 3; * * @Override - * protected Collection<? extends ComputeJob> split(int gridSize, final String arg) throws GridException { + * protected Collection<? extends ComputeJob> split(int gridSize, final String arg) throws IgniteCheckedException { * List<GridComputeJobAdapter<String>> jobs = new ArrayList<GridComputeJobAdapter<String>>(gridSize); * * for (int i = 0; i < gridSize; i++) { * jobs.add(new GridComputeJobAdapter() { * // Job execution logic. - * public Object execute() throws GridException { + * public Object execute() throws IgniteCheckedException { * return multiplier * arg.length(); * } * }); @@ -52,7 +52,7 @@ import org.jetbrains.annotations.*; * * // Aggregate multiple job results into * // one task result. - * public Integer reduce(List<GridComputeJobResult> results) throws GridException { + * public Integer reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * int sum = 0; * * // For the sake of this example, let's sum all results. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobFailoverException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobFailoverException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobFailoverException.java index 7758ba6..2441587 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobFailoverException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobFailoverException.java @@ -9,7 +9,7 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; import java.util.concurrent.*; @@ -20,7 +20,7 @@ import java.util.concurrent.*; * {@link org.apache.ignite.lang.IgniteClosure}, {@link Callable}, or {@link Runnable} instance passed into * any of the {@link org.apache.ignite.IgniteCompute} methods can also throw this exception to force failover. */ -public class ComputeJobFailoverException extends GridRuntimeException { +public class ComputeJobFailoverException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobMasterLeaveAware.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobMasterLeaveAware.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobMasterLeaveAware.java index c1eea67..ab4ab6a 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobMasterLeaveAware.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobMasterLeaveAware.java @@ -1,6 +1,6 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Annotation for handling master node leave during job execution. @@ -17,7 +17,7 @@ public interface ComputeJobMasterLeaveAware { * A method which is executed in case master node has left topology during job execution. * * @param ses Task session, can be used for checkpoint saving. - * @throws GridException In case of any exception. + * @throws IgniteCheckedException In case of any exception. */ - public void onMasterNodeLeft(ComputeTaskSession ses) throws GridException; + public void onMasterNodeLeft(ComputeTaskSession ses) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java index 087bb73..7c9ae3e 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java @@ -9,8 +9,8 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; -import org.gridgain.grid.*; import java.util.*; @@ -49,7 +49,7 @@ public interface ComputeJobResult { * Gets exception produced by execution of remote job, or {@code null} if * remote execution finished normally and did not produce any exceptions. * - * @return {@link GridException} produced by execution of remote job or {@code null} if + * @return {@link IgniteCheckedException} produced by execution of remote job or {@code null} if * no exception was produced. * <p> * Note that if remote job resulted in {@link RuntimeException} @@ -62,7 +62,7 @@ public interface ComputeJobResult { * If node on which job was computing failed, then {@link org.apache.ignite.cluster.ClusterTopologyException} is * returned. */ - public GridException getException(); + public IgniteCheckedException getException(); /** * Gets local instance of remote job returned by {@link ComputeTask#map(List, Object)} method. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java index 5156045..330196a 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java @@ -9,6 +9,7 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.gridgain.grid.*; @@ -31,7 +32,7 @@ public interface ComputeJobSibling extends GridMetadataAware { /** * Sends a request to cancel this sibling. * - * @throws GridException If cancellation message could not be sent. + * @throws IgniteCheckedException If cancellation message could not be sent. */ - public void cancel() throws GridException; + public void cancel() throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java index 640b708..e4ee221 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java @@ -9,6 +9,7 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.gridgain.grid.*; import org.jetbrains.annotations.*; @@ -33,7 +34,7 @@ import java.util.*; * <pre name="code" class="java"> * public class MyFooBarTask extends GridComputeTaskSplitAdapter<String> { * @Override - * protected Collection<? extends ComputeJob> split(int gridSize, String arg) throws GridException { + * protected Collection<? extends ComputeJob> split(int gridSize, String arg) throws IgniteCheckedException { * List<MyFooBarJob> jobs = new ArrayList<MyFooBarJob>(gridSize); * * for (int i = 0; i < gridSize; i++) { @@ -59,7 +60,7 @@ import java.util.*; * GridComputeLoadBalancer balancer; * * // Map jobs to grid nodes. - * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws GridException { + * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws IgniteCheckedException { * Map<MyFooBarJob, GridNode> jobs = new HashMap<MyFooBarJob, GridNode>(subgrid.size()); * * // In more complex cases, you can actually do @@ -75,7 +76,7 @@ import java.util.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws GridException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -100,8 +101,8 @@ public interface ComputeLoadBalancer extends GridMetadataAware { * @param exclNodes Optional collection of nodes that should be excluded from balanced nodes. * If collection is {@code null} or empty - no nodes will be excluded. * @return Next balanced node. - * @throws GridException If any error occurred when finding next balanced node. + * @throws IgniteCheckedException If any error occurred when finding next balanced node. */ @Nullable public ClusterNode getBalancedNode(ComputeJob job, @Nullable Collection<ClusterNode> exclNodes) - throws GridException; + throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java index 3e64544..b3d90f3 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java @@ -9,8 +9,8 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; -import org.gridgain.grid.*; import org.jetbrains.annotations.*; import java.io.*; @@ -153,7 +153,7 @@ import java.util.*; * GridComputeLoadBalancer balancer; * * // Map jobs to grid nodes. - * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws GridException { + * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws IgniteCheckedException { * Map<MyFooBarJob, GridNode> jobs = new HashMap<MyFooBarJob, GridNode>(subgrid.size()); * * // In more complex cases, you can actually do @@ -167,7 +167,7 @@ import java.util.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws GridException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -192,7 +192,7 @@ import java.util.*; * <pre name="code" class="java"> * public class MyFooBarTask extends GridComputeTaskSplitAdapter<Object, String> { * @Override - * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws GridException { + * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { * List<MyFooBarJob> jobs = new ArrayList<MyFooBarJob>(gridSize); * * for (int i = 0; i < gridSize; i++) { @@ -205,7 +205,7 @@ import java.util.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws GridException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -239,10 +239,10 @@ public interface ComputeTask<T, R> extends Serializable { * over time should result into all nodes being used equally. * @return Map of grid jobs assigned to subgrid node. Unless {@link ComputeTaskContinuousMapper} is * injected into task, if {@code null} or empty map is returned, exception will be thrown. - * @throws GridException If mapping could not complete successfully. This exception will be + * @throws IgniteCheckedException If mapping could not complete successfully. This exception will be * thrown out of {@link ComputeTaskFuture#get()} method. */ - @Nullable public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable T arg) throws GridException; + @Nullable public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable T arg) throws IgniteCheckedException; /** * Asynchronous callback invoked every time a result from remote execution is @@ -256,10 +256,10 @@ public interface ComputeTask<T, R> extends Serializable { * {@link ComputeTaskNoResultCache} annotation, then this list will be empty. * @return Result policy that dictates how to process further upcoming * job results. - * @throws GridException If handling a job result caused an error. This exception will + * @throws IgniteCheckedException If handling a job result caused an error. This exception will * be thrown out of {@link ComputeTaskFuture#get()} method. */ - public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException; + public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException; /** * Reduces (or aggregates) results received so far into one compound result to be returned to @@ -272,8 +272,8 @@ public interface ComputeTask<T, R> extends Serializable { * @param results Received results of broadcasted remote executions. Note that if task class has * {@link ComputeTaskNoResultCache} annotation, then this list will be empty. * @return Grid job result constructed from results of remote executions. - * @throws GridException If reduction or results caused an error. This exception will + * @throws IgniteCheckedException If reduction or results caused an error. This exception will * be thrown out of {@link ComputeTaskFuture#get()} method. */ - @Nullable public R reduce(List<ComputeJobResult> results) throws GridException; + @Nullable public R reduce(List<ComputeJobResult> results) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java index 5081dfb..bcb3715 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java @@ -9,6 +9,7 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.gridgain.grid.*; @@ -24,7 +25,7 @@ import java.util.*; * GridComputeLoadBalancer balancer; * * // Map jobs to grid nodes. - * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws GridException { + * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws IgniteCheckedException { * Map<MyFooBarJob, GridNode> jobs = new HashMap<MyFooBarJob, GridNode>(subgrid.size()); * * // In more complex cases, you can actually do @@ -38,7 +39,7 @@ import java.util.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws GridException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -76,11 +77,11 @@ public abstract class ComputeTaskAdapter<T, R> implements ComputeTask<T, R> { * @param rcvd All previously received results. * @return Result policy that dictates how to process further upcoming * job results. - * @throws GridException If handling a job result caused an error effectively rejecting + * @throws IgniteCheckedException If handling a job result caused an error effectively rejecting * a failover. This exception will be thrown out of {@link ComputeTaskFuture#get()} method. */ - @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException { - GridException e = res.getException(); + @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException { + IgniteCheckedException e = res.getException(); // Try to failover if result is failed. if (e != null) { @@ -91,7 +92,7 @@ public abstract class ComputeTaskAdapter<T, R> implements ComputeTask<T, R> { e.hasCause(ComputeJobFailoverException.class)) return ComputeJobResultPolicy.FAILOVER; - throw new GridException("Remote job threw user exception (override or implement GridComputeTask.result(..) " + + throw new IgniteCheckedException("Remote job threw user exception (override or implement GridComputeTask.result(..) " + "method if you would like to have automatic failover for this exception).", e); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskCancelledException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskCancelledException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskCancelledException.java index 9a95b1c..7f79a4c 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskCancelledException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskCancelledException.java @@ -9,13 +9,13 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** * This exception indicates that grid task was cancelled. */ -public class ComputeTaskCancelledException extends GridException { +public class ComputeTaskCancelledException 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/apache/ignite/compute/ComputeTaskContinuousMapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskContinuousMapper.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskContinuousMapper.java index fa5a205..e43c06f 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskContinuousMapper.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskContinuousMapper.java @@ -9,8 +9,8 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; -import org.gridgain.grid.*; import java.util.*; @@ -59,33 +59,33 @@ public interface ComputeTaskContinuousMapper { * * @param job Job instance to send. If {@code null} is passed, exception will be thrown. * @param node Grid node. If {@code null} is passed, exception will be thrown. - * @throws GridException If job can not be processed. + * @throws IgniteCheckedException If job can not be processed. */ - public void send(ComputeJob job, ClusterNode node) throws GridException; + public void send(ComputeJob job, ClusterNode node) throws IgniteCheckedException; /** * Sends collection of grid jobs to assigned nodes. * * @param mappedJobs Map of grid jobs assigned to grid node. If {@code null} * or empty list is passed, exception will be thrown. - * @throws GridException If job can not be processed. + * @throws IgniteCheckedException If job can not be processed. */ - public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) throws GridException; + public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) throws IgniteCheckedException; /** * Sends job to a node automatically picked by the underlying load balancer. * * @param job Job instance to send. If {@code null} is passed, exception will be thrown. - * @throws GridException If job can not be processed. + * @throws IgniteCheckedException If job can not be processed. */ - public void send(ComputeJob job) throws GridException; + public void send(ComputeJob job) throws IgniteCheckedException; /** * Sends collection of jobs to nodes automatically picked by the underlying load balancer. * * @param jobs Collection of grid job instances. If {@code null} or empty * list is passed, exception will be thrown. - * @throws GridException If job can not be processed. + * @throws IgniteCheckedException If job can not be processed. */ - public void send(Collection<? extends ComputeJob> jobs) throws GridException; + public void send(Collection<? extends ComputeJob> jobs) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java index 4f27235..70d4934 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java @@ -9,8 +9,8 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import java.util.*; import java.util.concurrent.*; @@ -27,21 +27,21 @@ public interface ComputeTaskFuture<R> extends IgniteFuture<R> { * * @throws ComputeTaskTimeoutException If task execution timed out. */ - @Override public R get() throws GridException; + @Override public R get() throws IgniteCheckedException; /** * {@inheritDoc} * * @throws ComputeTaskTimeoutException If task execution timed out. */ - @Override public R get(long timeout) throws GridException; + @Override public R get(long timeout) throws IgniteCheckedException; /** * {@inheritDoc} * * @throws ComputeTaskTimeoutException If task execution timed out. */ - @Override public R get(long timeout, TimeUnit unit) throws GridException; + @Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException; /** * Gets task session of execution grid task. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java index 2de71a6..9ac37ff 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java @@ -9,8 +9,8 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.jetbrains.annotations.*; import java.util.*; @@ -150,9 +150,9 @@ public interface ComputeTaskSession { * job siblings will be requested from task node for each apply. * * @return Collection of grid job siblings executing within this task. - * @throws GridException If job siblings can not be received from task node. + * @throws IgniteCheckedException If job siblings can not be received from task node. */ - public Collection<ComputeJobSibling> getJobSiblings() throws GridException; + public Collection<ComputeJobSibling> getJobSiblings() throws IgniteCheckedException; /** * Refreshes collection of job siblings. This method has no effect when invoked @@ -162,9 +162,9 @@ public interface ComputeTaskSession { * will re-request list of siblings from originating node. * * @return Refreshed collection of job siblings. - * @throws GridException If refresh failed. + * @throws IgniteCheckedException If refresh failed. */ - public Collection<ComputeJobSibling> refreshJobSiblings() throws GridException; + public Collection<ComputeJobSibling> refreshJobSiblings() throws IgniteCheckedException; /** * Gets job sibling for a given ID. @@ -175,9 +175,9 @@ public interface ComputeTaskSession { * * @param jobId Job ID to get the sibling for. * @return Grid job sibling for a given ID. - * @throws GridException If job sibling can not be received from task node. + * @throws IgniteCheckedException If job sibling can not be received from task node. */ - @Nullable public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws GridException; + @Nullable public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws IgniteCheckedException; /** * Sets session attributed. Note that task session is distributed and @@ -190,9 +190,9 @@ public interface ComputeTaskSession { * * @param key Attribute key. * @param val Attribute value. Can be {@code null}. - * @throws GridException If sending of attribute message failed. + * @throws IgniteCheckedException If sending of attribute message failed. */ - public void setAttribute(Object key, @Nullable Object val) throws GridException; + public void setAttribute(Object key, @Nullable Object val) throws IgniteCheckedException; /** * Gets an attribute set by {@link #setAttribute(Object, Object)} or {@link #setAttributes(Map)} @@ -217,9 +217,9 @@ public interface ComputeTaskSession { * This method is no-op if the session has finished. * * @param attrs Attributes to set. - * @throws GridException If sending of attribute message failed. + * @throws IgniteCheckedException If sending of attribute message failed. */ - public void setAttributes(Map<?, ?> attrs) throws GridException; + public void setAttributes(Map<?, ?> attrs) throws IgniteCheckedException; /** * Gets all attributes. @@ -315,12 +315,12 @@ public interface ComputeTaskSession { * * @param key Key to be used to load this checkpoint in future. * @param state Intermediate job state to save. - * @throws GridException If failed to save intermediate job state. + * @throws IgniteCheckedException If failed to save intermediate job state. * @see #loadCheckpoint(String) * @see #removeCheckpoint(String) * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ - public void saveCheckpoint(String key, Object state) throws GridException; + public void saveCheckpoint(String key, Object state) throws IgniteCheckedException; /** * Saves intermediate state of a job to a storage. The storage implementation is defined @@ -344,13 +344,13 @@ public interface ComputeTaskSession { * timeout expires. * @param timeout Maximum time this state should be kept by the underlying storage. Value {@code 0} means that * timeout will never expire. - * @throws GridException If failed to save intermediate job state. + * @throws IgniteCheckedException If failed to save intermediate job state. * @see #loadCheckpoint(String) * @see #removeCheckpoint(String) * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, long timeout) - throws GridException; + throws IgniteCheckedException; /** * Saves intermediate state of a job or task to a storage. The storage implementation is defined @@ -375,13 +375,13 @@ public interface ComputeTaskSession { * @param timeout Maximum time this state should be kept by the underlying storage. Value <tt>0</tt> means that * timeout will never expire. * @param overwrite Whether or not overwrite checkpoint if it already exists. - * @throws GridException If failed to save intermediate job state. + * @throws IgniteCheckedException If failed to save intermediate job state. * @see #loadCheckpoint(String) * @see #removeCheckpoint(String) * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, long timeout, - boolean overwrite) throws GridException; + boolean overwrite) throws IgniteCheckedException; /** * Loads job's state previously saved via {@link #saveCheckpoint(String, Object, ComputeTaskSessionScope, long)} @@ -396,11 +396,11 @@ public interface ComputeTaskSession { * @param key Key for intermediate job state to load. * @param <T> Type of the checkpoint state. * @return Previously saved state or {@code null} if no state was found for a given {@code key}. - * @throws GridException If failed to load job state. + * @throws IgniteCheckedException If failed to load job state. * @see #removeCheckpoint(String) * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ - @Nullable public <T> T loadCheckpoint(String key) throws GridException; + @Nullable public <T> T loadCheckpoint(String key) throws IgniteCheckedException; /** * Removes previously saved job's state for a given {@code key} from an underlying storage. @@ -412,11 +412,11 @@ public interface ComputeTaskSession { * * @param key Key for intermediate job state to load. * @return {@code true} if job state was removed, {@code false} if state was not found. - * @throws GridException If failed to remove job state. + * @throws IgniteCheckedException If failed to remove job state. * @see #loadCheckpoint(String) * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ - public boolean removeCheckpoint(String key) throws GridException; + public boolean removeCheckpoint(String key) throws IgniteCheckedException; /** * Gets a collection of grid nodes IDs. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java index 9189252..ab80844 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSplitAdapter.java @@ -9,9 +9,9 @@ package org.apache.ignite.compute; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.resources.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; @@ -27,7 +27,7 @@ import java.util.*; * <pre name="code" class="java"> * public class MyFooBarTask extends GridComputeTaskSplitAdapter<Object, String> { * @Override - * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws GridException { + * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { * List<MyFooBarJob> jobs = new ArrayList<MyFooBarJob>(gridSize); * * for (int i = 0; i < gridSize; i++) { @@ -40,7 +40,7 @@ import java.util.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws GridException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -83,22 +83,22 @@ public abstract class ComputeTaskSplitAdapter<T, R> extends ComputeTaskAdapter<T * available grid nodes. Note that if number of jobs is greater than number of * grid nodes (i.e, grid size), the grid nodes will be reused and some jobs * will end up on the same grid nodes. - * @throws GridException Thrown in case of any errors. + * @throws IgniteCheckedException Thrown in case of any errors. * * @see ComputeTask#map(List, Object) */ - protected abstract Collection<? extends ComputeJob> split(int gridSize, T arg) throws GridException; + protected abstract Collection<? extends ComputeJob> split(int gridSize, T arg) throws IgniteCheckedException; /** {@inheritDoc} */ @Override public final Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, T arg) - throws GridException { + throws IgniteCheckedException { assert subgrid != null; assert !subgrid.isEmpty(); Collection<? extends ComputeJob> jobs = split(subgrid.size(), arg); if (F.isEmpty(jobs)) - throw new GridException("Split returned no jobs."); + throw new IgniteCheckedException("Split returned no jobs."); Map<ComputeJob, ClusterNode> map = U.newHashMap(jobs.size()); @@ -106,7 +106,7 @@ public abstract class ComputeTaskSplitAdapter<T, R> extends ComputeTaskAdapter<T ClusterNode old = map.put(job, balancer.getBalancedNode(job, null)); if (old != null) - throw new GridException("Failed to map task (same job instance is being mapped more than once) " + + throw new IgniteCheckedException("Failed to map task (same job instance is being mapped more than once) " + "[job=" + job + ", task=" + this + ']'); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java index 2bac452..e2690be 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java @@ -9,14 +9,14 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** * This exception indicates that task execution timed out. It is thrown from * {@link ComputeTaskFuture#get()} method. */ -public class ComputeTaskTimeoutException extends GridException { +public class ComputeTaskTimeoutException 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/apache/ignite/compute/ComputeUserUndeclaredException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeUserUndeclaredException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeUserUndeclaredException.java index fa8d1f6..bec56d2 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeUserUndeclaredException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeUserUndeclaredException.java @@ -9,7 +9,7 @@ package org.apache.ignite.compute; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -17,7 +17,7 @@ import org.jetbrains.annotations.*; * assumed the code in grid task, grid job or SPI. In most cases it should be an indication of unrecoverable * error condition such as assertion, {@link NullPointerException}, {@link OutOfMemoryError}, etc. */ -public class ComputeUserUndeclaredException extends GridException { +public class ComputeUserUndeclaredException 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/apache/ignite/compute/gridify/Gridify.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/gridify/Gridify.java b/modules/core/src/main/java/org/apache/ignite/compute/gridify/Gridify.java index 9c60164..86e4344 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/gridify/Gridify.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/gridify/Gridify.java @@ -83,7 +83,7 @@ import java.lang.annotation.*; * })); * } * - * public Integer reduce(List<GridComputeJobResult> results) throws GridException { + * public Integer reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { * return results.size() - 1 + F.sum(F.<Integer>jobResults(results)); * } * } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyInterceptor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyInterceptor.java b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyInterceptor.java index 5b61e55..09832bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyInterceptor.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyInterceptor.java @@ -9,7 +9,8 @@ package org.apache.ignite.compute.gridify; -import org.gridgain.grid.*; +import org.apache.ignite.*; + import java.lang.annotation.*; /** @@ -27,7 +28,7 @@ public interface GridifyInterceptor { * @param gridify Gridify annotation instance that caused the grid-enabling. * @param arg Gridify argument. * @return {@code True} if method should be grid-enabled, {@code false} otherwise. - * @throws GridException Thrown in case of any errors. + * @throws IgniteCheckedException Thrown in case of any errors. */ - public boolean isGridify(Annotation gridify, GridifyArgument arg) throws GridException; + public boolean isGridify(Annotation gridify, GridifyArgument arg) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyRuntimeException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyRuntimeException.java b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyRuntimeException.java index 7fae5db..882d5bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyRuntimeException.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifyRuntimeException.java @@ -9,13 +9,13 @@ package org.apache.ignite.compute.gridify; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * This defines gridify exception. This runtime exception gets thrown out of gridified * methods in case if method execution resulted in undeclared exception. */ -public class GridifyRuntimeException extends GridRuntimeException { +public class GridifyRuntimeException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/apache/ignite/compute/gridify/aop/GridifyDefaultRangeTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/compute/gridify/aop/GridifyDefaultRangeTask.java b/modules/core/src/main/java/org/apache/ignite/compute/gridify/aop/GridifyDefaultRangeTask.java index 0135022..13c73bc 100644 --- a/modules/core/src/main/java/org/apache/ignite/compute/gridify/aop/GridifyDefaultRangeTask.java +++ b/modules/core/src/main/java/org/apache/ignite/compute/gridify/aop/GridifyDefaultRangeTask.java @@ -104,13 +104,13 @@ public class GridifyDefaultRangeTask extends ComputeTaskAdapter<GridifyRangeArgu /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, GridifyRangeArgument arg) - throws GridException { + throws IgniteCheckedException { assert !subgrid.isEmpty() : "Subgrid should not be empty: " + subgrid; assert ignite != null : "Grid instance could not be injected"; if (splitSize < threshold && splitSize != 0 && threshold != 0) { - throw new GridException("Incorrect Gridify annotation parameters. Value for parameter " + + throw new IgniteCheckedException("Incorrect Gridify annotation parameters. Value for parameter " + "'splitSize' should not be less than parameter 'threshold' [splitSize=" + splitSize + ", threshold=" + threshold + ']'); } @@ -125,7 +125,7 @@ public class GridifyDefaultRangeTask extends ComputeTaskAdapter<GridifyRangeArgu } if (exclNodes.size() == subgrid.size()) - throw new GridException("Failed to execute on grid where all nodes excluded."); + throw new IgniteCheckedException("Failed to execute on grid where all nodes excluded."); } int inputPerNode = splitSize; @@ -176,7 +176,7 @@ public class GridifyDefaultRangeTask extends ComputeTaskAdapter<GridifyRangeArgu } /** {@inheritDoc} */ - @Override public final Collection<?> reduce(List<ComputeJobResult> results) throws GridException { + @Override public final Collection<?> reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results.size() >= 1; Collection<Object> data = new ArrayList<>(results.size());