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/12 08:14:50 UTC
[12/64] [abbrv] [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/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
index ff9976e..ed6c1dd 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
@@ -9,16 +9,16 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.optimized.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
-import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
+import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.junits.common.*;
@@ -27,8 +27,8 @@ import java.lang.reflect.*;
import java.util.*;
import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
-import static org.gridgain.grid.cache.GridCacheMode.*;
import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
/**
* Tests from {@link GridCacheEntry#memorySize()} method.
@@ -80,8 +80,8 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
ONE_KB_VAL_SIZE = marsh.marshal(new Value(new byte[1024])).length;
TWO_KB_VAL_SIZE = marsh.marshal(new Value(new byte[2048])).length;
}
- 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/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
index 3177d6e..2c82454 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
@@ -9,8 +9,8 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.store.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -60,7 +60,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
}
/**
- * Sets a flag indicating if methods of this class should fail with {@link GridException}.
+ * Sets a flag indicating if methods of this class should fail with {@link IgniteCheckedException}.
*
* @param shouldFail {@code true} if should fail.
*/
@@ -161,7 +161,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
}
/** {@inheritDoc} */
- @Override public V load(GridCacheTx tx, K key) throws GridException {
+ @Override public V load(GridCacheTx tx, K key) throws IgniteCheckedException {
lastMtd = "load";
checkOperation();
@@ -171,7 +171,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
/** {@inheritDoc} */
@Override public void loadCache(IgniteBiInClosure<K, V> clo, Object[] args)
- throws GridException {
+ throws IgniteCheckedException {
lastMtd = "loadAllFull";
checkOperation();
@@ -179,7 +179,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
/** {@inheritDoc} */
@Override public void loadAll(GridCacheTx tx, Collection<? extends K> keys,
- IgniteBiInClosure<K, V> c) throws GridException {
+ IgniteBiInClosure<K, V> c) throws IgniteCheckedException {
lastMtd = "loadAll";
for (K key : keys) {
@@ -194,7 +194,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
/** {@inheritDoc} */
@Override public void put(@Nullable GridCacheTx tx, K key, V val)
- throws GridException {
+ throws IgniteCheckedException {
lastMtd = "put";
checkOperation();
@@ -206,7 +206,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
/** {@inheritDoc} */
@Override public void putAll(GridCacheTx tx, Map<? extends K, ? extends V> map)
- throws GridException {
+ throws IgniteCheckedException {
lastMtd = "putAll";
checkOperation();
@@ -217,7 +217,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
}
/** {@inheritDoc} */
- @Override public void remove(GridCacheTx tx, K key) throws GridException {
+ @Override public void remove(GridCacheTx tx, K key) throws IgniteCheckedException {
lastMtd = "remove";
checkOperation();
@@ -229,7 +229,7 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
/** {@inheritDoc} */
@Override public void removeAll(GridCacheTx tx, Collection<? extends K> keys)
- throws GridException {
+ throws IgniteCheckedException {
lastMtd = "removeAll";
checkOperation();
@@ -249,11 +249,11 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
* Checks the flag and throws exception if it is set. Checks operation delay and sleeps
* for specified amount of time, if needed.
*
- * @throws GridException Always if flag is set.
+ * @throws IgniteCheckedException Always if flag is set.
*/
- private void checkOperation() throws GridException {
+ private void checkOperation() throws IgniteCheckedException {
if (shouldFail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
if (operationDelay > 0)
U.sleep(operationDelay);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
index 4257f6f..f9fe5e9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
@@ -324,17 +324,17 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
assertTrue("Failed to wait for unlock events: " + affinityKey, unlocks.awaitKeys(WAIT_TIMEOUT, affinityKey));
}
- /** @throws GridException */
+ /** @throws IgniteCheckedException */
public void testGroupLockWithExternalLockOptimistic() throws Exception {
checkGroupLockWithExternalLock(OPTIMISTIC);
}
- /** @throws GridException */
+ /** @throws IgniteCheckedException */
public void testGroupLockWithExternalLockPessimistic() throws Exception {
checkGroupLockWithExternalLock(PESSIMISTIC);
}
- /** @throws GridException */
+ /** @throws IgniteCheckedException */
private void checkGroupLockWithExternalLock(final GridCacheTxConcurrency concurrency) throws Exception {
assert sanityCheckEnabled();
@@ -372,7 +372,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
cache.unlock(key1);
}
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
fail(e.getMessage());
}
catch (InterruptedException ignored) {
@@ -945,7 +945,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
fail("Exception should be thrown");
}
- catch (GridException ignored) {
+ catch (IgniteCheckedException ignored) {
// Expected exception.
}
@@ -984,7 +984,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
fail("Exception should be thrown.");
}
- catch (GridException ignored) {
+ catch (IgniteCheckedException ignored) {
// Expected exception.
}
@@ -1158,9 +1158,9 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
/**
* @param primary Primary node for which key should be calculated.
* @return Key for which given node is primary.
- * @throws GridException If affinity can not be calculated.
+ * @throws IgniteCheckedException If affinity can not be calculated.
*/
- protected UUID primaryKeyForCache(Ignite primary) throws GridException {
+ protected UUID primaryKeyForCache(Ignite primary) throws IgniteCheckedException {
UUID res;
int cnt = 0;
@@ -1184,9 +1184,9 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
* @param primary Primary node for which keys should be calculated.
* @param cnt Key count.
* @return Collection of generated keys.
- * @throws GridException If affinity can not be calculated.
+ * @throws IgniteCheckedException If affinity can not be calculated.
*/
- protected UUID[] primaryKeysForCache(Ignite primary, int cnt) throws GridException {
+ protected UUID[] primaryKeysForCache(Ignite primary, int cnt) throws IgniteCheckedException {
Collection<UUID> keys = new LinkedHashSet<>();
int iters = 0;
@@ -1270,13 +1270,13 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
/** {@inheritDoc} */
@Override public Object load(@Nullable GridCacheTx tx, Object key)
- throws GridException {
+ throws IgniteCheckedException {
return null;
}
/** {@inheritDoc} */
@Override public void putAll(GridCacheTx tx,
- Map<?, ?> map) throws GridException {
+ Map<?, ?> map) throws IgniteCheckedException {
storeMap.putAll(map);
putCnt.incrementAndGet();
@@ -1284,7 +1284,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
/** {@inheritDoc} */
@Override public void put(@Nullable GridCacheTx tx, Object key,
- @Nullable Object val) throws GridException {
+ @Nullable Object val) throws IgniteCheckedException {
storeMap.put(key, val);
putCnt.incrementAndGet();
@@ -1292,7 +1292,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
/** {@inheritDoc} */
@Override public void remove(@Nullable GridCacheTx tx, Object key)
- throws GridException {
+ throws IgniteCheckedException {
storeMap.remove(key);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
index be6065b..c812755 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
@@ -276,9 +276,9 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
* Does remapping.
* @param master Master grid.
* @param keys Keys.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private void remap(final Ignite master, Iterable<Integer> keys) throws GridException {
+ private void remap(final Ignite master, Iterable<Integer> keys) throws IgniteCheckedException {
Map<UUID, Collection<Integer>> dataChunks = new HashMap<>();
for (Integer key : keys) {
@@ -307,10 +307,10 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
* @param master Master node to submit from.
* @param preferredNodeId Node id to execute job on.
* @param dataChunk Data chunk to put in cache.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
private void submitDataChunk(final Ignite master, UUID preferredNodeId, final Collection<Integer> dataChunk)
- throws GridException {
+ throws IgniteCheckedException {
ClusterGroup prj = master.cluster().forPredicate(workerNodesFilter);
IgniteCompute comp = master.compute(prj).enableAsync();
@@ -328,7 +328,7 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
try {
f.get(); //if something went wrong - we'll get exception here
}
- catch (GridException ignore) {
+ catch (IgniteCheckedException ignore) {
info("Put task failed, going to remap keys: " + dataChunk.size());
fail = true;
@@ -341,7 +341,7 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
if (fail)
remap(master, dataChunk);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
info("Failed to remap task [data=" + dataChunk.size() + ", e=" + e + ']');
}
}
@@ -367,10 +367,10 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
* @param workerNode Worker node.
* @param keys Keys that are suspected to be absent
* @return List of absent keys. If no keys are absent, the list is empty.
- * @throws GridException If error occurs.
+ * @throws IgniteCheckedException If error occurs.
*/
private Collection<Integer> findAbsentKeys(Ignite workerNode,
- Collection<Integer> keys) throws GridException {
+ Collection<Integer> keys) throws IgniteCheckedException {
Collection<Integer> ret = new ArrayList<>(keys.size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockPutTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockPutTask.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockPutTask.java
index 66a3fc3..7a9ac04 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockPutTask.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockPutTask.java
@@ -60,11 +60,11 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
* will be random which over time should result into all nodes being used equally.
* @return Map of grid jobs assigned to subgrid node. Unless {@link org.apache.ignite.compute.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 thrown out of {@link
+ * @throws IgniteCheckedException If mapping could not complete successfully. This exception will be thrown out of {@link
* org.apache.ignite.compute.ComputeTaskFuture#get()} method.
*/
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
- @Nullable final Collection<Integer> data) throws GridException {
+ @Nullable final Collection<Integer> data) throws IgniteCheckedException {
assert !subgrid.isEmpty();
// Give preference to wanted node. Otherwise, take the first one.
@@ -82,7 +82,7 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
@IgniteInstanceResource
private Ignite ignite;
- @Override public Object execute() throws GridException {
+ @Override public Object execute() throws IgniteCheckedException {
log.info("Going to put data: " + data.size());
GridCache<Object, Object> cache = ignite.cache(cacheName);
@@ -143,7 +143,7 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
}
/** {@inheritDoc} */
- @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws GridException {
+ @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
return null;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 039f9bf..de09b1e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
@@ -9,23 +9,23 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
+import org.apache.ignite.spi.discovery.tcp.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.cache.cloner.*;
import org.gridgain.grid.cache.eviction.*;
import org.gridgain.grid.cache.store.*;
-import org.apache.ignite.spi.discovery.tcp.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
import java.util.*;
-import static org.gridgain.grid.cache.GridCacheMode.*;
import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
/**
* Test for {@link org.apache.ignite.lifecycle.LifecycleAware} support in {@link GridCacheConfiguration}.
@@ -177,7 +177,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
}
/** {@inheritDoc} */
- @Nullable @Override public <T> T cloneValue(T val) throws GridException {
+ @Nullable @Override public <T> T cloneValue(T val) throws IgniteCheckedException {
return val;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
index 11befd4..875d809 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
@@ -203,7 +203,7 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
// put
doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<GridCache<String, Integer>>() {
- @Override public void applyx(GridCache<String, Integer> c) throws GridException {
+ @Override public void applyx(GridCache<String, Integer> c) throws IgniteCheckedException {
for (int i = 0; i < all; i++)
c.put(valueOf(i), i);
}
@@ -211,7 +211,7 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
//putAll
doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<GridCache<String, Integer>>() {
- @Override public void applyx(GridCache<String, Integer> c) throws GridException {
+ @Override public void applyx(GridCache<String, Integer> c) throws IgniteCheckedException {
Map<String, Integer> m = new HashMap<>();
for (int i = 0; i < all; i++)
@@ -228,7 +228,7 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
* @param offheapEmpty Offheap is empty.
* @param swapEmpty Swap is empty.
* @param x Cache modifier.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
void doTest(int cache, int offheapSwap, boolean offheapEmpty, boolean swapEmpty, CIX1<GridCache<String, Integer>> x) throws Exception {
ipFinder = new TcpDiscoveryVmIpFinder(true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheNestedTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheNestedTxAbstractTest.java
index aaa8f42..28faeb4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheNestedTxAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheNestedTxAbstractTest.java
@@ -9,19 +9,16 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.kernal.*;
import org.gridgain.testframework.junits.common.*;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
@@ -152,7 +149,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
tx.commit();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
error("Failed tx thread", e);
}
}
@@ -181,7 +178,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
try {
c.unlock(CNTR_KEY);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
error("Failed unlock", e);
}
}
@@ -246,7 +243,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
tx.commit();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
error("Failed tx thread", e);
}
@@ -259,7 +256,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
try {
c.unlock(CNTR_KEY);
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
error("Failed unlock", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
index 1f99504..109e43f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
@@ -175,9 +175,9 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
* @param cacheName Cache name.
* @param g Grid.
* @return Size.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private long size(String cacheName, GridKernal g) throws GridException {
+ private long size(String cacheName, GridKernal g) throws IgniteCheckedException {
if (offheap)
return g.cache(cacheName).offHeapEntriesCount();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllFailoverSelfTest.java
index 56b19e8..7998316 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -249,7 +249,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
try {
taskFut.get(); //if something went wrong - we'll get exception here
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
log.error("Job failed", e);
jobFailed.set(true);
@@ -421,7 +421,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
try {
taskFut.get(); //if something went wrong - we'll get exception here
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
log.error("Job failed", e);
jobFailed.set(true);
@@ -472,7 +472,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
try {
taskFut.get(); //if something went wrong - we'll get exception here
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
log.error("Job failed", e);
jobFailed.set(true);
@@ -541,10 +541,10 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
* @param workerNode Worker node.
* @param keys Keys that are suspected to be absent
* @return List of absent keys. If no keys are absent, the list is empty.
- * @throws GridException If error occurs.
+ * @throws IgniteCheckedException If error occurs.
*/
private Collection<Integer> findAbsentKeys(Ignite workerNode,
- Collection<Integer> keys) throws GridException {
+ Collection<Integer> keys) throws IgniteCheckedException {
Collection<Integer> ret = new ArrayList<>(keys.size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllTask.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllTask.java
index c697938..bd9dd51 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllTask.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePutAllTask.java
@@ -38,7 +38,7 @@ class GridCachePutAllTask extends ComputeTaskAdapter<Collection<Integer>, Void>
/** {@inheritDoc} */
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
- @Nullable final Collection<Integer> data) throws GridException {
+ @Nullable final Collection<Integer> data) throws IgniteCheckedException {
assert !subgrid.isEmpty();
// Give preference to wanted node. Otherwise, take the first one.
@@ -57,7 +57,7 @@ class GridCachePutAllTask extends ComputeTaskAdapter<Collection<Integer>, Void>
@IgniteInstanceResource
private Ignite ignite;
- @Override public Object execute() throws GridException {
+ @Override public Object execute() throws IgniteCheckedException {
log.info("Going to put data: " + data);
GridCacheProjection<Object, Object> cache = ignite.cache(cacheName);
@@ -102,7 +102,7 @@ class GridCachePutAllTask extends ComputeTaskAdapter<Collection<Integer>, Void>
}
/** {@inheritDoc} */
- @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException {
+ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException {
if (res.getException() != null)
return ComputeJobResultPolicy.FAILOVER;
@@ -110,7 +110,7 @@ class GridCachePutAllTask extends ComputeTaskAdapter<Collection<Integer>, Void>
}
/** {@inheritDoc} */
- @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws GridException {
+ @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
return null;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
index 7387c06..f8c00b6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.kernal.processors.cache;
-import org.gridgain.grid.*;
+import org.apache.ignite.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.query.*;
import org.gridgain.testframework.*;
@@ -39,15 +39,15 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel
* @param c Closure.
*/
private void doTest(Callable<Object> c) {
- GridTestUtils.assertThrows(log, c, GridException.class, "Indexing is disabled for cache: null");
+ GridTestUtils.assertThrows(log, c, IgniteCheckedException.class, "Indexing is disabled for cache: null");
}
/**
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public void testSqlFieldsQuery() throws GridException {
+ public void testSqlFieldsQuery() throws IgniteCheckedException {
doTest(new Callable<Object>() {
- @Override public Object call() throws GridException {
+ @Override public Object call() throws IgniteCheckedException {
return cache().queries().createSqlFieldsQuery("select * from dual").execute()
.get();
}
@@ -55,11 +55,11 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel
}
/**
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public void testTextQuery() throws GridException {
+ public void testTextQuery() throws IgniteCheckedException {
doTest(new Callable<Object>() {
- @Override public Object call() throws GridException {
+ @Override public Object call() throws IgniteCheckedException {
return cache().queries().createFullTextQuery(String.class, "text")
.execute().get();
}
@@ -67,11 +67,11 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel
}
/**
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public void testSqlQuery() throws GridException {
+ public void testSqlQuery() throws IgniteCheckedException {
doTest(new Callable<Object>() {
- @Override public Object call() throws GridException {
+ @Override public Object call() throws IgniteCheckedException {
return cache().queries().createSqlQuery(String.class, "1 = 1")
.execute().get();
}
@@ -79,9 +79,9 @@ public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSel
}
/**
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- public void testScanQuery() throws GridException {
+ public void testScanQuery() throws IgniteCheckedException {
GridCacheQuery<Map.Entry<String, Integer>> qry = cache().queries().createScanQuery(null);
qry.execute().get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java
index 6b0e343..3597047 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java
@@ -9,15 +9,15 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.store.*;
import org.gridgain.grid.util.tostring.*;
+import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -59,7 +59,7 @@ public abstract class GridCacheRefreshAheadAbstractSelfTest extends GridCommonAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testReadAhead() throws Exception {
store.testThread(Thread.currentThread());
@@ -121,7 +121,7 @@ public abstract class GridCacheRefreshAheadAbstractSelfTest extends GridCommonAb
}
/** {@inheritDoc} */
- @Nullable @Override public Object load(GridCacheTx tx, Object key) throws GridException {
+ @Nullable @Override public Object load(GridCacheTx tx, Object key) throws IgniteCheckedException {
if (trackLoads) {
wasAsyncLoad = wasAsyncLoad || !testThread.equals(Thread.currentThread());
@@ -137,12 +137,12 @@ public abstract class GridCacheRefreshAheadAbstractSelfTest extends GridCommonAb
}
/** {@inheritDoc} */
- @Override public void put(GridCacheTx tx, Object key, Object val) throws GridException {
+ @Override public void put(GridCacheTx tx, Object key, Object val) throws IgniteCheckedException {
/* No-op. */
}
/** {@inheritDoc} */
- @Override public void remove(GridCacheTx tx, Object key) throws GridException {
+ @Override public void remove(GridCacheTx tx, Object key) throws IgniteCheckedException {
/* No-op. */
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStopSelfTest.java
index f936f69..3402297 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStopSelfTest.java
@@ -9,12 +9,12 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.cache.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -170,7 +170,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
try {
fut.get();
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
if (!e.getMessage().startsWith(EXPECTED_MSG))
e.printStackTrace();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
index 4a3c658..6085c99 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
@@ -9,14 +9,14 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.store.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -101,7 +101,7 @@ public class GridCacheStorePutxSelfTest extends GridCommonAbstractTest {
/** */
private static class TestStore implements GridCacheStore<Integer, Integer> {
/** {@inheritDoc} */
- @Nullable @Override public Integer load(@Nullable GridCacheTx tx, Integer key) throws GridException {
+ @Nullable @Override public Integer load(@Nullable GridCacheTx tx, Integer key) throws IgniteCheckedException {
loads.incrementAndGet();
return null;
@@ -109,42 +109,42 @@ public class GridCacheStorePutxSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo, @Nullable Object... args)
- throws GridException {
+ throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void loadAll(@Nullable GridCacheTx tx, Collection<? extends Integer> keys,
- IgniteBiInClosure<Integer, Integer> c) throws GridException {
+ IgniteBiInClosure<Integer, Integer> c) throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void put(@Nullable GridCacheTx tx, Integer key,
- @Nullable Integer val) throws GridException {
+ @Nullable Integer val) throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void putAll(@Nullable GridCacheTx tx,
- Map<? extends Integer, ? extends Integer> map) throws GridException {
+ Map<? extends Integer, ? extends Integer> map) throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void remove(@Nullable GridCacheTx tx, Integer key)
- throws GridException {
+ throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
@Override public void removeAll(@Nullable GridCacheTx tx, Collection<? extends Integer> keys)
- throws GridException {
+ throws IgniteCheckedException {
// No-op.
}
/** {@inheritDoc} */
- @Override public void txEnd(GridCacheTx tx, boolean commit) throws GridException {
+ @Override public void txEnd(GridCacheTx tx, boolean commit) throws IgniteCheckedException {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
index 063d3ac..2514bdb 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
@@ -9,18 +9,18 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
-import org.gridgain.grid.kernal.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.apache.ignite.spi.swapspace.*;
import org.apache.ignite.spi.swapspace.file.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.store.*;
+import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.junits.common.*;
@@ -30,9 +30,9 @@ import java.util.*;
import java.util.concurrent.*;
import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.events.IgniteEventType.*;
import static org.gridgain.grid.cache.GridCacheMode.*;
import static org.gridgain.grid.cache.GridCacheWriteSynchronizationMode.*;
-import static org.apache.ignite.events.IgniteEventType.*;
/**
* Test that swap is released after entry is reloaded.
@@ -212,18 +212,18 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override public Object load(@Nullable GridCacheTx tx, Object key)
- throws GridException {
+ throws IgniteCheckedException {
return map.get(key);
}
/** {@inheritDoc} */
@Override public void put(GridCacheTx tx, Object key, @Nullable Object val)
- throws GridException {
+ throws IgniteCheckedException {
map.put(key, val);
}
/** {@inheritDoc} */
- @Override public void remove(GridCacheTx tx, Object key) throws GridException {
+ @Override public void remove(GridCacheTx tx, Object key) throws IgniteCheckedException {
map.remove(key);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
index 5796f81..73a5ed1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
@@ -9,12 +9,12 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.dr.*;
-import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.typedef.*;
import org.jetbrains.annotations.*;
import java.util.*;
@@ -64,7 +64,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public int memorySize() throws GridException {
+ @Override public int memorySize() throws IgniteCheckedException {
return 1024;
}
@@ -305,7 +305,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public V rawGetOrUnmarshal(boolean tmp) throws GridException {
+ @Override public V rawGetOrUnmarshal(boolean tmp) throws IgniteCheckedException {
return val;
}
@@ -330,7 +330,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public GridCacheEntry<K, V> wrapFilterLocked() throws GridException {
+ @Override public GridCacheEntry<K, V> wrapFilterLocked() throws IgniteCheckedException {
assert false; return null;
}
@@ -351,19 +351,19 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
/** @inheritDoc */
@Override public boolean invalidate(@Nullable GridCacheVersion curVer, GridCacheVersion newVer)
- throws GridException {
+ throws IgniteCheckedException {
assert false; return false;
}
/** @inheritDoc */
@Override public boolean invalidate(@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter)
- throws GridCacheEntryRemovedException, GridException {
+ throws GridCacheEntryRemovedException, IgniteCheckedException {
assert false; return false;
}
/** @inheritDoc */
@Override public boolean compact(@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter)
- throws GridCacheEntryRemovedException, GridException {
+ throws GridCacheEntryRemovedException, IgniteCheckedException {
assert false; return false;
}
@@ -375,7 +375,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
/** {@inheritDoc} */
@Override public GridCacheBatchSwapEntry<K, V> evictInBatchInternal(GridCacheVersion obsoleteVer)
- throws GridException {
+ throws IgniteCheckedException {
assert false; return null;
}
@@ -414,7 +414,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
@Override public GridCacheUpdateTxResult<V> innerSet(@Nullable GridCacheTxEx<K, V> tx, UUID evtNodeId, UUID affNodeId,
@Nullable V val, @Nullable byte[] valBytes, boolean writeThrough, boolean retval, long ttl,
boolean evt, boolean metrics, long topVer, IgnitePredicate<GridCacheEntry<K, V>>[] filter, GridDrType drType,
- long drExpireTime, @Nullable GridCacheVersion drVer, UUID subjId, String taskName) throws GridException,
+ long drExpireTime, @Nullable GridCacheVersion drVer, UUID subjId, String taskName) throws IgniteCheckedException,
GridCacheEntryRemovedException {
return new GridCacheUpdateTxResult<>(true, rawPut(val, ttl));
}
@@ -423,7 +423,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
@Override public IgniteBiTuple<Boolean, V> innerUpdateLocal(GridCacheVersion ver, GridCacheOperation op,
@Nullable Object writeObj, boolean writeThrough, boolean retval, long ttl, boolean evt, boolean metrics,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter, boolean intercept, UUID subjId, String taskName)
- throws GridException, GridCacheEntryRemovedException {
+ throws IgniteCheckedException, GridCacheEntryRemovedException {
return new IgniteBiTuple<>(false, null);
}
@@ -433,7 +433,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
@Nullable byte[] valBytes, boolean writeThrough, boolean retval, long ttl, boolean evt,
boolean metrics, boolean primary, boolean checkVer, @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter,
GridDrType drType, long drTtl, long drExpireTime, @Nullable GridCacheVersion drVer, boolean drResolve,
- boolean intercept, UUID subjId, String taskName) throws GridException,
+ boolean intercept, UUID subjId, String taskName) throws IgniteCheckedException,
GridCacheEntryRemovedException {
return new GridCacheUpdateAtomicResult<>(true, rawPut((V)val, 0), (V)val, 0L, 0L, null, null, true);
}
@@ -443,7 +443,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
UUID affNodeId, boolean writeThrough, boolean retval, boolean evt, boolean metrics, long topVer,
IgnitePredicate<GridCacheEntry<K, V>>[] filter, GridDrType drType, @Nullable GridCacheVersion drVer, UUID subjId,
String taskName)
- throws GridException, GridCacheEntryRemovedException {
+ throws IgniteCheckedException, GridCacheEntryRemovedException {
obsoleteVer = ver;
V old = val;
@@ -455,7 +455,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
/** @inheritDoc */
@Override public boolean clear(GridCacheVersion ver, boolean readers,
- @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) throws GridException {
+ @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) throws IgniteCheckedException {
if (ver == null || ver.equals(this.ver)) {
val = null;
@@ -544,7 +544,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
/** @inheritDoc */
@Override public GridTuple<V> peek0(boolean failFast, GridCachePeekMode mode,
IgnitePredicate<GridCacheEntry<K, V>>[] filter, GridCacheTxEx<K, V> tx)
- throws GridCacheEntryRemovedException, GridCacheFilterFailedException, GridException {
+ throws GridCacheEntryRemovedException, GridCacheFilterFailedException, IgniteCheckedException {
return F.t(val);
}
@@ -561,7 +561,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public V poke(V val) throws GridCacheEntryRemovedException, GridException {
+ @Override public V poke(V val) throws GridCacheEntryRemovedException, IgniteCheckedException {
V old = this.val;
this.val = val;
@@ -571,7 +571,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
/** @inheritDoc */
@Override public boolean initialValue(V val, @Nullable byte[] valBytes, GridCacheVersion ver, long ttl,
- long expireTime, boolean preload, long topVer, GridDrType drType) throws GridException,
+ long expireTime, boolean preload, long topVer, GridDrType drType) throws IgniteCheckedException,
GridCacheEntryRemovedException {
assert false; return false;
}
@@ -736,12 +736,12 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public V unswap() throws GridException {
+ @Override public V unswap() throws IgniteCheckedException {
return null;
}
/** {@inheritDoc} */
- @Override public V unswap(boolean ignoreFlags, boolean needVal) throws GridException {
+ @Override public V unswap(boolean ignoreFlags, boolean needVal) throws IgniteCheckedException {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
index 0dcb724..5db7493 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
@@ -9,8 +9,8 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.store.*;
import org.gridgain.grid.util.*;
@@ -74,7 +74,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
}
/**
- * Sets a flag indicating if methods of this class should fail with {@link GridException}.
+ * Sets a flag indicating if methods of this class should fail with {@link IgniteCheckedException}.
*
* @param shouldFail {@code true} if should fail.
*/
@@ -176,7 +176,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
}
/** {@inheritDoc} */
- @Override public String load(GridCacheTx tx, Integer key) throws GridException {
+ @Override public String load(GridCacheTx tx, Integer key) throws IgniteCheckedException {
checkTx(tx);
lastMtd = "load";
@@ -190,7 +190,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/** {@inheritDoc} */
@Override public void loadCache(IgniteBiInClosure<Integer, String> clo, Object[] args)
- throws GridException {
+ throws IgniteCheckedException {
lastMtd = "loadAllFull";
checkOperation();
@@ -208,7 +208,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/** {@inheritDoc} */
@Override public void loadAll(GridCacheTx tx, Collection<? extends Integer> keys,
- IgniteBiInClosure<Integer, String> c) throws GridException {
+ IgniteBiInClosure<Integer, String> c) throws IgniteCheckedException {
checkTx(tx);
lastMtd = "loadAll";
@@ -225,7 +225,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/** {@inheritDoc} */
@Override public void put(@Nullable GridCacheTx tx, Integer key, String val)
- throws GridException {
+ throws IgniteCheckedException {
checkTx(tx);
lastMtd = "put";
@@ -239,7 +239,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/** {@inheritDoc} */
@Override public void putAll(GridCacheTx tx, Map<? extends Integer, ? extends String> map)
- throws GridException {
+ throws IgniteCheckedException {
checkTx(tx);
lastMtd = "putAll";
@@ -252,7 +252,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
}
/** {@inheritDoc} */
- @Override public void remove(GridCacheTx tx, Integer key) throws GridException {
+ @Override public void remove(GridCacheTx tx, Integer key) throws IgniteCheckedException {
checkTx(tx);
lastMtd = "remove";
@@ -264,7 +264,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/** {@inheritDoc} */
@Override public void removeAll(GridCacheTx tx, Collection<? extends Integer> keys)
- throws GridException {
+ throws IgniteCheckedException {
checkTx(tx);
lastMtd = "removeAll";
@@ -284,11 +284,11 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
* Checks the flag and throws exception if it is set. Checks operation delay and sleeps
* for specified amount of time, if needed.
*
- * @throws GridException Always if flag is set.
+ * @throws IgniteCheckedException Always if flag is set.
*/
- private void checkOperation() throws GridException {
+ private void checkOperation() throws IgniteCheckedException {
if (shouldFail)
- throw new GridException("Store exception.");
+ throw new IgniteCheckedException("Store exception.");
if (operationDelay > 0)
U.sleep(operationDelay);
@@ -296,9 +296,9 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
/**
* @param tx Checks transaction.
- * @throws GridException If transaction is incorrect.
+ * @throws IgniteCheckedException If transaction is incorrect.
*/
- private void checkTx(GridCacheTx tx) throws GridException {
+ private void checkTx(GridCacheTx tx) throws IgniteCheckedException {
if (tx == null)
return;
@@ -307,9 +307,9 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
GridCacheTxEx tx0 = (GridCacheTxEx)tx;
if (!tx0.local())
- throw new GridException("Tx is not local: " + tx);
+ throw new IgniteCheckedException("Tx is not local: " + tx);
if (tx0.dht())
- throw new GridException("Tx is DHT: " + tx);
+ throw new IgniteCheckedException("Tx is DHT: " + tx);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerSelfTest.java
index 31e150d..870e9c6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerSelfTest.java
@@ -9,13 +9,13 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.*;
@@ -100,7 +100,7 @@ public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest {
try {
assertNull(g.cache(null).get(key));
}
- catch (GridException ignore) {
+ catch (IgniteCheckedException ignore) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAbstractTest.java
index cadc2ce..acbe76f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAbstractTest.java
@@ -241,7 +241,7 @@ abstract class GridCacheTxAbstractTest extends GridCommonAbstractTest {
try {
tx.rollback();
}
- catch (GridException ex) {
+ catch (IgniteCheckedException ex) {
error("Failed to rollback optimistic failure: " + tx, ex);
throw ex;
@@ -279,7 +279,7 @@ abstract class GridCacheTxAbstractTest extends GridCommonAbstractTest {
/**
* @param concurrency Concurrency.
* @param isolation Isolation.
- * @throws GridException If check failed.
+ * @throws IgniteCheckedException If check failed.
*/
protected void checkRollback(GridCacheTxConcurrency concurrency, GridCacheTxIsolation isolation)
throws Exception {
@@ -290,7 +290,7 @@ abstract class GridCacheTxAbstractTest extends GridCommonAbstractTest {
* @param map Map to check.
* @param concurrency Concurrency.
* @param isolation Isolation.
- * @throws GridException If check failed.
+ * @throws IgniteCheckedException If check failed.
*/
protected void checkRollback(ConcurrentMap<Integer, String> map, GridCacheTxConcurrency concurrency,
GridCacheTxIsolation isolation) throws Exception {
@@ -393,7 +393,7 @@ abstract class GridCacheTxAbstractTest extends GridCommonAbstractTest {
/**
* Checks integrity of all caches after tests.
*
- * @throws GridException If check failed.
+ * @throws IgniteCheckedException If check failed.
*/
@SuppressWarnings({"ErrorNotRethrown"})
protected void finalChecks() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiNodeAbstractTest.java
index 835f7d8..2650fec 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiNodeAbstractTest.java
@@ -145,10 +145,10 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
* @param ignite Grid.
* @param itemKey Item key.
* @param retry Retry count.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("unchecked")
- private void onItemNear(boolean putCntr, Ignite ignite, String itemKey, int retry) throws GridException {
+ private void onItemNear(boolean putCntr, Ignite ignite, String itemKey, int retry) throws IgniteCheckedException {
GridCache<String, Integer> cache = ignite.cache(null);
UUID locId = ignite.cluster().localNode().id();
@@ -197,10 +197,10 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
* @param ignite Grid.
* @param itemKey Item key.
* @param retry Retry count.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("unchecked")
- private void onItemPrimary(boolean putCntr, Ignite ignite, String itemKey, int retry) throws GridException {
+ private void onItemPrimary(boolean putCntr, Ignite ignite, String itemKey, int retry) throws IgniteCheckedException {
GridCache<String, Integer> cache = ignite.cache(null);
UUID locId = ignite.cluster().localNode().id();
@@ -250,10 +250,10 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
* @param putCntr Put counter to cache.
* @param ignite Grid.
* @param retry Retry count.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("unchecked")
- private void onRemoveItemQueried(boolean putCntr, Ignite ignite, int retry) throws GridException {
+ private void onRemoveItemQueried(boolean putCntr, Ignite ignite, int retry) throws IgniteCheckedException {
GridCache<String, Integer> cache = ignite.cache(null);
UUID locId = ignite.cluster().localNode().id();
@@ -340,10 +340,10 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
* @param putCntr Put counter to cache.
* @param ignite Grid.
* @param retry Retry count.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("unchecked")
- private void onRemoveItemSimple(boolean putCntr, Ignite ignite, int retry) throws GridException {
+ private void onRemoveItemSimple(boolean putCntr, Ignite ignite, int retry) throws IgniteCheckedException {
GridCache<String, Integer> cache = ignite.cache(null);
UUID locId = ignite.cluster().localNode().id();
@@ -408,9 +408,9 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
*
* @param putCntr Put counter to cache.
* @param ignite Grid.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private void retries(Ignite ignite, boolean putCntr) throws GridException {
+ private void retries(Ignite ignite, boolean putCntr) throws IgniteCheckedException {
UUID nodeId = ignite.cluster().localNode().id();
for (int i = 0; i < RETRIES; i++) {
@@ -436,9 +436,9 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
*
* @param putCntr Put counter to cache.
* @param ignite Grid.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private void removeRetriesQueried(Ignite ignite, boolean putCntr) throws GridException {
+ private void removeRetriesQueried(Ignite ignite, boolean putCntr) throws IgniteCheckedException {
for (int i = 0; i < RETRIES; i++) {
if (DEBUG)
ignite.log().info("***");
@@ -460,9 +460,9 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
*
* @param putCntr Put counter to cache.
* @param ignite Grid.
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private void removeRetriesSimple(Ignite ignite, boolean putCntr) throws GridException {
+ private void removeRetriesSimple(Ignite ignite, boolean putCntr) throws IgniteCheckedException {
for (int i = 0; i < RETRIES; i++) {
if (DEBUG)
ignite.log().info("***");
@@ -545,8 +545,8 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
try {
retries(grid(gridId), false);
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
});
@@ -588,8 +588,8 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
try {
retries(grid(gridId), true);
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
});
@@ -773,8 +773,8 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
try {
removeRetriesQueried(grid(gridId), true);
}
- catch (GridException e) {
- throw new GridRuntimeException(e);
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
}
}
});
@@ -799,9 +799,9 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
}
/**
- * @throws GridException If failed.
+ * @throws IgniteCheckedException If failed.
*/
- private void printCounter() throws GridException {
+ private void printCounter() throws IgniteCheckedException {
info("***");
info("*** Peeked counter: " + grid(0).cache(null).peek(CNTR_KEY));
info("*** Got counter: " + grid(0).cache(null).get(CNTR_KEY));
@@ -819,7 +819,7 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public Integer call() throws GridException {
+ @Override public Integer call() throws IgniteCheckedException {
assertNotNull(ignite);
ignite.log().info("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
@@ -846,7 +846,7 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public Integer call() throws GridException {
+ @Override public Integer call() throws IgniteCheckedException {
assertNotNull(ignite);
ignite.log().info("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
@@ -873,7 +873,7 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public Integer call() throws GridException {
+ @Override public Integer call() throws IgniteCheckedException {
assertNotNull(ignite);
ignite.log().info("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
@@ -900,7 +900,7 @@ public abstract class GridCacheTxMultiNodeAbstractTest extends GridCommonAbstrac
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public Integer call() throws GridException {
+ @Override public Integer call() throws IgniteCheckedException {
assertNotNull(ignite);
ignite.log().info("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiThreadedAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiThreadedAbstractTest.java
index 383362c..1e2811f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiThreadedAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMultiThreadedAbstractTest.java
@@ -88,7 +88,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticReadCommittedCommitMultithreaded() throws Exception {
checkCommitMultithreaded(PESSIMISTIC, READ_COMMITTED);
@@ -97,7 +97,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception {
checkCommitMultithreaded(PESSIMISTIC, REPEATABLE_READ);
@@ -106,7 +106,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticSerializableCommitMultithreaded() throws Exception {
checkCommitMultithreaded(PESSIMISTIC, SERIALIZABLE);
@@ -115,7 +115,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticReadCommittedCommitMultithreaded() throws Exception {
checkCommitMultithreaded(OPTIMISTIC, READ_COMMITTED);
@@ -124,7 +124,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticRepeatableReadCommitMultithreaded() throws Exception {
checkCommitMultithreaded(OPTIMISTIC, REPEATABLE_READ);
@@ -133,7 +133,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticSerializableCommitMultithreaded() throws Exception {
checkCommitMultithreaded(OPTIMISTIC, SERIALIZABLE);
@@ -142,7 +142,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticReadCommittedRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(PESSIMISTIC, READ_COMMITTED);
@@ -151,7 +151,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticRepeatableReadRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(PESSIMISTIC, REPEATABLE_READ);
@@ -160,7 +160,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticSerializableRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(PESSIMISTIC, SERIALIZABLE);
@@ -169,7 +169,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticReadCommittedRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(OPTIMISTIC, READ_COMMITTED);
@@ -178,7 +178,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticRepeatableReadRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(OPTIMISTIC, REPEATABLE_READ);
@@ -187,7 +187,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticSerializableRollbackMultithreaded() throws Exception {
checkRollbackMultithreaded(OPTIMISTIC, SERIALIZABLE);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxSingleThreadedAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxSingleThreadedAbstractTest.java
index 7c77a3e..98f30a6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxSingleThreadedAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxSingleThreadedAbstractTest.java
@@ -20,7 +20,7 @@ import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
@SuppressWarnings( {"BusyWait"})
public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxAbstractTest {
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticReadCommittedCommit() throws Exception {
checkCommit(PESSIMISTIC, READ_COMMITTED);
@@ -29,7 +29,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticRepeatableReadCommit() throws Exception {
checkCommit(PESSIMISTIC, REPEATABLE_READ);
@@ -38,7 +38,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticSerializableCommit() throws Exception {
checkCommit(PESSIMISTIC, SERIALIZABLE);
@@ -47,7 +47,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void _testOptimisticReadCommittedCommit() throws Exception { // TODO GG-9141
checkCommit(OPTIMISTIC, READ_COMMITTED);
@@ -56,7 +56,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticRepeatableReadCommit() throws Exception {
checkCommit(OPTIMISTIC, REPEATABLE_READ);
@@ -65,7 +65,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticSerializableCommit() throws Exception {
checkCommit(OPTIMISTIC, SERIALIZABLE);
@@ -74,7 +74,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticReadCommittedRollback() throws Exception {
checkRollback(PESSIMISTIC, READ_COMMITTED);
@@ -83,7 +83,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticRepeatableReadRollback() throws Exception {
checkRollback(PESSIMISTIC, REPEATABLE_READ);
@@ -92,7 +92,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testPessimisticSerializableRollback() throws Exception {
checkRollback(PESSIMISTIC, SERIALIZABLE);
@@ -101,7 +101,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticReadCommittedRollback() throws Exception {
checkRollback(OPTIMISTIC, READ_COMMITTED);
@@ -110,7 +110,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticRepeatableReadRollback() throws Exception {
checkRollback(OPTIMISTIC, REPEATABLE_READ);
@@ -119,7 +119,7 @@ public abstract class GridCacheTxSingleThreadedAbstractTest extends GridCacheTxA
}
/**
- * @throws GridException If test failed.
+ * @throws IgniteCheckedException If test failed.
*/
public void testOptimisticSerializableRollback() throws Exception {
checkRollback(OPTIMISTIC, SERIALIZABLE);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxStoreExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxStoreExceptionAbstractSelfTest.java
index 516f4a4..c19757f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxStoreExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxStoreExceptionAbstractSelfTest.java
@@ -9,10 +9,10 @@
package org.gridgain.grid.kernal.processors.cache;
+import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.store.*;
import org.gridgain.grid.kernal.*;
@@ -313,7 +313,7 @@ public abstract class GridCacheTxStoreExceptionAbstractSelfTest extends GridCach
fail("Transaction should fail.");
}
- catch (GridException e) {
+ catch (IgniteCheckedException e) {
log.info("Expected exception: " + e);
}
@@ -588,43 +588,43 @@ public abstract class GridCacheTxStoreExceptionAbstractSelfTest extends GridCach
}
- @Nullable @Override public Object load(@Nullable GridCacheTx tx, Object key) throws GridException {
+ @Nullable @Override public Object load(@Nullable GridCacheTx tx, Object key) throws IgniteCheckedException {
return null;
}
@Override public void loadCache(IgniteBiInClosure<Object, Object> clo, @Nullable Object... args)
- throws GridException {
+ throws IgniteCheckedException {
if (fail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
@Override public void loadAll(@Nullable GridCacheTx tx, Collection<?> keys, IgniteBiInClosure<Object, Object> c)
- throws GridException {
+ throws IgniteCheckedException {
}
- @Override public void put(@Nullable GridCacheTx tx, Object key, Object val) throws GridException {
+ @Override public void put(@Nullable GridCacheTx tx, Object key, Object val) throws IgniteCheckedException {
if (fail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
- @Override public void putAll(@Nullable GridCacheTx tx, Map<?, ?> map) throws GridException {
+ @Override public void putAll(@Nullable GridCacheTx tx, Map<?, ?> map) throws IgniteCheckedException {
if (fail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
- @Override public void remove(@Nullable GridCacheTx tx, Object key) throws GridException {
+ @Override public void remove(@Nullable GridCacheTx tx, Object key) throws IgniteCheckedException {
if (fail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
- @Override public void removeAll(@Nullable GridCacheTx tx, Collection<?> keys) throws GridException {
+ @Override public void removeAll(@Nullable GridCacheTx tx, Collection<?> keys) throws IgniteCheckedException {
if (fail)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
- @Override public void txEnd(GridCacheTx tx, boolean commit) throws GridException {
+ @Override public void txEnd(GridCacheTx tx, boolean commit) throws IgniteCheckedException {
if (fail && commit)
- throw new GridException("Store exception");
+ throw new IgniteCheckedException("Store exception");
}
}
}