You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/11 14:13:55 UTC
[18/51] [partial] incubator-ignite git commit: Rename GridException
to IgniteCheckedException, GridRuntimeException to IgniteException.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
index 01a1500..97ffd0e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
@@ -140,7 +140,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
}
/** {@inheritDoc} */
- @Override public void start() throws GridException {
+ @Override public void start() throws IgniteCheckedException {
GridIpcSharedMemoryNativeLoader.load();
pid = GridIpcSharedMemoryUtils.pid();
@@ -188,7 +188,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
/** {@inheritDoc} */
@SuppressWarnings("ErrorNotRethrown")
- @Override public GridIpcEndpoint accept() throws GridException {
+ @Override public GridIpcEndpoint accept() throws IgniteCheckedException {
while (!Thread.currentThread().isInterrupted()) {
Socket sock = null;
@@ -284,7 +284,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
sendErrorResponse(out, e);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
LT.error(log, e, "Failed to process incoming shared memory connection.");
sendErrorResponse(out, e);
@@ -303,7 +303,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
}
catch (IOException e) {
if (!Thread.currentThread().isInterrupted() && !accepted)
- throw new GridException("Failed to accept incoming connection.", e);
+ throw new IgniteCheckedException("Failed to accept incoming connection.", e);
if (!closed)
LT.error(log, null, "Failed to process incoming shared memory connection: " + e.getMessage());
@@ -443,9 +443,9 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
* Sets configuration properties from the map.
*
* @param endpointCfg Map of properties.
- * @throws GridException If invalid property name or value.
+ * @throws IgniteCheckedException If invalid property name or value.
*/
- public void setupConfiguration(Map<String, String> endpointCfg) throws GridException {
+ public void setupConfiguration(Map<String, String> endpointCfg) throws IgniteCheckedException {
for (Map.Entry<String,String> e : endpointCfg.entrySet()) {
try {
switch (e.getKey()) {
@@ -468,14 +468,14 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
break;
default:
- throw new GridException("Invalid property '" + e.getKey() + "' of " + getClass().getSimpleName());
+ throw new IgniteCheckedException("Invalid property '" + e.getKey() + "' of " + getClass().getSimpleName());
}
}
catch (Throwable t) {
- if (t instanceof GridException)
+ if (t instanceof IgniteCheckedException)
throw t;
- throw new GridException("Invalid value '" + e.getValue() + "' of the property '" + e.getKey() + "' in " +
+ throw new IgniteCheckedException("Invalid value '" + e.getValue() + "' of the property '" + e.getKey() + "' in " +
getClass().getSimpleName(), t);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpace.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpace.java b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpace.java
index 616ed99..6d81561 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpace.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpace.java
@@ -70,10 +70,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param size Size in bytes.
* @param reader {@code True} if reader.
* @param parent Parent logger.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
public GridIpcSharedMemorySpace(String tokFileName, int writerPid, int readerPid, int size, boolean reader,
- IgniteLogger parent) throws GridException {
+ IgniteLogger parent) throws IgniteCheckedException {
assert size > 0 : "Size cannot be less than 1 byte";
log = parent.getLogger(GridIpcSharedMemorySpace.class);
@@ -105,10 +105,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param reader Reader flag.
* @param shmemId Shared memory ID.
* @param parent Logger.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
public GridIpcSharedMemorySpace(String tokFileName, int writerPid, int readerPid, int size, boolean reader,
- int shmemId, IgniteLogger parent) throws GridException {
+ int shmemId, IgniteLogger parent) throws IgniteCheckedException {
assert size > 0 : "Size cannot be less than 1 byte";
log = parent.getLogger(GridIpcSharedMemorySpace.class);
@@ -130,10 +130,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param off Offset.
* @param len Length.
* @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
- public void write(byte[] buf, int off, int len, long timeout) throws GridException,
+ public void write(byte[] buf, int off, int len, long timeout) throws IgniteCheckedException,
GridIpcSharedMemoryOperationTimedoutException {
assert buf != null;
assert len > 0;
@@ -146,7 +146,7 @@ public class GridIpcSharedMemorySpace implements Closeable {
try {
if (closed.get())
- throw new GridException("Shared memory segment has been closed: " + this);
+ throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
GridIpcSharedMemoryUtils.writeSharedMemory(shmemPtr, buf, off, len, timeout);
}
@@ -160,10 +160,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param off Offset.
* @param len Length.
* @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
- public void write(ByteBuffer buf, int off, int len, long timeout) throws GridException,
+ public void write(ByteBuffer buf, int off, int len, long timeout) throws IgniteCheckedException,
GridIpcSharedMemoryOperationTimedoutException {
assert buf != null;
assert len > 0;
@@ -175,7 +175,7 @@ public class GridIpcSharedMemorySpace implements Closeable {
try {
if (closed.get())
- throw new GridException("Shared memory segment has been closed: " + this);
+ throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
GridIpcSharedMemoryUtils.writeSharedMemoryByteBuffer(shmemPtr, buf, off, len, timeout);
}
@@ -192,10 +192,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param len Length.
* @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
* @return Read bytes count.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
- public int read(byte[] buf, int off, int len, long timeout) throws GridException,
+ public int read(byte[] buf, int off, int len, long timeout) throws IgniteCheckedException,
GridIpcSharedMemoryOperationTimedoutException{
assert buf != null;
assert len > 0;
@@ -207,7 +207,7 @@ public class GridIpcSharedMemorySpace implements Closeable {
try {
if (closed.get())
- throw new GridException("Shared memory segment has been closed: " + this);
+ throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
return (int) GridIpcSharedMemoryUtils.readSharedMemory(shmemPtr, buf, off, len, timeout);
}
@@ -224,10 +224,10 @@ public class GridIpcSharedMemorySpace implements Closeable {
* @param len Length.
* @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
* @return Read bytes count.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
- public int read(ByteBuffer buf, int off, int len, long timeout) throws GridException,
+ public int read(ByteBuffer buf, int off, int len, long timeout) throws IgniteCheckedException,
GridIpcSharedMemoryOperationTimedoutException{
assert buf != null;
assert len > 0;
@@ -238,7 +238,7 @@ public class GridIpcSharedMemorySpace implements Closeable {
try {
if (closed.get())
- throw new GridException("Shared memory segment has been closed: " + this);
+ throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
return (int) GridIpcSharedMemoryUtils.readSharedMemoryByteBuffer(shmemPtr, buf, off, len, timeout);
}
@@ -302,14 +302,14 @@ public class GridIpcSharedMemorySpace implements Closeable {
/**
* @return Bytes available for read.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public int unreadCount() throws GridException {
+ public int unreadCount() throws IgniteCheckedException {
lock.readLock().lock();
try {
if (closed.get())
- throw new GridException("Shared memory segment has been closed: " + this);
+ throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
return GridIpcSharedMemoryUtils.unreadCount(shmemPtr);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryUtils.java
index a8b71d5..29e22d5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryUtils.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.ipc.shmem;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.internal.*;
import java.io.*;
@@ -29,10 +29,10 @@ public class GridIpcSharedMemoryUtils {
* @param size Memory space size in bytes.
* @param debug {@code True} to output debug to stdout (will set global flag).
* @return Shared memory pointer.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
static native long allocateSystemResources(String tokFileName, int size, boolean debug)
- throws GridException;
+ throws IgniteCheckedException;
/**
* Attaches to previously allocated shared memory segment.
@@ -40,9 +40,9 @@ public class GridIpcSharedMemoryUtils {
* @param shmemId OS shared memory segment ID.
* @param debug {@code True} to output debug to stdout (will set global flag).
* @return Shared memory pointer.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- static native long attach(int shmemId, boolean debug) throws GridException;
+ static native long attach(int shmemId, boolean debug) throws IgniteCheckedException;
/**
* Stops IPC communication. Call {@link #freeSystemResources(String, long, boolean)} after this call.
@@ -75,11 +75,11 @@ public class GridIpcSharedMemoryUtils {
* @param size Size.
* @param timeout Operation timeout.
* @return Read bytes count.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
static native long readSharedMemory(long shMemPtr, byte dest[], long dOff, long size, long timeout)
- throws GridException, GridIpcSharedMemoryOperationTimedoutException;
+ throws IgniteCheckedException, GridIpcSharedMemoryOperationTimedoutException;
/**
* @param shmemPtr Shared memory pointer.
@@ -106,11 +106,11 @@ public class GridIpcSharedMemoryUtils {
* @param size Size.
* @param timeout Operation timeout.
* @return Read bytes count.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
static native long readSharedMemoryByteBuffer(long shMemPtr, ByteBuffer dest, long dOff, long size, long timeout)
- throws GridException, GridIpcSharedMemoryOperationTimedoutException;
+ throws IgniteCheckedException, GridIpcSharedMemoryOperationTimedoutException;
/**
* @param shMemPtr Shared memory pointer
@@ -118,11 +118,11 @@ public class GridIpcSharedMemoryUtils {
* @param sOff Offset.
* @param size Size.
* @param timeout Operation timeout.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
static native void writeSharedMemory(long shMemPtr, byte src[], long sOff, long size, long timeout)
- throws GridException, GridIpcSharedMemoryOperationTimedoutException;
+ throws IgniteCheckedException, GridIpcSharedMemoryOperationTimedoutException;
/**
* @param shMemPtr Shared memory pointer
@@ -130,11 +130,11 @@ public class GridIpcSharedMemoryUtils {
* @param sOff Offset.
* @param size Size.
* @param timeout Operation timeout.
- * @throws GridException If space has been closed.
+ * @throws IgniteCheckedException If space has been closed.
* @throws GridIpcSharedMemoryOperationTimedoutException If operation times out.
*/
static native void writeSharedMemoryByteBuffer(long shMemPtr, ByteBuffer src, long sOff, long size, long timeout)
- throws GridException, GridIpcSharedMemoryOperationTimedoutException;
+ throws IgniteCheckedException, GridIpcSharedMemoryOperationTimedoutException;
/** @return PID of the current process (-1 on error). */
public static int pid() {
@@ -176,8 +176,8 @@ public class GridIpcSharedMemoryUtils {
* @param e Link error.
* @return Wrapping grid exception.
*/
- static GridException linkError(UnsatisfiedLinkError e) {
- return new GridException("Linkage error due to possible native library, libggshmem.so, " +
+ static IgniteCheckedException linkError(UnsatisfiedLinkError e) {
+ return new IgniteCheckedException("Linkage error due to possible native library, libggshmem.so, " +
"version mismatch (stop all grid nodes, clean up your '/tmp' folder, and try again).", e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsClosureX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsClosureX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsClosureX.java
index aeb3bc5..4884545 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsClosureX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsClosureX.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient abs-closure subclass that allows for thrown grid exception. This class
* implements {@link #apply()} method that calls {@link #applyx()} method
- * and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
*/
public abstract class GridAbsClosureX extends GridAbsClosure {
/** */
@@ -26,15 +26,15 @@ public abstract class GridAbsClosureX extends GridAbsClosure {
try {
applyx();
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Closure body that can throw {@link GridException}.
+ * Closure body that can throw {@link IgniteCheckedException}.
*
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract void applyx() throws GridException;
+ public abstract void applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsPredicateX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsPredicateX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsPredicateX.java
index 96d9d7e..09ed650 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsPredicateX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridAbsPredicateX.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient predicate subclass that allows for thrown grid exception. This class
* implements {@link #apply()} method that calls {@link #applyx()} method
- * and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
*/
public abstract class GridAbsPredicateX implements GridAbsPredicate {
/** {@inheritDoc} */
@@ -23,16 +23,16 @@ public abstract class GridAbsPredicateX implements GridAbsPredicate {
try {
return applyx();
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Predicate body that can throw {@link GridException}.
+ * Predicate body that can throw {@link IgniteCheckedException}.
*
* @return Return value.
- * @throws GridException Thrown in case of any error condition inside of the predicate.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the predicate.
*/
- public abstract boolean applyx() throws GridException;
+ public abstract boolean applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridCloseableIterator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridCloseableIterator.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridCloseableIterator.java
index 5dfccb5..624feda 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridCloseableIterator.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridCloseableIterator.java
@@ -9,8 +9,8 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
/**
* Defines "rich" closeable iterator interface that is also acts like lambda function and iterable.
@@ -41,9 +41,9 @@ public interface GridCloseableIterator<T> extends GridIterator<T>, IgniteSpiClos
* The method is invoked automatically on objects managed by the
* {@code try-with-resources} statement.
*
- * @throws GridException In case of error.
+ * @throws IgniteCheckedException In case of error.
*/
- @Override public void close() throws GridException;
+ @Override public void close() throws IgniteCheckedException;
/**
* Checks if iterator has been closed.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosure3X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosure3X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosure3X.java
index 1a86cbb..c9c2440 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosure3X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosure3X.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object, Object)} method that calls
- * {@link #applyx(Object, Object, Object)} method and properly wraps {@link GridException}
+ * {@link #applyx(Object, Object, Object)} method and properly wraps {@link IgniteCheckedException}
* into {@link GridClosureException} instance.
* @see CX3
*/
@@ -25,19 +25,19 @@ public abstract class GridClosure3X<E1, E2, E3, R> implements GridClosure3<E1, E
try {
return applyx(e1, e2, e3);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Closure body that can throw {@link GridException}.
+ * Closure body that can throw {@link IgniteCheckedException}.
*
* @param e1 First bound free variable, i.e. the element the closure is called or closed on.
* @param e2 Second bound free variable, i.e. the element the closure is called or closed on.
* @param e3 Third bound free variable, i.e. the element the closure is called or closed on.
* @return Optional return value.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract R applyx(E1 e1, E2 e2, E3 e3) throws GridException;
+ public abstract R applyx(E1 e1, E2 e2, E3 e3) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosureException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosureException.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosureException.java
index 8330ee5..7f99b09 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosureException.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridClosureException.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* This exception provides closures with facility to throw exceptions. Closures can't
@@ -18,12 +18,12 @@ import org.gridgain.grid.*;
*
* @see GridFunc#wrap(Throwable)
*/
-public class GridClosureException extends GridRuntimeException {
+public class GridClosureException extends IgniteException {
/** */
private static final long serialVersionUID = 0L;
/**
- * Creates wrapper closure exception for given {@link GridException}.
+ * Creates wrapper closure exception for given {@link IgniteCheckedException}.
*
* @param e Exception to wrap.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
index 84d7006..3fe0590 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
@@ -9,6 +9,7 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -86,7 +87,7 @@ public class GridComputeJobWrapper extends GridMetadataAwareAdapter implements C
}
/** {@inheritDoc} */
- @Override public Object execute() throws GridException {
+ @Override public Object execute() throws IgniteCheckedException {
return job.execute();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
index c8ce968..3b31ecf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
@@ -9,6 +9,7 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
@@ -353,7 +354,7 @@ public class GridFunc {
try {
return ((GridCacheEntry)o).get();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw new GridClosureException(e);
}
}
@@ -382,7 +383,7 @@ public class GridFunc {
try {
return ((GridCacheEntry)o).get() != null;
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw new GridClosureException(e);
}
}
@@ -399,7 +400,7 @@ public class GridFunc {
try {
return ((GridCacheEntry)o).get() == null;
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw new GridClosureException(e);
}
}
@@ -1513,7 +1514,7 @@ public class GridFunc {
* Here's the typical example of how this method is used in {@code reduce()} method
* implementation (this example sums up all the values of {@code Integer} type):
* <pre name="code" class="java">
- * public Integer reduce(List<GridComputeJobResult> res) throws GridException {
+ * public Integer reduce(List<GridComputeJobResult> res) throws IgniteCheckedException {
* return F.sum(F.<Integer>jobResults(res));
* }
* </pre>
@@ -2733,7 +2734,7 @@ public class GridFunc {
return fut.get();
}
catch (Exception e) {
- throw new GridRuntimeException(e);
+ throw new IgniteException(e);
}
}
};
@@ -2771,8 +2772,8 @@ public class GridFunc {
try {
return fut.cancel();
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
else
@@ -2797,7 +2798,7 @@ public class GridFunc {
catch (GridInterruptedException ignore) {
throw new InterruptedException("The computation was interrupted.");
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw new ExecutionException("The computation failed.", e);
}
}
@@ -2816,7 +2817,7 @@ public class GridFunc {
catch (IgniteFutureTimeoutException e) {
throw new TimeoutException("The computation timed out: " + e.getMessage());
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw new ExecutionException("The computation failed.", e);
}
}
@@ -3265,7 +3266,7 @@ public class GridFunc {
*
* @param c Callable to convert to closure.
* @return Out-closure that wraps given callable. Note that if callable throw
- * exception the wrapping closure will re-throw it as {@link GridRuntimeException}.
+ * exception the wrapping closure will re-throw it as {@link IgniteException}.
*/
public static <R> IgniteOutClosure<R> as0(final Callable<R> c) {
A.notNull(c, "c");
@@ -5141,7 +5142,7 @@ public class GridFunc {
return cls.newInstance();
}
catch (Exception e) {
- throw new GridRuntimeException(e);
+ throw new IgniteException(e);
}
}
};
@@ -8079,7 +8080,7 @@ public class GridFunc {
return v != null && vals.contains(v);
}
- catch (GridException e1) {
+ catch (IgniteCheckedException e1) {
throw wrap(e1);
}
}
@@ -8173,7 +8174,7 @@ public class GridFunc {
try {
return eq(e.get(), map.get(e.getKey()));
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw wrap(ex);
}
}
@@ -8234,7 +8235,7 @@ public class GridFunc {
return false;
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw wrap(ex);
}
}
@@ -8351,7 +8352,7 @@ public class GridFunc {
return v != null && F.isAll(v, ps);
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw wrap(ex);
}
}
@@ -8519,7 +8520,7 @@ public class GridFunc {
return isAll(node, p);
}
catch (IllegalStateException ex) {
- throw new GridRuntimeException("Invalid grid name: " + gridName, ex);
+ throw new IgniteException("Invalid grid name: " + gridName, ex);
}
}
};
@@ -8576,9 +8577,9 @@ public class GridFunc {
* Waits until all passed futures will be executed.
*
* @param futs Futures. If none provided - this method is no-op.
- * @throws GridException If any of the futures failed.
+ * @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(@Nullable IgniteFuture<T>... futs) throws GridException {
+ public static <T> void awaitAll(@Nullable IgniteFuture<T>... futs) throws IgniteCheckedException {
if (!isEmpty(futs))
awaitAll(asList(futs));
}
@@ -8587,9 +8588,9 @@ public class GridFunc {
* Waits until all passed futures will be executed.
*
* @param futs Futures. If none provided - this method is no-op.
- * @throws GridException If any of the futures failed.
+ * @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(@Nullable Collection<IgniteFuture<T>> futs) throws GridException {
+ public static <T> void awaitAll(@Nullable Collection<IgniteFuture<T>> futs) throws IgniteCheckedException {
awaitAll(0, null, futs);
}
@@ -8598,9 +8599,9 @@ public class GridFunc {
*
* @param timeout Timeout for waiting ({@code 0} for forever).
* @param futs Futures. If none provided - this method is no-op.
- * @throws GridException If any of the futures failed.
+ * @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(long timeout, @Nullable Collection<IgniteFuture<T>> futs) throws GridException {
+ public static <T> void awaitAll(long timeout, @Nullable Collection<IgniteFuture<T>> futs) throws IgniteCheckedException {
awaitAll(timeout, null, futs);
}
@@ -8613,10 +8614,10 @@ public class GridFunc {
* @param <T> Return type of the futures.
* @param <R> Return type of the reducer.
* @return Reduced result if reducer is provided, {@code null} otherwise.
- * @throws GridException If any of the futures failed.
+ * @throws IgniteCheckedException If any of the futures failed.
*/
@Nullable public static <T, R> R awaitAll(long timeout, @Nullable IgniteReducer<T, R> rdc,
- @Nullable Collection<IgniteFuture<T>> futs) throws GridException {
+ @Nullable Collection<IgniteFuture<T>> futs) throws IgniteCheckedException {
if (futs == null || futs.isEmpty())
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridInClosure3X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridInClosure3X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridInClosure3X.java
index 44c83d7..02f84b0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridInClosure3X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridInClosure3X.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient in-closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object, Object)} method that calls
- * {@link #applyx(Object, Object, Object)} method and properly wraps {@link GridException}
+ * {@link #applyx(Object, Object, Object)} method and properly wraps {@link IgniteCheckedException}
* into {@link GridClosureException} instance.
* @see CIX3
*/
@@ -25,18 +25,18 @@ public abstract class GridInClosure3X<E1, E2, E3> implements GridInClosure3<E1,
try {
applyx(e1, e2, e3);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * In-closure body that can throw {@link GridException}.
+ * In-closure body that can throw {@link IgniteCheckedException}.
*
* @param e1 First variable the closure is called or closed on.
* @param e2 Second variable the closure is called or closed on.
* @param e3 Third variable the closure is called or closed on.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract void applyx(E1 e1, E2 e2, E3 e3) throws GridException;
+ public abstract void applyx(E1 e1, E2 e2, E3 e3) throws IgniteCheckedException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterableAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterableAdapter.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterableAdapter.java
index e6a1f89..dd0c26c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterableAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterableAdapter.java
@@ -9,8 +9,9 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.internal.*;
+
import java.util.*;
/**
@@ -45,7 +46,7 @@ public class GridIterableAdapter<T> implements GridIterable<T> {
}
/** {@inheritDoc} */
- @Override public boolean hasNextX() throws GridException {
+ @Override public boolean hasNextX() throws IgniteCheckedException {
return hasNext();
}
@@ -55,7 +56,7 @@ public class GridIterableAdapter<T> implements GridIterable<T> {
}
/** {@inheritDoc} */
- @Override public T nextX() throws GridException {
+ @Override public T nextX() throws IgniteCheckedException {
return next();
}
@@ -65,7 +66,7 @@ public class GridIterableAdapter<T> implements GridIterable<T> {
}
/** {@inheritDoc} */
- @Override public void removeX() throws GridException {
+ @Override public void removeX() throws IgniteCheckedException {
remove();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterator.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterator.java
index a6af813..8a4b38f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterator.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIterator.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.*;
import java.util.*;
@@ -27,11 +27,11 @@ public interface GridIterator<T> extends Iterable<T>, GridSerializableIterator<T
* just returning {@code false} out of {@link #hasNext()} method.
*
* @return {@code True} if iterator contains more elements.
- * @throws GridException If no more elements can be returned due
+ * @throws IgniteCheckedException If no more elements can be returned due
* to some failure, like a network error for example.
* @see Iterator#hasNext()
*/
- public boolean hasNextX() throws GridException;
+ public boolean hasNextX() throws IgniteCheckedException;
/**
* This method is the same as {@link #next()}, but allows for failure
@@ -43,17 +43,17 @@ public interface GridIterator<T> extends Iterable<T>, GridSerializableIterator<T
* @return {@code True} if iterator contains more elements.
* @throws NoSuchElementException If there are no more elements to
* return.
- * @throws GridException If no more elements can be returned due
+ * @throws IgniteCheckedException If no more elements can be returned due
* to some failure, like a network error for example.
* @see Iterator#next()
*/
- public T nextX() throws GridException;
+ public T nextX() throws IgniteCheckedException;
/**
* This method is the same as {@link #remove()}, but allows for failure
* with exception.
*
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public void removeX() throws GridException;
+ public void removeX() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIteratorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIteratorAdapter.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIteratorAdapter.java
index 914c0c2..7b98975 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIteratorAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridIteratorAdapter.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import java.util.*;
@@ -26,8 +26,8 @@ public abstract class GridIteratorAdapter<T> implements GridIterator<T> {
try {
return nextX();
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
@@ -36,8 +36,8 @@ public abstract class GridIteratorAdapter<T> implements GridIterator<T> {
try {
return hasNextX();
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
@@ -46,8 +46,8 @@ public abstract class GridIteratorAdapter<T> implements GridIterator<T> {
try {
removeX();
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainAbsClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainAbsClosure.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainAbsClosure.java
index 610ebf2..8f8ad50 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainAbsClosure.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainAbsClosure.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* Plain closure that does not accept any arguments, returns nothing and do not implement
@@ -19,7 +19,7 @@ public interface GridPlainAbsClosure {
/**
* Applies this closure.
*
- * @throws GridException If error occurred.
+ * @throws IgniteCheckedException If error occurred.
*/
- public void apply() throws GridException;
+ public void apply() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure.java
index 0ccb201..dfec75e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* Closure that takes argument, returns result and do not implement {@code GridPeerDeployAware}.
@@ -18,7 +18,7 @@ public interface GridPlainClosure<T, R> {
/**
* @param arg Closure argument.
* @return Closure execution result.
- * @throws GridException If error occurred.
+ * @throws IgniteCheckedException If error occurred.
*/
- public R apply(T arg) throws GridException;
+ public R apply(T arg) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure2.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure2.java
index 798b137..8d128d6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure2.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainClosure2.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* Closure taking 2 arguments.
@@ -19,7 +19,7 @@ public interface GridPlainClosure2<T1, T2, R> {
* @param arg1 Closure argument.
* @param arg2 Closure argument.
* @return Closure execution result.
- * @throws GridException If error occurred.
+ * @throws IgniteCheckedException If error occurred.
*/
- public R apply(T1 arg1, T2 arg2) throws GridException;
+ public R apply(T1 arg1, T2 arg2) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFuture.java
index 45a6d60..577d15d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFuture.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import java.util.concurrent.*;
@@ -21,9 +21,9 @@ public interface GridPlainFuture<R> {
* Synchronously waits for completion and returns result.
*
* @return Completed future result.
- * @throws GridException In case of error.
+ * @throws IgniteCheckedException In case of error.
*/
- public R get() throws GridException;
+ public R get() throws IgniteCheckedException;
/**
* Synchronously waits for completion and returns result.
@@ -31,10 +31,10 @@ public interface GridPlainFuture<R> {
* @param timeout Timeout interval to wait future completes.
* @param unit Timeout interval unit to wait future completes.
* @return Completed future result.
- * @throws GridException In case of error.
+ * @throws IgniteCheckedException In case of error.
* @throws org.apache.ignite.lang.IgniteFutureTimeoutException If timed out before future finishes.
*/
- public R get(long timeout, TimeUnit unit) throws GridException;
+ public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
/**
* Checks if future is done.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFutureAdapter.java
index eea07f4..9ff1f99 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFutureAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainFutureAdapter.java
@@ -9,8 +9,8 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.internal.*;
import java.util.*;
@@ -62,7 +62,7 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
}
/** {@inheritDoc} */
- @Override public R get() throws GridException {
+ @Override public R get() throws IgniteCheckedException {
try {
if (doneLatch.getCount() > 0)
doneLatch.await();
@@ -70,14 +70,14 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridException("Operation was interrupted.", e);
+ throw new IgniteCheckedException("Operation was interrupted.", e);
}
return getResult();
}
/** {@inheritDoc} */
- @Override public R get(long timeout, TimeUnit unit) throws GridException {
+ @Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException {
A.ensure(timeout >= 0, "timeout >= 0");
try {
@@ -87,7 +87,7 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridException("Operation was interrupted.", e);
+ throw new IgniteCheckedException("Operation was interrupted.", e);
}
return getResult();
@@ -97,9 +97,9 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
* Get future result.
*
* @return Future result.
- * @throws GridException In case of error.
+ * @throws IgniteCheckedException In case of error.
*/
- private R getResult() throws GridException {
+ private R getResult() throws IgniteCheckedException {
assert doneLatch.getCount() == 0;
if (err == null)
@@ -108,10 +108,10 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
if (err instanceof Error)
throw (Error)err;
- if (err instanceof GridException)
- throw (GridException)err;
+ if (err instanceof IgniteCheckedException)
+ throw (IgniteCheckedException)err;
- throw new GridException(err);
+ throw new IgniteCheckedException(err);
}
/** {@inheritDoc} */
@@ -275,7 +275,7 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
if (chainedFut != null)
chainedFut.onDone(res);
}
- catch (GridException | RuntimeException e) {
+ catch (IgniteCheckedException | RuntimeException e) {
if (chainedFut != null)
chainedFut.onDone(e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainInClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainInClosure.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainInClosure.java
index ab3588c..570a502 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainInClosure.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainInClosure.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* Plain closure that takes one input argument and does not implement {@code GridPeerDeployAware}.
@@ -17,7 +17,7 @@ import org.gridgain.grid.*;
public interface GridPlainInClosure<T> {
/**
* @param arg Closure argument.
- * @throws GridException If error occurred.
+ * @throws IgniteCheckedException If error occurred.
*/
- public void apply(T arg) throws GridException;
+ public void apply(T arg) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainOutClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainOutClosure.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainOutClosure.java
index 960d6c4..a44ae0a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainOutClosure.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPlainOutClosure.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
/**
* Closure that takes no arguments, returns result and does not implement {@code GridPeerDeployAware}.
@@ -17,7 +17,7 @@ import org.gridgain.grid.*;
public interface GridPlainOutClosure<R> {
/**
* @return Closure execution result.
- * @throws GridException If error occurred.
+ * @throws IgniteCheckedException If error occurred.
*/
- public R apply() throws GridException;
+ public R apply() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPredicate3X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPredicate3X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPredicate3X.java
index 40d90f8..0670b8c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPredicate3X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridPredicate3X.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient predicate subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object, Object)} method that calls
- * {@link #applyx(Object, Object, Object)} method and properly wraps {@link GridException}
+ * {@link #applyx(Object, Object, Object)} method and properly wraps {@link IgniteCheckedException}
* into {@link GridClosureException} instance.
* @see PX3
*/
@@ -25,19 +25,19 @@ public abstract class GridPredicate3X<E1, E2, E3> implements GridPredicate3<E1,
try {
return applyx(e1, e2, e3);
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Predicate body that can throw {@link GridException}.
+ * Predicate body that can throw {@link IgniteCheckedException}.
*
* @param e1 First bound free variable, i.e. the element the predicate is called or closed on.
* @param e2 Second bound free variable, i.e. the element the predicate is called or closed on.
* @param e3 Third bound free variable, i.e. the element the predicate is called or closed on.
* @return Return value.
- * @throws GridException Thrown in case of any error condition inside of the predicate.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the predicate.
*/
- public abstract boolean applyx(E1 e1, E2 e2, E3 e3) throws GridException;
+ public abstract boolean applyx(E1 e1, E2 e2, E3 e3) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosure2X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosure2X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosure2X.java
index 19a56d4..36e8c04 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosure2X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosure2X.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object)} method that calls {@link #applyx(Object, Object)}
- * method and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * method and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see CX2
*/
public abstract class IgniteClosure2X<E1, E2, R> implements IgniteBiClosure<E1, E2, R> {
@@ -28,18 +28,18 @@ public abstract class IgniteClosure2X<E1, E2, R> implements IgniteBiClosure<E1,
try {
return applyx(e1, e2);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Closure body that can throw {@link GridException}.
+ * Closure body that can throw {@link IgniteCheckedException}.
*
* @param e1 First bound free variable, i.e. the element the closure is called or closed on.
* @param e2 Second bound free variable, i.e. the element the closure is called or closed on.
* @return Optional return value.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract R applyx(E1 e1, E2 e2) throws GridException;
+ public abstract R applyx(E1 e1, E2 e2) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosureX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosureX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosureX.java
index bfe4380..7edd16d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosureX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteClosureX.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object)} method that calls {@link #applyx(Object)} method
- * and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see CX1
*/
public abstract class IgniteClosureX<E, R> implements IgniteClosure<E, R> {
@@ -28,17 +28,17 @@ public abstract class IgniteClosureX<E, R> implements IgniteClosure<E, R> {
try {
return applyx(e);
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Closure body that can throw {@link GridException}.
+ * Closure body that can throw {@link IgniteCheckedException}.
*
* @param e The variable the closure is called or closed on.
* @return Optional return value.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract R applyx(E e) throws GridException;
+ public abstract R applyx(E e) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosure2X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosure2X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosure2X.java
index c4044c9..aaccd01 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosure2X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosure2X.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient in-closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object)} method that calls {@link #applyx(Object, Object)}
- * method and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * method and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see CIX2
*/
public abstract class IgniteInClosure2X<E1, E2> implements IgniteBiInClosure<E1, E2> {
@@ -28,17 +28,17 @@ public abstract class IgniteInClosure2X<E1, E2> implements IgniteBiInClosure<E1,
try {
applyx(e1, e2);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * In-closure body that can throw {@link GridException}.
+ * In-closure body that can throw {@link IgniteCheckedException}.
*
* @param e1 First variable the closure is called or closed on.
* @param e2 Second variable the closure is called or closed on.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract void applyx(E1 e1, E2 e2) throws GridException;
+ public abstract void applyx(E1 e1, E2 e2) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosureX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosureX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosureX.java
index 33d9c9c..9dc9195 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosureX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteInClosureX.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient in-closure subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object)} method that calls {@link #applyx(Object)} method
- * and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see CIX1
*/
public abstract class IgniteInClosureX<T> implements IgniteInClosure<T> {
@@ -28,16 +28,16 @@ public abstract class IgniteInClosureX<T> implements IgniteInClosure<T> {
try {
applyx(t);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * In-closure body that can throw {@link GridException}.
+ * In-closure body that can throw {@link IgniteCheckedException}.
*
* @param t The variable the closure is called or closed on.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract void applyx(T t) throws GridException;
+ public abstract void applyx(T t) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteOutClosureX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteOutClosureX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteOutClosureX.java
index 365f093..0d4e489 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteOutClosureX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteOutClosureX.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient out-closure subclass that allows for thrown grid exception. This class
* implements {@link #apply()} method that calls {@link #applyx()} method and properly
- * wraps {@link GridException} into {@link GridClosureException} instance.
+ * wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
*/
public abstract class IgniteOutClosureX<T> implements IgniteOutClosure<T> {
/** */
@@ -27,16 +27,16 @@ public abstract class IgniteOutClosureX<T> implements IgniteOutClosure<T> {
try {
return applyx();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Out-closure body that can throw {@link GridException}.
+ * Out-closure body that can throw {@link IgniteCheckedException}.
*
* @return Element.
- * @throws GridException Thrown in case of any error condition inside of the closure.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the closure.
*/
- public abstract T applyx() throws GridException;
+ public abstract T applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicate2X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicate2X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicate2X.java
index a72f386..109dd15 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicate2X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicate2X.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient predicate subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object, Object)} method that calls {@link #applyx(Object, Object)}
- * method and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * method and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see PX2
*/
public abstract class IgnitePredicate2X<E1, E2> implements IgniteBiPredicate<E1, E2> {
@@ -28,18 +28,18 @@ public abstract class IgnitePredicate2X<E1, E2> implements IgniteBiPredicate<E1,
try {
return applyx(e1, e2);
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Predicate body that can throw {@link GridException}.
+ * Predicate body that can throw {@link IgniteCheckedException}.
*
* @param e1 First bound free variable, i.e. the element the predicate is called or closed on.
* @param e2 Second bound free variable, i.e. the element the predicate is called or closed on.
* @return Return value.
- * @throws GridException Thrown in case of any error condition inside of the predicate.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the predicate.
*/
- public abstract boolean applyx(E1 e1, E2 e2) throws GridException;
+ public abstract boolean applyx(E1 e1, E2 e2) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicateX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicateX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicateX.java
index 2aeb81c..743d97d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicateX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgnitePredicateX.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient predicate subclass that allows for thrown grid exception. This class
* implements {@link #apply(Object)} method that calls {@link #applyx(Object)} method
- * and properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * and properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see PX1
*/
public abstract class IgnitePredicateX<E1> implements IgnitePredicate<E1> {
@@ -28,17 +28,17 @@ public abstract class IgnitePredicateX<E1> implements IgnitePredicate<E1> {
try {
return applyx(e);
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
throw F.wrap(ex);
}
}
/**
- * Predicate body that can throw {@link GridException}.
+ * Predicate body that can throw {@link IgniteCheckedException}.
*
* @param e Bound free variable, i.e. the element the predicate is called or closed on.
* @return Return value.
- * @throws GridException Thrown in case of any error condition inside of the predicate.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the predicate.
*/
- public abstract boolean applyx(E1 e) throws GridException;
+ public abstract boolean applyx(E1 e) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer2X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer2X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer2X.java
index ae2c2f7..71800c0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer2X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer2X.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient reducer subclass that allows for thrown grid exception. This class
* implements {@link #apply()} method that calls {@link #applyx()} method and
- * properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see RX2
*/
public abstract class IgniteReducer2X<E1, E2, R> implements IgniteReducer2<E1, E2, R> {
@@ -27,16 +27,16 @@ public abstract class IgniteReducer2X<E1, E2, R> implements IgniteReducer2<E1, E
try {
return applyx();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Reducer body that can throw {@link GridException}.
+ * Reducer body that can throw {@link IgniteCheckedException}.
*
* @return Reducer return value.
- * @throws GridException Thrown in case of any error condition inside of the reducer.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the reducer.
*/
- public abstract R applyx() throws GridException;
+ public abstract R applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer3X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer3X.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer3X.java
index 5e4da97..b8bff78 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer3X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducer3X.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.util.lang;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient reducer subclass that allows for thrown grid exception. This class
* implements {@link #apply()} method that calls {@link #applyx()} method and
- * properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see RX3
*/
public abstract class IgniteReducer3X<E1, E2, E3, R> implements IgniteReducer3<E1, E2, E3, R> {
@@ -27,16 +27,16 @@ public abstract class IgniteReducer3X<E1, E2, E3, R> implements IgniteReducer3<E
try {
return applyx();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Reducer body that can throw {@link GridException}.
+ * Reducer body that can throw {@link IgniteCheckedException}.
*
* @return Reducer return value.
- * @throws GridException Thrown in case of any error condition inside of the reducer.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the reducer.
*/
- public abstract R applyx() throws GridException;
+ public abstract R applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducerX.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducerX.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducerX.java
index f991cef..2fe94b4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducerX.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/IgniteReducerX.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.util.lang;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
/**
* Convenient reducer subclass that allows for thrown grid exception. This class
* implements {@link #reduce()} method that calls {@link #applyx()} method and
- * properly wraps {@link GridException} into {@link GridClosureException} instance.
+ * properly wraps {@link IgniteCheckedException} into {@link GridClosureException} instance.
* @see RX1
*/
public abstract class IgniteReducerX<E1, R> implements IgniteReducer<E1, R> {
@@ -28,16 +28,16 @@ public abstract class IgniteReducerX<E1, R> implements IgniteReducer<E1, R> {
try {
return applyx();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
throw F.wrap(e);
}
}
/**
- * Reducer body that can throw {@link GridException}.
+ * Reducer body that can throw {@link IgniteCheckedException}.
*
* @return Reducer return value.
- * @throws GridException Thrown in case of any error condition inside of the reducer.
+ * @throws IgniteCheckedException Thrown in case of any error condition inside of the reducer.
*/
- public abstract R applyx() throws GridException;
+ public abstract R applyx() throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridBufferedParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridBufferedParser.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridBufferedParser.java
index ef4d921..e0d79cd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridBufferedParser.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridBufferedParser.java
@@ -8,7 +8,7 @@
*/
package org.gridgain.grid.util.nio;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.typedef.internal.*;
import java.io.*;
@@ -48,7 +48,7 @@ public class GridBufferedParser implements GridNioParser {
}
/** {@inheritDoc} */
- @Override public byte[] decode(GridNioSession ses, ByteBuffer buf) throws IOException, GridException {
+ @Override public byte[] decode(GridNioSession ses, ByteBuffer buf) throws IOException, IgniteCheckedException {
GridNioServerBuffer nioBuf = ses.meta(BUF_META_KEY);
// Decode for a given session is called per one thread, so there should not be any concurrency issues.
@@ -65,7 +65,7 @@ public class GridBufferedParser implements GridNioParser {
}
/** {@inheritDoc} */
- @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, GridException {
+ @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, IgniteCheckedException {
byte[] msg0 = (byte[])msg;
ByteBuffer res = directBuf ? ByteBuffer.allocateDirect(msg0.length + 4) : ByteBuffer.allocate(msg0.length + 4);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridCommunicationClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridCommunicationClient.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridCommunicationClient.java
index 4128475..6404002 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridCommunicationClient.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridCommunicationClient.java
@@ -9,10 +9,10 @@
package org.gridgain.grid.util.nio;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.util.direct.*;
-import org.jetbrains.annotations.*;
import org.gridgain.grid.util.lang.*;
+import org.jetbrains.annotations.*;
import java.io.*;
import java.nio.*;
@@ -28,9 +28,9 @@ public interface GridCommunicationClient {
* to both output and input streams.
*
* @param handshakeC Handshake.
- * @throws GridException If handshake failed.
+ * @throws IgniteCheckedException If handshake failed.
*/
- void doHandshake(IgniteInClosure2X<InputStream, OutputStream> handshakeC) throws GridException;
+ void doHandshake(IgniteInClosure2X<InputStream, OutputStream> handshakeC) throws IgniteCheckedException;
/**
* @return {@code True} if client has been closed by this call,
@@ -72,23 +72,23 @@ public interface GridCommunicationClient {
/**
* @param data Data to send.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- void sendMessage(ByteBuffer data) throws GridException;
+ void sendMessage(ByteBuffer data) throws IgniteCheckedException;
/**
* @param data Data to send.
* @param len Length.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- void sendMessage(byte[] data, int len) throws GridException;
+ void sendMessage(byte[] data, int len) throws IgniteCheckedException;
/**
* @param nodeId Node ID (provided only if versions of local and remote nodes are different).
* @param msg Message to send.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- void sendMessage(@Nullable UUID nodeId, GridTcpCommunicationMessageAdapter msg) throws GridException;
+ void sendMessage(@Nullable UUID nodeId, GridTcpCommunicationMessageAdapter msg) throws IgniteCheckedException;
/**
* @param timeout Timeout.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridConnectionBytesVerifyFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridConnectionBytesVerifyFilter.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridConnectionBytesVerifyFilter.java
index 45a4019..9d0eeca 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridConnectionBytesVerifyFilter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridConnectionBytesVerifyFilter.java
@@ -44,27 +44,27 @@ public class GridConnectionBytesVerifyFilter extends GridNioFilterAdapter {
}
/** {@inheritDoc} */
- @Override public void onSessionOpened(GridNioSession ses) throws GridException {
+ @Override public void onSessionOpened(GridNioSession ses) throws IgniteCheckedException {
proceedSessionOpened(ses);
}
/** {@inheritDoc} */
- @Override public void onSessionClosed(GridNioSession ses) throws GridException {
+ @Override public void onSessionClosed(GridNioSession ses) throws IgniteCheckedException {
proceedSessionClosed(ses);
}
/** {@inheritDoc} */
- @Override public void onExceptionCaught(GridNioSession ses, GridException ex) throws GridException {
+ @Override public void onExceptionCaught(GridNioSession ses, IgniteCheckedException ex) throws IgniteCheckedException {
proceedExceptionCaught(ses, ex);
}
/** {@inheritDoc} */
- @Override public GridNioFuture<?> onSessionWrite(GridNioSession ses, Object msg) throws GridException {
+ @Override public GridNioFuture<?> onSessionWrite(GridNioSession ses, Object msg) throws IgniteCheckedException {
return proceedSessionWrite(ses, msg);
}
/** {@inheritDoc} */
- @Override public void onMessageReceived(GridNioSession ses, Object msg) throws GridException {
+ @Override public void onMessageReceived(GridNioSession ses, Object msg) throws IgniteCheckedException {
// Verify only incoming connections.
if (!ses.accepted()) {
proceedMessageReceived(ses, msg);
@@ -116,17 +116,17 @@ public class GridConnectionBytesVerifyFilter extends GridNioFilterAdapter {
}
/** {@inheritDoc} */
- @Override public GridNioFuture<Boolean> onSessionClose(GridNioSession ses) throws GridException {
+ @Override public GridNioFuture<Boolean> onSessionClose(GridNioSession ses) throws IgniteCheckedException {
return proceedSessionClose(ses);
}
/** {@inheritDoc} */
- @Override public void onSessionIdleTimeout(GridNioSession ses) throws GridException {
+ @Override public void onSessionIdleTimeout(GridNioSession ses) throws IgniteCheckedException {
proceedSessionIdleTimeout(ses);
}
/** {@inheritDoc} */
- @Override public void onSessionWriteTimeout(GridNioSession ses) throws GridException {
+ @Override public void onSessionWriteTimeout(GridNioSession ses) throws IgniteCheckedException {
proceedSessionWriteTimeout(ses);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridDirectParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridDirectParser.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridDirectParser.java
index 20a92cd..2a87162 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridDirectParser.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridDirectParser.java
@@ -9,8 +9,8 @@
package org.gridgain.grid.util.nio;
+import org.apache.ignite.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.direct.*;
import org.jetbrains.annotations.*;
@@ -44,7 +44,7 @@ public class GridDirectParser implements GridNioParser {
}
/** {@inheritDoc} */
- @Nullable @Override public Object decode(GridNioSession ses, ByteBuffer buf) throws IOException, GridException {
+ @Nullable @Override public Object decode(GridNioSession ses, ByteBuffer buf) throws IOException, IgniteCheckedException {
if (msgFactory == null)
msgFactory = spi.getSpiContext().messageFactory();
@@ -69,7 +69,7 @@ public class GridDirectParser implements GridNioParser {
}
/** {@inheritDoc} */
- @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, GridException {
+ @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, IgniteCheckedException {
// No encoding needed for direct messages.
throw new UnsupportedEncodingException();
}