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/17 17:22:44 UTC
[01/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-26-2 [created] 90948e67a
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
index 19436e2d..68dfb29 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
@@ -727,7 +727,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
+ @Override public InternalFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
return null;
}
@@ -914,7 +914,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> future() {
+ @Override public <R> InternalFuture<R> future() {
return null;
}
}
@@ -994,7 +994,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html) {
+ @Override public InternalFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html) {
return null;
}
@@ -1208,7 +1208,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> future() {
+ @Override public <R> InternalFuture<R> future() {
return null;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopJobTrackerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopJobTrackerSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopJobTrackerSelfTest.java
index b1cc968..5d8a1c5 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopJobTrackerSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopJobTrackerSelfTest.java
@@ -217,7 +217,7 @@ public class GridHadoopJobTrackerSelfTest extends GridHadoopAbstractSelfTest {
assert stat != null;
- IgniteFuture<?> fut = hadoop.finishFuture(jobId);
+ InternalFuture<?> fut = hadoop.finishFuture(jobId);
if (!complete)
assertFalse(fut.isDone());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
index 02a2ea5..e869ce1 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
@@ -109,7 +109,7 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest
job.setJarByClass(GridHadoopWordCount2.class);
- IgniteFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
+ InternalFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
createJobInfo(job.getConfiguration()));
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
index b92b432..88c52b0 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
@@ -18,7 +18,6 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.processors.hadoop.counter.*;
import org.gridgain.grid.kernal.processors.hadoop.examples.*;
@@ -89,7 +88,7 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest {
GridHadoopJobId jobId = new GridHadoopJobId(UUID.randomUUID(), 1);
- IgniteFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(job.getConfiguration()));
+ InternalFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(job.getConfiguration()));
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
index 4c8a139..a013d36 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
@@ -18,7 +18,6 @@ import org.apache.hadoop.mapreduce.lib.output.*;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.ggfs.hadoop.v1.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.util.lang.*;
@@ -137,7 +136,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
job.setJarByClass(getClass());
- IgniteFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
+ InternalFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
createJobInfo(job.getConfiguration()));
fut.get();
@@ -183,7 +182,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
GridHadoopJobId jobId = new GridHadoopJobId(UUID.randomUUID(), 2);
- IgniteFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(job.getConfiguration()));
+ InternalFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(job.getConfiguration()));
fut.get();
@@ -220,7 +219,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
job.setJarByClass(getClass());
- final IgniteFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 3),
+ final InternalFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 3),
createJobInfo(job.getConfiguration()));
GridTestUtils.assertThrows(log, new Callable<Object>() {
@@ -308,7 +307,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
GridHadoopJobId jobId = new GridHadoopJobId(UUID.randomUUID(), 1);
- final IgniteFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(cfg));
+ final InternalFuture<?> fut = grid(0).hadoop().submit(jobId, createJobInfo(cfg));
if (!GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
@@ -359,7 +358,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
assertFalse(killRes);
- final IgniteFuture<?> fut = hadoop.submit(jobId, createJobInfo(cfg));
+ final InternalFuture<?> fut = hadoop.submit(jobId, createJobInfo(cfg));
if (!GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorServiceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorServiceTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorServiceTest.java
index 1e5aefc..1035194 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorServiceTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorServiceTest.java
@@ -1,6 +1,6 @@
package org.gridgain.grid.kernal.processors.hadoop.taskexecutor;
-import org.apache.ignite.lang.IgniteFuture;
+import org.apache.ignite.lang.InternalFuture;
import org.gridgain.grid.util.typedef.X;
import org.gridgain.testframework.junits.common.GridCommonAbstractTest;
import org.jdk8.backport.LongAdder;
@@ -66,7 +66,7 @@ public class GridHadoopExecutorServiceTest extends GridCommonAbstractTest {
final AtomicBoolean finish = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!finish.get()) {
exec.submit(new Callable<Void>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
index b8359f7..4a4ffa8 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
@@ -18,7 +18,6 @@ import org.apache.hadoop.mapreduce.lib.output.*;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.processors.hadoop.*;
import org.gridgain.grid.util.typedef.*;
@@ -86,7 +85,7 @@ public class GridHadoopExternalTaskExecutionSelfTest extends GridHadoopAbstractS
job.setJarByClass(getClass());
- IgniteFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
+ InternalFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
createJobInfo(job.getConfiguration()));
fut.get();
@@ -122,7 +121,7 @@ public class GridHadoopExternalTaskExecutionSelfTest extends GridHadoopAbstractS
job.setJarByClass(getClass());
- IgniteFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
+ InternalFuture<?> fut = grid(0).hadoop().submit(new GridHadoopJobId(UUID.randomUUID(), 1),
createJobInfo(job.getConfiguration()));
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/test/java/org/gridgain/loadtests/ggfs/GridGgfsPerformanceBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/loadtests/ggfs/GridGgfsPerformanceBenchmark.java b/modules/hadoop/src/test/java/org/gridgain/loadtests/ggfs/GridGgfsPerformanceBenchmark.java
index d76bd45..2d591a0 100644
--- a/modules/hadoop/src/test/java/org/gridgain/loadtests/ggfs/GridGgfsPerformanceBenchmark.java
+++ b/modules/hadoop/src/test/java/org/gridgain/loadtests/ggfs/GridGgfsPerformanceBenchmark.java
@@ -78,7 +78,7 @@ public class GridGgfsPerformanceBenchmark {
long start = System.currentTimeMillis();
- IgniteFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
@Override public void run() {
String fileIdx = op == OP_READ ? String.valueOf(idx.getAndIncrement()) : UUID.randomUUID().toString();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index 407e112..0389738 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -504,7 +504,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest {
public void testIteratorsCleanup() throws Exception {
final GridCache<Long, Long> cache = populate();
- IgniteFuture<?> offHeapFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> offHeapFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
Iterator<Map.Entry<Long, Long>> ohIt = cache.offHeapIterator();
@@ -527,7 +527,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest {
}
}, 20);
- IgniteFuture<?> swapFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> swapFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
Iterator<Map.Entry<Long, Long>> ohIt = cache.swapIterator();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
index 15d3b2a..f6ac616 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
@@ -17,7 +17,6 @@ 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.file.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.eviction.lru.*;
import org.gridgain.grid.cache.query.*;
@@ -252,7 +251,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
Random rnd = new Random();
@@ -332,7 +331,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
Random rnd = new Random();
@@ -416,7 +415,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
Random rnd = new Random();
@@ -497,7 +496,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
Random rnd = new Random();
@@ -577,7 +576,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final GridCacheQuery<Map.Entry<Integer, Integer>> qry = c.queries().createSqlQuery(Integer.class, "_val >= 0");
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new CAX() {
@Override public void applyx() throws IgniteCheckedException {
int iter = 0;
@@ -641,7 +640,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
int iter = 0;
@@ -723,7 +722,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (!stop.get()) {
Collection<Integer> rmtVals = rdcQry.execute(rmtRdc).get();
@@ -792,7 +791,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
final GridCacheQuery<Map.Entry<Integer, Integer>> qry = c.queries().createScanQuery(null);
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new CAX() {
@Override public void applyx() throws IgniteCheckedException {
int iter = 0;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index 430c4cb..57fe6ad 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -80,7 +80,7 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
final CountDownLatch startLatch = new CountDownLatch(1);
- IgniteFuture<?> fut1 = multithreadedAsync(new Callable() {
+ InternalFuture<?> fut1 = multithreadedAsync(new Callable() {
@Override public Object call() throws Exception {
for (int i = 1; i < keyCnt; i++) {
assertTrue(c.putx(String.valueOf(i), i));
@@ -118,7 +118,7 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
startLatch.await();
- IgniteFuture<?> fut2 = multithreadedAsync(new Callable() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Callable() {
@Override public Object call() throws Exception {
int cnt = 0;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
index a41611e..1a0025e 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
@@ -107,7 +107,7 @@ public class GridCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTest
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut1 = multithreadedAsync(new CAX() {
+ InternalFuture<?> fut1 = multithreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (!done.get()) {
GridCacheQuery<Map.Entry<Integer, Integer>> qry =
@@ -133,7 +133,7 @@ public class GridCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTest
for (int i = 0; i < GRID_CNT; i++)
grid(i).events().localListen(lsnr, IgniteEventType.EVT_CACHE_PRELOAD_STOPPED);
- IgniteFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
@SuppressWarnings({"BusyWait"})
@Override public Object call() throws Exception {
while (!done.get()) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
index d72d004..5fe02f2 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.query.*;
import org.gridgain.grid.kernal.*;
@@ -412,7 +411,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
assertEquals(1, futs.size());
GridCloseableIterator<IgniteBiTuple<Integer, Integer>> iter =
- (GridCloseableIterator<IgniteBiTuple<Integer, Integer>>)((IgniteFuture)F.first(futs.values()).get()).get();
+ (GridCloseableIterator<IgniteBiTuple<Integer, Integer>>)((InternalFuture)F.first(futs.values()).get()).get();
ResultSet rs = U.field(iter, "data");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexRebuildTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexRebuildTest.java
index b288f0b..7e5f16c 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -57,7 +57,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
try {
U.sleep(Long.MAX_VALUE);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
interrupted = true;
}
}
@@ -199,13 +199,13 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
spi.sleepInRebuild = false;
- final IgniteFuture<?> fut1 = grid(0).cache(null).queries().rebuildIndexes(TestValue1.class);
+ final InternalFuture<?> fut1 = grid(0).cache(null).queries().rebuildIndexes(TestValue1.class);
assertFalse(fut1.isCancelled());
fut1.get();
- final IgniteFuture<?> fut2 = grid(0).cache(null).queries().rebuildAllIndexes();
+ final InternalFuture<?> fut2 = grid(0).cache(null).queries().rebuildAllIndexes();
assertFalse(fut2.isCancelled());
@@ -215,7 +215,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
/**
* @throws Exception if failed.
*/
- private void checkCancel(final IgniteFuture<?> fut) throws Exception {
+ private void checkCancel(final InternalFuture<?> fut) throws Exception {
assertTrue(fut.cancel());
GridTestUtils.assertThrows(log, new Callable<Void>() {
@@ -224,7 +224,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
fut.get();
return null;
}
- }, IgniteFutureCancelledException.class, null);
+ }, InternalFutureCancelledException.class, null);
assertTrue(spi.interrupted);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 1f22529..069d712 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -129,7 +129,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
final AtomicBoolean stop = new AtomicBoolean();
final AtomicReference<Exception> err = new AtomicReference<>();
- IgniteFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+ InternalFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
WKTReader r = new WKTReader();
@@ -153,7 +153,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
}
}, Runtime.getRuntime().availableProcessors(), "put-thread");
- IgniteFuture<?> qryFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+ InternalFuture<?> qryFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
WKTReader r = new WKTReader();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/scalar/src/main/scala/org/gridgain/scalar/pimps/ScalarProjectionPimp.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/gridgain/scalar/pimps/ScalarProjectionPimp.scala b/modules/scalar/src/main/scala/org/gridgain/scalar/pimps/ScalarProjectionPimp.scala
index 1a18012..637abe8 100644
--- a/modules/scalar/src/main/scala/org/gridgain/scalar/pimps/ScalarProjectionPimp.scala
+++ b/modules/scalar/src/main/scala/org/gridgain/scalar/pimps/ScalarProjectionPimp.scala
@@ -12,7 +12,7 @@
package org.gridgain.scalar.pimps
import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterGroup, ClusterNode}
-import org.apache.ignite.lang.{IgniteFutureCancelledException, IgniteFuture, IgnitePredicate}
+import org.apache.ignite.lang.{InternalFutureCancelledException, InternalFuture, IgnitePredicate}
import org.apache.ignite._
import org.gridgain.grid._
import org.jetbrains.annotations._
@@ -370,7 +370,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
def callAsync$[R](@Nullable s: Seq[Call[R]], @Nullable p: NF):
- IgniteFuture[java.util.Collection[R]] = {
+ InternalFuture[java.util.Collection[R]] = {
val comp = value.ignite().compute(forPredicate(p)).enableAsync()
comp.call[R](toJavaCollection(s, (f: Call[R]) => toCallable(f)))
@@ -388,7 +388,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* closures were executed or `null` (see above).
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
- def #?[R](@Nullable s: Seq[Call[R]], @Nullable p: NF): IgniteFuture[java.util.Collection[R]] = {
+ def #?[R](@Nullable s: Seq[Call[R]], @Nullable p: NF): InternalFuture[java.util.Collection[R]] = {
callAsync$(s, p)
}
@@ -403,7 +403,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* closures were executed or `null` (see above).
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
- def callAsync$[R](@Nullable s: Call[R], @Nullable p: NF): IgniteFuture[java.util.Collection[R]] = {
+ def callAsync$[R](@Nullable s: Call[R], @Nullable p: NF): InternalFuture[java.util.Collection[R]] = {
callAsync$(Seq(s), p)
}
@@ -417,7 +417,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* closures were executed or `null` (see above).
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
- def #?[R](@Nullable s: Call[R], @Nullable p: NF): IgniteFuture[java.util.Collection[R]] = {
+ def #?[R](@Nullable s: Call[R], @Nullable p: NF): InternalFuture[java.util.Collection[R]] = {
callAsync$(s, p)
}
@@ -430,7 +430,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @param p Optional node filter predicate. If `null` provided - all nodes in projection will be used.
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
- def runAsync$(@Nullable s: Seq[Run], @Nullable p: NF): IgniteFuture[_] = {
+ def runAsync$(@Nullable s: Seq[Run], @Nullable p: NF): InternalFuture[_] = {
val comp = value.ignite().compute(forPredicate(p)).enableAsync()
comp.run(toJavaCollection(s, (f: Run) => toRunnable(f)))
@@ -446,7 +446,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @param p Optional node filter predicate. If `null` provided - all nodes in projection will be used.
* @see `org.gridgain.grid.GridProjection.call(...)`
*/
- def *?(@Nullable s: Seq[Run], @Nullable p: NF): IgniteFuture[_] = {
+ def *?(@Nullable s: Seq[Run], @Nullable p: NF): InternalFuture[_] = {
runAsync$(s, p)
}
@@ -459,7 +459,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @param p Optional node filter predicate. If `null` provided - all nodes in projection will be used.
* @see `org.gridgain.grid.GridProjection.run(...)`
*/
- def runAsync$(@Nullable s: Run, @Nullable p: NF): IgniteFuture[_] = {
+ def runAsync$(@Nullable s: Run, @Nullable p: NF): InternalFuture[_] = {
runAsync$(Seq(s), p)
}
@@ -471,7 +471,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @param p Optional node filter predicate. If `null` provided - all nodes in projection will be used.
* @see `org.gridgain.grid.GridProjection.run(...)`
*/
- def *?(@Nullable s: Run, @Nullable p: NF): IgniteFuture[_] = {
+ def *?(@Nullable s: Run, @Nullable p: NF): InternalFuture[_] = {
runAsync$(s, p)
}
@@ -487,7 +487,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @return Future over the reduced result or `null` (see above).
* @see `org.gridgain.grid.GridProjection.reduce(...)`
*/
- def reduceAsync$[R1, R2](s: Seq[Call[R1]], r: Seq[R1] => R2, @Nullable p: NF): IgniteFuture[R2] = {
+ def reduceAsync$[R1, R2](s: Seq[Call[R1]], r: Seq[R1] => R2, @Nullable p: NF): InternalFuture[R2] = {
assert(s != null && r != null)
val comp = value.ignite().compute(forPredicate(p)).enableAsync()
@@ -508,7 +508,7 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* @return Future over the reduced result or `null` (see above).
* @see `org.gridgain.grid.GridProjection.reduce(...)`
*/
- def @?[R1, R2](s: Seq[Call[R1]], r: Seq[R1] => R2, @Nullable p: NF): IgniteFuture[R2] = {
+ def @?[R1, R2](s: Seq[Call[R1]], r: Seq[R1] => R2, @Nullable p: NF): InternalFuture[R2] = {
reduceAsync$(s, r, p)
}
@@ -594,8 +594,8 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* Note that in case of dynamic projection this method will take a snapshot of all the
* nodes at the time of this call, apply all filtering predicates, if any, and if the
* resulting collection of nodes is empty - the exception will be thrown.
- * @throws GridInterruptedException Subclass of `IgniteCheckedException` thrown if the wait was interrupted.
- * @throws IgniteFutureCancelledException Subclass of `IgniteCheckedException` thrown if computation was cancelled.
+ * @throws InternalInterruptedException Subclass of `IgniteCheckedException` thrown if the wait was interrupted.
+ * @throws InternalFutureCancelledException Subclass of `IgniteCheckedException` thrown if computation was cancelled.
*/
def affinityRun$(cacheName: String, @Nullable affKey: Any, @Nullable r: Run, @Nullable p: NF) {
affinityRunAsync$(cacheName, affKey, r, p).get
@@ -639,11 +639,11 @@ class ScalarProjectionPimp[A <: ClusterGroup] extends PimpedType[A] with Iterabl
* nodes at the time of this call, apply all filtering predicates, if any, and if the
* resulting collection of nodes is empty - the exception will be thrown.
* @return Non-cancellable future of this execution.
- * @throws GridInterruptedException Subclass of `IgniteCheckedException` thrown if the wait was interrupted.
- * @throws IgniteFutureCancelledException Subclass of `IgniteCheckedException` thrown if computation was cancelled.
+ * @throws InternalInterruptedException Subclass of `IgniteCheckedException` thrown if the wait was interrupted.
+ * @throws InternalFutureCancelledException Subclass of `IgniteCheckedException` thrown if computation was cancelled.
*/
def affinityRunAsync$(cacheName: String, @Nullable affKey: Any, @Nullable r: Run,
- @Nullable p: NF): IgniteFuture[_] = {
+ @Nullable p: NF): InternalFuture[_] = {
val comp = value.ignite().compute(forPredicate(p)).enableAsync()
comp.affinityRun(cacheName, affKey, toRunnable(r))
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/schedule/src/main/java/org/gridgain/grid/kernal/processors/schedule/ScheduleFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/schedule/src/main/java/org/gridgain/grid/kernal/processors/schedule/ScheduleFutureImpl.java b/modules/schedule/src/main/java/org/gridgain/grid/kernal/processors/schedule/ScheduleFutureImpl.java
index 7fc8996..9d7a9eb 100644
--- a/modules/schedule/src/main/java/org/gridgain/grid/kernal/processors/schedule/ScheduleFutureImpl.java
+++ b/modules/schedule/src/main/java/org/gridgain/grid/kernal/processors/schedule/ScheduleFutureImpl.java
@@ -70,7 +70,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
private final AtomicBoolean descheduled = new AtomicBoolean(false);
/** Listeners. */
- private Collection<IgniteInClosure<? super IgniteFuture<R>>> lsnrs =
+ private Collection<IgniteInClosure<? super InternalFuture<R>>> lsnrs =
new ArrayList<>(1);
/** Statistics. */
@@ -569,7 +569,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
}
/** {@inheritDoc} */
- @Override public void listenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ @Override public void listenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>> lsnr) {
if (lsnr != null) {
Throwable err;
R res;
@@ -599,7 +599,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>>... lsnr) {
if (!F.isEmpty(lsnr))
synchronized (mux) {
lsnrs.removeAll(F.asList(lsnr));
@@ -608,7 +608,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
/** {@inheritDoc} */
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
- @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ @Override public <T> InternalFuture<T> chain(final IgniteClosure<? super InternalFuture<R>, T> doneCb) {
final GridFutureAdapter<T> fut = new GridFutureAdapter<T>(ctx, syncNotify) {
@Override public String toString() {
return "ChainFuture[orig=" + ScheduleFutureImpl.this + ", doneCb=" + doneCb + ']';
@@ -626,7 +626,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
* @param err Last execution error.
* @param syncNotify Synchronous notification flag.
*/
- private void notifyListener(final IgniteInClosure<? super IgniteFuture<R>> lsnr, R res, Throwable err,
+ private void notifyListener(final IgniteInClosure<? super InternalFuture<R>> lsnr, R res, Throwable err,
boolean syncNotify) {
assert lsnr != null;
assert !Thread.holdsLock(mux);
@@ -655,7 +655,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
* @param err Last execution error.
*/
private void notifyListeners(R res, Throwable err) {
- final Collection<IgniteInClosure<? super IgniteFuture<R>>> tmp;
+ final Collection<IgniteInClosure<? super InternalFuture<R>>> tmp;
synchronized (mux) {
tmp = new ArrayList<>(lsnrs);
@@ -664,7 +664,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
final SchedulerFuture<R> snapshot = snapshot(res, err);
if (concurNotify) {
- for (final IgniteInClosure<? super IgniteFuture<R>> lsnr : tmp)
+ for (final IgniteInClosure<? super InternalFuture<R>> lsnr : tmp)
ctx.closure().runLocalSafe(new GPR() {
@Override public void run() {
lsnr.apply(snapshot);
@@ -674,7 +674,7 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
else {
ctx.closure().runLocalSafe(new GPR() {
@Override public void run() {
- for (IgniteInClosure<? super IgniteFuture<R>> lsnr : tmp)
+ for (IgniteInClosure<? super InternalFuture<R>> lsnr : tmp)
lsnr.apply(snapshot);
}
}, true);
@@ -685,12 +685,12 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
* Checks that the future is in valid state for get operation.
*
* @return Latch or {@code null} if future has been finished.
- * @throws org.apache.ignite.lang.IgniteFutureCancelledException If was cancelled.
+ * @throws InternalFutureCancelledException If was cancelled.
*/
- @Nullable private CountDownLatch ensureGet() throws IgniteFutureCancelledException {
+ @Nullable private CountDownLatch ensureGet() throws InternalFutureCancelledException {
synchronized (mux) {
if (cancelled)
- throw new IgniteFutureCancelledException("Scheduling has been cancelled: " + this);
+ throw new InternalFutureCancelledException("Scheduling has been cancelled: " + this);
if (done)
return null;
@@ -711,12 +711,12 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
Thread.currentThread().interrupt();
if (isCancelled())
- throw new IgniteFutureCancelledException(e);
+ throw new InternalFutureCancelledException(e);
if (isDone())
return last();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -737,19 +737,19 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
if (latch.await(timeout, unit))
return last();
else
- throw new IgniteFutureTimeoutException("Timed out waiting for completion of next " +
+ throw new InternalFutureTimeoutException("Timed out waiting for completion of next " +
"scheduled computation: " + this);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
if (isCancelled())
- throw new IgniteFutureCancelledException(e);
+ throw new InternalFutureCancelledException(e);
if (isDone())
return last();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -929,17 +929,17 @@ class ScheduleFutureImpl<R> extends GridMetadataAwareAdapter implements Schedule
}
/** {@inheritDoc} */
- @Override public void listenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ @Override public void listenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>> lsnr) {
ref.listenAsync(lsnr);
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>>... lsnr) {
ref.stopListenAsync(lsnr);
}
/** {@inheritDoc} */
- @Override public <T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ @Override public <T> InternalFuture<T> chain(IgniteClosure<? super InternalFuture<R>, T> doneCb) {
return ref.chain(doneCb);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/schedule/src/test/java/org/gridgain/grid/kernal/GridScheduleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/schedule/src/test/java/org/gridgain/grid/kernal/GridScheduleSelfTest.java b/modules/schedule/src/test/java/org/gridgain/grid/kernal/GridScheduleSelfTest.java
index f0b5297..7d72147 100644
--- a/modules/schedule/src/test/java/org/gridgain/grid/kernal/GridScheduleSelfTest.java
+++ b/modules/schedule/src/test/java/org/gridgain/grid/kernal/GridScheduleSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.scheduler.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.lang.*;
import org.gridgain.testframework.junits.common.*;
@@ -55,7 +54,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest {
*/
public void testRunLocal() throws Exception {
for (int i = 0; i < NODES_CNT; i++) {
- IgniteFuture<?> fut = grid(i).scheduler().runLocal(new TestRunnable());
+ InternalFuture<?> fut = grid(i).scheduler().runLocal(new TestRunnable());
assert fut.get() == null;
@@ -68,7 +67,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest {
*/
public void testCallLocal() throws Exception {
for (int i = 0; i < NODES_CNT; i++) {
- IgniteFuture<?> fut = grid(i).scheduler().callLocal(new TestCallable());
+ InternalFuture<?> fut = grid(i).scheduler().callLocal(new TestCallable());
assertEquals(1, fut.get());
@@ -105,8 +104,8 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest {
final AtomicInteger notifyCnt = new AtomicInteger();
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
notifyCnt.incrementAndGet();
}
});
@@ -163,8 +162,8 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest {
final AtomicInteger notifyCnt = new AtomicInteger();
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
notifyCnt.incrementAndGet();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceConcurrentUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceConcurrentUndeploySelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceConcurrentUndeploySelfTest.java
index 4947af2..d4c5e1c 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceConcurrentUndeploySelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceConcurrentUndeploySelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -111,7 +110,7 @@ public class GridResourceConcurrentUndeploySelfTest extends GridCommonAbstractTe
cnt = new CountDownLatch(2);
- ComputeTaskFuture<?> res = executeAsync(ignite1.compute(), UserResourceTask1.class, true);
+ InternalComputeTaskFuture<?> res = executeAsync(ignite1.compute(), UserResourceTask1.class, true);
executeAsync(ignite3.compute(), UserResourceTask2.class, false).get();
@@ -158,7 +157,7 @@ public class GridResourceConcurrentUndeploySelfTest extends GridCommonAbstractTe
cnt = new CountDownLatch(1);
- ComputeTaskFuture<?> res = executeAsync(ignite.compute(), UserResourceTask1.class, true);
+ InternalComputeTaskFuture<?> res = executeAsync(ignite.compute(), UserResourceTask1.class, true);
cnt.await();
@@ -196,7 +195,7 @@ public class GridResourceConcurrentUndeploySelfTest extends GridCommonAbstractTe
cnt = new CountDownLatch(1);
- ComputeTaskFuture<?> res = executeAsync(ignite1.compute(), UserResourceTask1.class, true);
+ InternalComputeTaskFuture<?> res = executeAsync(ignite1.compute(), UserResourceTask1.class, true);
cnt.await();
@@ -238,7 +237,7 @@ public class GridResourceConcurrentUndeploySelfTest extends GridCommonAbstractTe
Class task1 = ldr.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
- ComputeTaskFuture res =
+ InternalComputeTaskFuture res =
executeAsync(ignite1.compute(), task1, new Object[] {ignite2.cluster().localNode().id(), true});
waitForEvent(ignite2, EVT_JOB_STARTED);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/ssh/src/main/java/org/gridgain/grid/util/nodestart/GridNodeCallableImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/gridgain/grid/util/nodestart/GridNodeCallableImpl.java b/modules/ssh/src/main/java/org/gridgain/grid/util/nodestart/GridNodeCallableImpl.java
index 2189f3e..e0ad0f1 100644
--- a/modules/ssh/src/main/java/org/gridgain/grid/util/nodestart/GridNodeCallableImpl.java
+++ b/modules/ssh/src/main/java/org/gridgain/grid/util/nodestart/GridNodeCallableImpl.java
@@ -189,7 +189,7 @@ public class GridNodeCallableImpl implements GridNodeCallable {
return new GridTuple3<>(spec.host(), true, null);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
return new GridTuple3<>(spec.host(), false, e.getMessage());
}
catch (Exception e) {
@@ -208,9 +208,9 @@ public class GridNodeCallableImpl implements GridNodeCallable {
* @param cmd Command.
* @throws JSchException In case of SSH error.
* @throws IOException If IO error occurs.
- * @throws GridInterruptedException If thread was interrupted while waiting.
+ * @throws InternalInterruptedException If thread was interrupted while waiting.
*/
- private void shell(Session ses, String cmd) throws JSchException, IOException, GridInterruptedException {
+ private void shell(Session ses, String cmd) throws JSchException, IOException, InternalInterruptedException {
ChannelShell ch = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java
index ed5c1a7..359de38 100644
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java
@@ -534,7 +534,7 @@ public class GridUriDeploymentSpi extends IgniteSpiAdapter implements Deployment
try {
U.sleep(10000);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/urideploy/src/test/java/org/gridgain/grid/kernal/GridTaskUriDeploymentDeadlockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/gridgain/grid/kernal/GridTaskUriDeploymentDeadlockSelfTest.java b/modules/urideploy/src/test/java/org/gridgain/grid/kernal/GridTaskUriDeploymentDeadlockSelfTest.java
index 3722afd..930f575 100644
--- a/modules/urideploy/src/test/java/org/gridgain/grid/kernal/GridTaskUriDeploymentDeadlockSelfTest.java
+++ b/modules/urideploy/src/test/java/org/gridgain/grid/kernal/GridTaskUriDeploymentDeadlockSelfTest.java
@@ -70,7 +70,7 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes
}
}, EVT_NODE_JOINED);
- IgniteFuture<?> f = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
startGrid(2);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/web/src/test/java/org/gridgain/grid/kernal/websession/GridWebSessionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/gridgain/grid/kernal/websession/GridWebSessionSelfTest.java b/modules/web/src/test/java/org/gridgain/grid/kernal/websession/GridWebSessionSelfTest.java
index e63ab68..69b3bf2 100644
--- a/modules/web/src/test/java/org/gridgain/grid/kernal/websession/GridWebSessionSelfTest.java
+++ b/modules/web/src/test/java/org/gridgain/grid/kernal/websession/GridWebSessionSelfTest.java
@@ -110,7 +110,7 @@ public class GridWebSessionSelfTest extends GridCommonAbstractTest {
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> restarterFut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> restarterFut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@SuppressWarnings("BusyWait")
@Override public Object call() throws Exception {
Random rnd = new Random();
[10/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index d041d0f..5dab909 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -124,7 +124,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -149,7 +149,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
int type = evt.type();
- for (IgniteFuture<?> f : futures()) {
+ for (InternalFuture<?> f : futures()) {
if (isMini(f)) {
MiniFuture mini = (MiniFuture)f;
@@ -173,7 +173,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
*/
@SuppressWarnings( {"unchecked"})
public void onResult(UUID nodeId, GridDhtForceKeysResponse<K, V> res) {
- for (IgniteFuture<Object> f : futures())
+ for (InternalFuture<Object> f : futures())
if (isMini(f)) {
MiniFuture mini = (MiniFuture)f;
@@ -542,7 +542,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
return true;
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
// Fail.
onDone(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java
index ac0b7e6..1e30854 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java
@@ -161,7 +161,7 @@ public class GridDhtPartitionDemandPool<K, V> {
/**
* @return Future for {@link GridCachePreloadMode#SYNC} mode.
*/
- IgniteFuture<?> syncFuture() {
+ InternalFuture<?> syncFuture() {
return syncFut;
}
@@ -206,8 +206,8 @@ public class GridDhtPartitionDemandPool<K, V> {
if (log.isDebugEnabled())
log.debug("Forcing preload event for future: " + exchFut);
- exchFut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ exchFut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
cctx.shared().exchange().forcePreloadExchange(exchFut);
}
});
@@ -362,8 +362,8 @@ public class GridDhtPartitionDemandPool<K, V> {
obj = new GridTimeoutObjectAdapter(delay) {
@Override public void onTimeout() {
- exchFut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> f) {
+ exchFut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> f) {
cctx.shared().exchange().forcePreloadExchange(exchFut);
}
});
@@ -481,10 +481,10 @@ public class GridDhtPartitionDemandPool<K, V> {
* @param entry Preloaded entry.
* @param topVer Topology version.
* @return {@code False} if partition has become invalid during preloading.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
private boolean preloadEntry(ClusterNode pick, int p, GridCacheEntryInfo<K, V> entry, long topVer)
- throws IgniteCheckedException, GridInterruptedException {
+ throws IgniteCheckedException, InternalInterruptedException {
try {
GridCacheEntryEx<K, V> cached = null;
@@ -542,7 +542,7 @@ public class GridDhtPartitionDemandPool<K, V> {
return false;
}
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw e;
}
catch (IgniteCheckedException e) {
@@ -807,12 +807,12 @@ public class GridDhtPartitionDemandPool<K, V> {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
int preloadOrder = cctx.config().getPreloadOrder();
if (preloadOrder > 0) {
- IgniteFuture<?> fut = cctx.kernalContext().cache().orderedPreloadFuture(preloadOrder);
+ InternalFuture<?> fut = cctx.kernalContext().cache().orderedPreloadFuture(preloadOrder);
try {
if (fut != null) {
@@ -823,7 +823,7 @@ public class GridDhtPartitionDemandPool<K, V> {
fut.get();
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to wait for ordered preload future (grid is stopping): " +
"[cacheName=" + cctx.name() + ", preloadOrder=" + preloadOrder + ']');
@@ -903,7 +903,7 @@ public class GridDhtPartitionDemandPool<K, V> {
missed.addAll(set);
}
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw e;
}
catch (ClusterTopologyException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java
index 963ad4c..17077e7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java
@@ -198,7 +198,7 @@ class GridDhtPartitionSupplyPool<K, V> {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!isCancelled()) {
DemandMessage<K, V> msg = poll(queue, this);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 0a95411..7cd3e57 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -122,7 +122,7 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
/** */
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
@GridToStringInclude
- private volatile IgniteFuture<?> partReleaseFut;
+ private volatile InternalFuture<?> partReleaseFut;
/** */
private final Object mux = new Object();
@@ -369,7 +369,7 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
/**
* @return Init future.
*/
- IgniteFuture<?> initFuture() {
+ InternalFuture<?> initFuture() {
return initFut;
}
@@ -396,9 +396,9 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
/**
* Starts activity.
*
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- public void init() throws GridInterruptedException {
+ public void init() throws InternalInterruptedException {
assert oldestNode.get() != null;
if (init.compareAndSet(false, true)) {
@@ -445,7 +445,7 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
cacheCtx.preloader().updateLastExchangeFuture(this);
}
- IgniteFuture<?> partReleaseFut = cctx.partitionReleaseFuture(topVer);
+ InternalFuture<?> partReleaseFut = cctx.partitionReleaseFuture(topVer);
// Assign to class variable so it will be included into toString() method.
this.partReleaseFut = partReleaseFut;
@@ -486,7 +486,7 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
top.beforeExchange(exchId);
}
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
onDone(e);
throw e;
@@ -719,8 +719,8 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
}
}
else {
- initFut.listenAsync(new CI1<IgniteFuture<Boolean>>() {
- @Override public void apply(IgniteFuture<Boolean> t) {
+ initFut.listenAsync(new CI1<InternalFuture<Boolean>>() {
+ @Override public void apply(InternalFuture<Boolean> t) {
try {
if (!t.get()) // Just to check if there was an error.
return;
@@ -817,8 +817,8 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
assert exchId.topologyVersion() == msg.topologyVersion();
- initFut.listenAsync(new CI1<IgniteFuture<Boolean>>() {
- @Override public void apply(IgniteFuture<Boolean> t) {
+ initFut.listenAsync(new CI1<InternalFuture<Boolean>>() {
+ @Override public void apply(InternalFuture<Boolean> t) {
assert msg.lastVersion() != null;
cctx.versions().onReceived(nodeId, msg.lastVersion());
@@ -877,8 +877,8 @@ public class GridDhtPartitionsExchangeFuture<K, V> extends GridFutureAdapter<Lon
try {
// Wait for initialization part of this future to complete.
- initFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ initFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
if (isDone())
return;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index 9706727..766d10c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -253,12 +253,12 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> {
/**
* @return Start future.
*/
- @Override public IgniteFuture<Object> startFuture() {
+ @Override public InternalFuture<Object> startFuture() {
return startFut;
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> syncFuture() {
+ @Override public InternalFuture<?> syncFuture() {
return demandPool.syncFuture();
}
@@ -307,13 +307,13 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> {
* @param msg Force keys message.
*/
private void processForceKeysRequest(final ClusterNode node, final GridDhtForceKeysRequest<K, V> msg) {
- IgniteFuture<?> fut = cctx.mvcc().finishKeys(msg.keys(), msg.topologyVersion());
+ InternalFuture<?> fut = cctx.mvcc().finishKeys(msg.keys(), msg.topologyVersion());
if (fut.isDone())
processForceKeysRequest0(node, msg);
else
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
processForceKeysRequest0(node, msg);
}
});
@@ -418,8 +418,8 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> {
if (log.isDebugEnabled())
log.debug("Processing affinity assignment request [node=" + node + ", req=" + req + ']');
- cctx.affinity().affinityReadyFuture(req.topologyVersion()).listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> fut) {
+ cctx.affinity().affinityReadyFuture(req.topologyVersion()).listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> fut) {
if (log.isDebugEnabled())
log.debug("Affinity is ready for topology version, will send response [topVer=" + topVer +
", node=" + node + ']');
@@ -473,27 +473,27 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> {
@Override public GridDhtFuture<Object> request(Collection<? extends K> keys, long topVer) {
final GridDhtForceKeysFuture<K, V> fut = new GridDhtForceKeysFuture<>(cctx, topVer, keys, this);
- IgniteFuture<?> topReadyFut = cctx.affinity().affinityReadyFuturex(topVer);
+ InternalFuture<?> topReadyFut = cctx.affinity().affinityReadyFuturex(topVer);
if (startFut.isDone() && topReadyFut == null)
fut.init();
else {
if (topReadyFut == null)
- startFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> syncFut) {
+ startFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> syncFut) {
fut.init();
}
});
else {
GridCompoundFuture<Object, Object> compound = new GridCompoundFuture<>(cctx.kernalContext());
- compound.add((IgniteFuture<Object>)startFut);
- compound.add((IgniteFuture<Object>)topReadyFut);
+ compound.add((InternalFuture<Object>)startFut);
+ compound.add((InternalFuture<Object>)topReadyFut);
compound.markInitialized();
- compound.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> syncFut) {
+ compound.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> syncFut) {
fut.init();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearAtomicCache.java
index ce5e19c..a424791 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -325,7 +325,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override protected IgniteFuture<Map<K, V>> getAllAsync(
+ @Override protected InternalFuture<Map<K, V>> getAllAsync(
@Nullable Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@@ -375,7 +375,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> putAsync(K key,
+ @Override public InternalFuture<V> putAsync(K key,
V val,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl,
@@ -385,7 +385,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> putxAsync(K key,
+ @Override public InternalFuture<Boolean> putxAsync(K key,
V val,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl,
@@ -399,7 +399,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(K key, V val) {
return dht.putIfAbsentAsync(key, val);
}
@@ -409,7 +409,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
return dht.putxIfAbsentAsync(key, val);
}
@@ -419,7 +419,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(K key, V val) {
+ @Override public InternalFuture<V> replaceAsync(K key, V val) {
return dht.replaceAsync(key, val);
}
@@ -429,7 +429,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(K key, V val) {
return dht.replacexAsync(key, val);
}
@@ -439,7 +439,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
return dht.replaceAsync(key, oldVal, newVal);
}
@@ -455,13 +455,13 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
return dht.removexAsync(key, val);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
return dht.replacexAsync(key, oldVal, newVal);
}
@@ -472,7 +472,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return dht.putAllAsync(m, filter);
}
@@ -483,7 +483,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException {
+ @Override public InternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException {
return dht.putAllDrAsync(drMap);
}
@@ -499,7 +499,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key,
+ @Override public InternalFuture<?> transformAsync(K key,
IgniteClosure<V, V> transformer,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl) {
@@ -512,7 +512,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
return dht.transformAllAsync(m);
}
@@ -525,7 +525,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> removeAsync(K key,
+ @Override public InternalFuture<V> removeAsync(K key,
@Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return dht.removeAsync(key, entry, filter);
@@ -538,7 +538,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(Collection<? extends K> keys,
IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return dht.removeAllAsync(keys, filter);
}
@@ -552,7 +552,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> removexAsync(K key,
+ @Override public InternalFuture<Boolean> removexAsync(K key,
@Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return dht.removexAsync(key, entry, filter);
@@ -564,7 +564,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> removeAsync(K key, V val) {
return dht.removeAsync(key, val);
}
@@ -574,7 +574,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return dht.removeAllAsync(keySet(filter));
}
@@ -584,12 +584,12 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
+ @Override public InternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
return dht.removeAllDrAsync(drMap);
}
/** {@inheritDoc} */
- @Override protected IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys,
+ @Override protected InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys,
long timeout,
@Nullable GridCacheTxLocalEx<K, V> tx,
boolean isInvalidate,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearCacheAdapter.java
index b785103..267f589 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -161,10 +161,10 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "RedundantCast"})
- @Override public IgniteFuture<Object> readThroughAllAsync(Collection<? extends K> keys, boolean reload,
+ @Override public InternalFuture<Object> readThroughAllAsync(Collection<? extends K> keys, boolean reload,
GridCacheTxEx<K, V> tx, IgnitePredicate<GridCacheEntry<K, V>>[] filter, @Nullable UUID subjId, String taskName,
IgniteBiInClosure<K, V> vis) {
- return (IgniteFuture)loadAsync(tx, keys, reload, false, filter, subjId, taskName, true);
+ return (InternalFuture)loadAsync(tx, keys, reload, false, filter, subjId, taskName, true);
}
/** {@inheritDoc} */
@@ -177,7 +177,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys,
+ @Override public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext());
@@ -216,7 +216,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
/** {@inheritDoc} */
@SuppressWarnings({"unchecked"})
- @Override public IgniteFuture<?> reloadAllAsync() {
+ @Override public InternalFuture<?> reloadAllAsync() {
GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext());
fut.add(super.reloadAllAsync());
@@ -229,7 +229,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
/** {@inheritDoc} */
@SuppressWarnings({"unchecked"})
- @Override public IgniteFuture<?> reloadAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>> filter) {
+ @Override public InternalFuture<?> reloadAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>> filter) {
GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext());
fut.add(super.reloadAllAsync());
@@ -248,7 +248,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
* @param filter Filter.
* @return Loaded values.
*/
- public IgniteFuture<Map<K, V>> loadAsync(@Nullable GridCacheTxEx tx, @Nullable Collection<? extends K> keys,
+ public InternalFuture<Map<K, V>> loadAsync(@Nullable GridCacheTxEx tx, @Nullable Collection<? extends K> keys,
boolean reload, boolean forcePrimary, @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter,
@Nullable UUID subjId, String taskName, boolean deserializePortable) {
if (F.isEmpty(keys))
@@ -274,7 +274,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, Object[] args) {
+ @Override public InternalFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, Object[] args) {
return dht().loadCacheAsync(p, ttl, args);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearGetFuture.java
index 6e1f494..71192b3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -181,8 +180,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
/** {@inheritDoc} */
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<Map<K, V>>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<Map<K, V>> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<Map<K, V>>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<Map<K, V>> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -193,7 +192,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<Map<K, V>> fut : futures())
+ for (InternalFuture<Map<K, V>> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -212,7 +211,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
* @param res Result.
*/
void onResult(UUID nodeId, GridNearGetResponse<K, V> res) {
- for (IgniteFuture<Map<K, V>> fut : futures())
+ for (InternalFuture<Map<K, V>> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -241,7 +240,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<Map<K, V>> f) {
+ private boolean isMini(InternalFuture<Map<K, V>> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -314,8 +313,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
}
// Add new future.
- add(fut.chain(new C1<IgniteFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() {
- @Override public Map<K, V> apply(IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> fut) {
+ add(fut.chain(new C1<InternalFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() {
+ @Override public Map<K, V> apply(InternalFuture<Collection<GridCacheEntryInfo<K, V>>> fut) {
try {
return loadEntries(n.id(), mappedKeys.keySet(), fut.get(), saved, topVer);
}
@@ -703,8 +702,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
else {
final RemapTimeoutObject timeout = new RemapTimeoutObject(ctx.config().getNetworkTimeout(), topVer, e);
- ctx.discovery().topologyFuture(topVer + 1).listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> longIgniteFuture) {
+ ctx.discovery().topologyFuture(topVer + 1).listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> longIgniteFuture) {
if (timeout.finish()) {
ctx.timeout().removeTimeoutObject(timeout);
@@ -753,10 +752,10 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
log.debug("Remapping mini get future [invalidParts=" + invalidParts + ", fut=" + this + ']');
// Need to wait for next topology version to remap.
- IgniteFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer);
+ InternalFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer);
- topFut.listenAsync(new CIX1<IgniteFuture<Long>>() {
- @Override public void applyx(IgniteFuture<Long> fut) throws IgniteCheckedException {
+ topFut.listenAsync(new CIX1<InternalFuture<Long>>() {
+ @Override public void applyx(InternalFuture<Long> fut) throws IgniteCheckedException {
long readyTopVer = fut.get();
// This will append new futures to compound list.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearLockFuture.java
index 15f9a85..a4cd619 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.discovery.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -169,8 +168,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -398,7 +397,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
@Override public boolean onNodeLeft(UUID nodeId) {
boolean found = false;
- for (IgniteFuture<?> fut : futures()) {
+ for (InternalFuture<?> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -432,7 +431,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
if (log.isDebugEnabled())
log.debug("Received lock response from node [nodeId=" + nodeId + ", res=" + res + ", fut=" + this + ']');
- for (IgniteFuture<Boolean> fut : pending()) {
+ for (InternalFuture<Boolean> fut : pending()) {
if (isMini(fut)) {
MiniFuture mini = (MiniFuture)fut;
@@ -623,7 +622,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -683,8 +682,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
markInitialized();
}
else {
- fut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ fut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
mapOnTopology();
}
});
@@ -949,7 +948,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
if (log.isDebugEnabled())
log.debug("Before locally locking near request: " + req);
- IgniteFuture<GridNearLockResponse<K, V>> fut = dht().lockAllAsync(cctx, cctx.localNode(), req, filter);
+ InternalFuture<GridNearLockResponse<K, V>> fut = dht().lockAllAsync(cctx, cctx.localNode(), req, filter);
// Add new future.
add(new GridEmbeddedFuture<>(
@@ -1089,7 +1088,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
add(fut); // Append new future.
- IgniteFuture<?> txSync = null;
+ InternalFuture<?> txSync = null;
if (inTx())
txSync = cctx.tm().awaitFinishAckAsync(node.id(), tx.threadId());
@@ -1108,8 +1107,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B
}
}
else {
- txSync.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ txSync.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
try {
if (log.isDebugEnabled())
log.debug("Sending near lock request [node=" + node.id() + ", req=" + req + ']');
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTransactionalCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 9b4d117..72b755c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -82,7 +82,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
@Nullable final Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@@ -102,7 +102,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
if (tx != null && !tx.implicit() && !skipTx) {
return asyncOp(tx, new AsyncOp<Map<K, V>>(keys) {
- @Override public IgniteFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
return ctx.wrapCloneMap(tx.getAllAsync(ctx, keys, entry, deserializePortable, filter));
}
});
@@ -119,7 +119,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
* @param filter Filter.
* @return Future.
*/
- IgniteFuture<Map<K, V>> txLoadAsync(GridNearTxLocal<K, V> tx, @Nullable Collection<? extends K> keys,
+ InternalFuture<Map<K, V>> txLoadAsync(GridNearTxLocal<K, V> tx, @Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter, boolean deserializePortable) {
assert tx != null;
@@ -369,7 +369,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
}
/** {@inheritDoc} */
- @Override protected IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ @Override protected InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
GridCacheTxLocalEx<K, V> tx, boolean isInvalidate, boolean isRead, boolean retval,
GridCacheTxIsolation isolation, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridNearLockFuture<K, V> fut = new GridNearLockFuture<>(ctx, keys, (GridNearTxLocal<K, V>)tx, isRead,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 176fdd0..9647c61 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
@@ -109,8 +108,8 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -121,7 +120,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -188,7 +187,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
*/
public void onResult(UUID nodeId, GridNearTxFinishResponse<K, V> res) {
if (!isDone())
- for (IgniteFuture<GridCacheTx> fut : futures()) {
+ for (InternalFuture<GridCacheTx> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -244,7 +243,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -271,7 +270,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
// Finish local mapping only as we need send commit message to backups.
for (GridDistributedTxMapping<K, V> m : mappings.values()) {
if (m.node().isLocal()) {
- IgniteFuture<GridCacheTx> fut = cctx.tm().txHandler().finishColocatedLocal(commit, tx);
+ InternalFuture<GridCacheTx> fut = cctx.tm().txHandler().finishColocatedLocal(commit, tx);
// Add new future.
if (fut != null)
@@ -292,7 +291,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
if (!isSync()) {
boolean complete = true;
- for (IgniteFuture<?> f : pending())
+ for (InternalFuture<?> f : pending())
// Mini-future in non-sync mode gets done when message gets sent.
if (isMini(f) && !f.isDone())
complete = false;
@@ -356,7 +355,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
if (n.isLocal()) {
req.miniId(IgniteUuid.randomUuid());
- IgniteFuture<GridCacheTx> fut = cctx.tm().txHandler().finish(n.id(), tx, req);
+ InternalFuture<GridCacheTx> fut = cctx.tm().txHandler().finish(n.id(), tx, req);
// Add new future.
if (fut != null)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxLocal.java
index 5ff258f..530a384 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -50,7 +50,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
new ConcurrentHashMap8<>();
/** Future. */
- private final AtomicReference<IgniteFuture<GridCacheTxEx<K, V>>> prepFut =
+ private final AtomicReference<InternalFuture<GridCacheTxEx<K, V>>> prepFut =
new AtomicReference<>();
/** */
@@ -159,7 +159,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override protected IgniteFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
+ @Override protected InternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
GridCacheTxEntry<K, V> entry, long topVer) {
// We are in near transaction, do not add local node as reader.
return null;
@@ -253,15 +253,15 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> loadMissing(
+ @Override public InternalFuture<Boolean> loadMissing(
GridCacheContext<K, V> cacheCtx,
boolean async, final Collection<? extends K> keys,
boolean deserializePortable,
final IgniteBiInClosure<K, V> c
) {
if (cacheCtx.isNear()) {
- return cacheCtx.nearTx().txLoadAsync(this, keys, CU.<K, V>empty(), deserializePortable).chain(new C1<IgniteFuture<Map<K, V>>, Boolean>() {
- @Override public Boolean apply(IgniteFuture<Map<K, V>> f) {
+ return cacheCtx.nearTx().txLoadAsync(this, keys, CU.<K, V>empty(), deserializePortable).chain(new C1<InternalFuture<Map<K, V>>, Boolean>() {
+ @Override public Boolean apply(InternalFuture<Map<K, V>> f) {
try {
Map<K, V> map = f.get();
@@ -285,8 +285,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
return cacheCtx.colocated().loadAsync(keys, /*reload*/false, /*force primary*/false, topologyVersion(),
CU.subjectId(this, cctx), resolveTaskName(), deserializePortable, null)
- .chain(new C1<IgniteFuture<Map<K, V>>, Boolean>() {
- @Override public Boolean apply(IgniteFuture<Map<K, V>> f) {
+ .chain(new C1<InternalFuture<Map<K, V>>, Boolean>() {
+ @Override public Boolean apply(InternalFuture<Map<K, V>> f) {
try {
Map<K, V> map = f.get();
@@ -508,7 +508,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
/**
* @return Commit fut.
*/
- @Override public IgniteFuture<GridCacheTxEx<K, V>> future() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> future() {
return prepFut.get();
}
@@ -656,8 +656,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync() {
- IgniteFuture<GridCacheTxEx<K, V>> fut = prepFut.get();
+ @Override public InternalFuture<GridCacheTxEx<K, V>> prepareAsync() {
+ InternalFuture<GridCacheTxEx<K, V>> fut = prepFut.get();
if (fut == null) {
// Future must be created before any exception can be thrown.
@@ -724,7 +724,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
if (log.isDebugEnabled())
log.debug("Committing near local tx: " + this);
@@ -737,10 +737,10 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
cctx.mvcc().addFuture(fut);
- IgniteFuture<GridCacheTxEx<K, V>> prepareFut = prepFut.get();
+ InternalFuture<GridCacheTxEx<K, V>> prepareFut = prepFut.get();
- prepareFut.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prepareFut.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
GridNearTxFinishFuture<K, V> fut0 = commitFut.get();
try {
@@ -770,7 +770,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> rollbackAsync() {
+ @Override public InternalFuture<GridCacheTx> rollbackAsync() {
if (log.isDebugEnabled())
log.debug("Rolling back near tx: " + this);
@@ -784,7 +784,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
cctx.mvcc().addFuture(fut);
- IgniteFuture<GridCacheTxEx<K, V>> prepFut = this.prepFut.get();
+ InternalFuture<GridCacheTxEx<K, V>> prepFut = this.prepFut.get();
if (prepFut == null || prepFut.isDone()) {
try {
@@ -808,8 +808,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
}
else {
- prepFut.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prepFut.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
try {
// Check for errors in prepare future.
f.get();
@@ -852,7 +852,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
* @return Future that will be completed when locks are acquired.
*/
@SuppressWarnings("TypeMayBeWeakened")
- public IgniteFuture<GridCacheTxEx<K, V>> prepareAsyncLocal(@Nullable Collection<GridCacheTxEntry<K, V>> reads,
+ public InternalFuture<GridCacheTxEx<K, V>> prepareAsyncLocal(@Nullable Collection<GridCacheTxEntry<K, V>> reads,
@Nullable Collection<GridCacheTxEntry<K, V>> writes, Map<UUID, Collection<UUID>> txNodes, boolean last,
Collection<UUID> lastBackups) {
assert optimistic();
@@ -918,7 +918,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
*
* @return Commit future.
*/
- public IgniteFuture<GridCacheTx> commitAsyncLocal() {
+ public InternalFuture<GridCacheTx> commitAsyncLocal() {
if (log.isDebugEnabled())
log.debug("Committing colocated tx locally: " + this);
@@ -926,12 +926,12 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
if (pessimistic())
prepareAsync();
- IgniteFuture<GridCacheTxEx<K, V>> prep = prepFut.get();
+ InternalFuture<GridCacheTxEx<K, V>> prep = prepFut.get();
// Do not create finish future if there are no remote nodes.
if (F.isEmpty(dhtMap) && F.isEmpty(nearMap)) {
if (prep != null)
- return (IgniteFuture<GridCacheTx>)(IgniteFuture)prep;
+ return (InternalFuture<GridCacheTx>)(InternalFuture)prep;
return new GridFinishedFuture<GridCacheTx>(cctx.kernalContext(), this);
}
@@ -962,8 +962,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
}
else
- prep.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prep.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
try {
f.get(); // Check for errors of a parent future.
@@ -991,7 +991,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
*
* @return Commit future.
*/
- public IgniteFuture<GridCacheTx> rollbackAsyncLocal() {
+ public InternalFuture<GridCacheTx> rollbackAsyncLocal() {
if (log.isDebugEnabled())
log.debug("Rolling back colocated tx locally: " + this);
@@ -999,7 +999,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
cctx.mvcc().addFuture(fut);
- IgniteFuture<GridCacheTxEx<K, V>> prep = prepFut.get();
+ InternalFuture<GridCacheTxEx<K, V>> prep = prepFut.get();
if (prep == null || prep.isDone()) {
try {
@@ -1015,8 +1015,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
fut.finish();
}
else
- prep.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prep.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
try {
f.get(); // Check for errors of a parent future.
}
@@ -1033,7 +1033,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- public IgniteFuture<GridCacheReturn<V>> lockAllAsync(GridCacheContext<K, V> cacheCtx, final Collection<? extends K> keys,
+ public InternalFuture<GridCacheReturn<V>> lockAllAsync(GridCacheContext<K, V> cacheCtx, final Collection<? extends K> keys,
boolean implicit, boolean read) {
assert pessimistic();
@@ -1054,7 +1054,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> {
if (log.isDebugEnabled())
log.debug("Before acquiring transaction lock on keys: " + keys);
- IgniteFuture<Boolean> fut = cacheCtx.colocated().lockAllAsyncInternal(keys,
+ InternalFuture<Boolean> fut = cacheCtx.colocated().lockAllAsyncInternal(keys,
lockTimeout(), this, isInvalidate(), read, /*retval*/false, isolation, CU.<K, V>empty());
return new GridEmbeddedFuture<>(
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxPrepareFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
index a9bcd3b..b293861 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.discovery.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -131,8 +130,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -155,7 +154,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
@Override public boolean onNodeLeft(UUID nodeId) {
boolean found = false;
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -251,7 +250,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
*/
public void onResult(UUID nodeId, GridNearTxPrepareResponse<K, V> res) {
if (!isDone()) {
- for (IgniteFuture<GridCacheTxEx<K, V>> fut : pending()) {
+ for (InternalFuture<GridCacheTxEx<K, V>> fut : pending()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -290,7 +289,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -363,8 +362,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
else {
topFut.syncNotify(false);
- topFut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ topFut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
prepare();
}
});
@@ -562,7 +561,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
// At this point, if any new node joined, then it is
// waiting for this transaction to complete, so
// partition reassignments are not possible here.
- IgniteFuture<GridCacheTxEx<K, V>> fut = cctx.tm().txHandler().prepareTx(n.id(), tx, req);
+ InternalFuture<GridCacheTxEx<K, V>> fut = cctx.tm().txHandler().prepareTx(n.id(), tx, req);
// Add new future.
add(new GridEmbeddedFuture<>(
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalCache.java
index 8edcf9c..58c74b8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalCache.java
@@ -84,7 +84,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout,
GridCacheTxLocalEx<K, V> tx, boolean isRead,
boolean retval, GridCacheTxIsolation isolation, boolean invalidate,
IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
@@ -92,7 +92,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheTxLocalEx<K, V> tx = ctx.tm().localTx();
@@ -106,7 +106,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
* @param filter Filter.
* @return Future.
*/
- public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ public InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
@Nullable GridCacheTxLocalEx<K, V> tx, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
if (F.isEmpty(keys))
return new GridFinishedFuture<>(ctx.kernalContext(), true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalTx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalTx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalTx.java
index e769893..2fc3e0e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalTx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/GridLocalTx.java
@@ -65,7 +65,7 @@ class GridLocalTx<K, V> extends GridCacheTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> future() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> future() {
return fut.get();
}
@@ -103,7 +103,7 @@ class GridLocalTx<K, V> extends GridCacheTxLocalAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> prepareAsync() {
try {
prepare();
@@ -142,7 +142,7 @@ class GridLocalTx<K, V> extends GridCacheTxLocalAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings( {"unchecked", "RedundantCast"})
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
try {
prepare();
}
@@ -160,11 +160,11 @@ class GridLocalTx<K, V> extends GridCacheTxLocalAdapter<K, V> {
fut.checkLocks();
- return (IgniteFuture)fut;
+ return (InternalFuture)fut;
}
}
- return (IgniteFuture)this.fut.get();
+ return (InternalFuture)this.fut.get();
}
/** {@inheritDoc} */
@@ -172,7 +172,7 @@ class GridLocalTx<K, V> extends GridCacheTxLocalAdapter<K, V> {
rollbackAsync().get();
}
- @Override public IgniteFuture<GridCacheTx> rollbackAsync() {
+ @Override public InternalFuture<GridCacheTx> rollbackAsync() {
try {
state(ROLLING_BACK);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/atomic/GridLocalAtomicCache.java
index e4d6b00..0262b0f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -151,7 +151,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> putAsync(K key,
+ @Override public InternalFuture<V> putAsync(K key,
V val,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl,
@@ -165,7 +165,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> putxAsync(K key,
+ @Override public InternalFuture<Boolean> putxAsync(K key,
V val,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl,
@@ -184,7 +184,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(K key, V val) {
return putAsync(key, val, ctx.noPeekArray());
}
@@ -194,7 +194,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
return putxAsync(key, val, ctx.noPeekArray());
}
@@ -205,7 +205,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(K key, V val) {
+ @Override public InternalFuture<V> replaceAsync(K key, V val) {
return putAsync(key, val, ctx.hasPeekArray());
}
@@ -215,7 +215,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(K key, V val) {
return putxAsync(key, val, ctx.hasPeekArray());
}
@@ -225,7 +225,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
return putxAsync(key, newVal, ctx.equalsPeekArray(oldVal));
}
@@ -265,7 +265,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
A.notNull(key, "key");
ctx.denyOnLocalRead();
@@ -275,7 +275,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
A.notNull(key, "key");
ctx.denyOnLocalRead();
@@ -300,7 +300,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
ctx.denyOnLocalRead();
@@ -336,7 +336,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key,
+ @Override public InternalFuture<?> transformAsync(K key,
IgniteClosure<V, V> transformer,
@Nullable GridCacheEntryEx<K, V> entry,
long ttl) {
@@ -364,7 +364,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
ctx.denyOnLocalRead();
if (F.isEmpty(m))
@@ -392,7 +392,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> removeAsync(K key,
+ @Override public InternalFuture<V> removeAsync(K key,
@Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnLocalRead();
@@ -417,7 +417,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(Collection<? extends K> keys,
IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
ctx.denyOnLocalRead();
@@ -445,7 +445,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> removexAsync(K key,
+ @Override public InternalFuture<Boolean> removexAsync(K key,
@Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
A.notNull(key, "key");
@@ -472,7 +472,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> removeAsync(K key, V val) {
return removexAsync(key, ctx.equalsPeekArray(val));
}
@@ -483,7 +483,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return removeAllAsync(keySet(filter), filter);
}
@@ -528,7 +528,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
@Nullable final Collection<? extends K> keys,
final boolean forcePrimary,
boolean skipTx,
@@ -665,7 +665,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
* @param filter Cache entry filter for atomic updates.
* @return Completion future.
*/
- private IgniteFuture updateAllAsync0(
+ private InternalFuture updateAllAsync0(
@Nullable final Map<? extends K, ? extends V> map,
@Nullable final Map<? extends K, ? extends IgniteClosure<V, V>> transformMap,
final boolean retval,
@@ -702,7 +702,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
* @param filter Cache entry filter.
* @return Completion future.
*/
- private IgniteFuture removeAllAsync0(
+ private InternalFuture removeAllAsync0(
@Nullable final Collection<? extends K> keys,
final boolean retval,
final boolean rawRetval,
@@ -1245,7 +1245,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> txLockAsync(Collection<? extends K> keys,
+ @Override public InternalFuture<Boolean> txLockAsync(Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K, V> tx,
boolean isRead,
@@ -1259,7 +1259,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys,
+ @Override public InternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys,
long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return new GridFinishedFutureEx<>(new UnsupportedOperationException("Locks are not supported for " +
@@ -1279,8 +1279,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
* @return Future.
*/
@SuppressWarnings("unchecked")
- protected IgniteFuture asyncOp(final Callable<?> op) {
- IgniteFuture fail = asyncOpAcquire();
+ protected InternalFuture asyncOp(final Callable<?> op) {
+ InternalFuture fail = asyncOpAcquire();
if (fail != null)
return fail;
@@ -1290,12 +1290,12 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
holder.lock();
try {
- IgniteFuture fut = holder.future();
+ InternalFuture fut = holder.future();
if (fut != null && !fut.isDone()) {
- IgniteFuture f = new GridEmbeddedFuture(fut,
- new C2<Object, Exception, IgniteFuture>() {
- @Override public IgniteFuture apply(Object t, Exception e) {
+ InternalFuture f = new GridEmbeddedFuture(fut,
+ new C2<Object, Exception, InternalFuture>() {
+ @Override public InternalFuture apply(Object t, Exception e) {
return ctx.closures().callLocalSafe(op);
}
}, ctx.kernalContext());
@@ -1305,7 +1305,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
return f;
}
- IgniteFuture f = ctx.closures().callLocalSafe(op);
+ InternalFuture f = ctx.closures().callLocalSafe(op);
saveFuture(holder, f);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
index 6bf1f45..c842839 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
@@ -86,7 +86,7 @@ public class GridCacheDistributedFieldsQueryFuture
}
/** {@inheritDoc} */
- @Override public IgniteFuture<List<GridQueryFieldMetadata>> metadata() {
+ @Override public InternalFuture<List<GridQueryFieldMetadata>> metadata() {
return metaFut;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryFuture.java
index b3d658b..4c12c7e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryFuture.java
@@ -185,7 +185,7 @@ public class GridCacheDistributedQueryFuture<K, V, R> extends GridCacheQueryFutu
/** {@inheritDoc} */
@SuppressWarnings("NonPrivateFieldAccessedInSynchronizedContext")
- @Override protected void loadAllPages() throws GridInterruptedException {
+ @Override protected void loadAllPages() throws InternalInterruptedException {
assert !Thread.holdsLock(mux);
U.await(firstPageLatch);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
index b9d2474..71c3c25 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -293,7 +293,7 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage
try {
U.sleep(RESEND_FREQ);
}
- catch (GridInterruptedException e1) {
+ catch (InternalInterruptedException e1) {
U.error(log,
"Waiting for queries response resending was interrupted (response will not be sent) " +
"[nodeId=" + nodeId + ", response=" + res + "]", e1);
@@ -537,8 +537,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage
cctx.io().addOrderedHandler(topic, resHnd);
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut) {
cctx.io().removeOrderedHandler(topic);
}
});
@@ -646,8 +646,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage
cctx.io().addOrderedHandler(topic, resHnd);
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut) {
cctx.io().removeOrderedHandler(topic);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
index 3da96d7..ebd6467 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
@@ -40,7 +40,7 @@ public class GridCacheFieldsQueryErrorFuture extends GridCacheQueryErrorFuture<L
/**
* @return Metadata.
*/
- public IgniteFuture<List<GridQueryFieldMetadata>> metadata() {
+ public InternalFuture<List<GridQueryFieldMetadata>> metadata() {
return new GridFinishedFuture<>(ctx, incMeta ? Collections.<GridQueryFieldMetadata>emptyList() : null);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
index 5114f3a..97f6254 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
@@ -66,7 +66,7 @@ public class GridCacheLocalFieldsQueryFuture
}
/** {@inheritDoc} */
- @Override public IgniteFuture<List<GridQueryFieldMetadata>> metadata() {
+ @Override public InternalFuture<List<GridQueryFieldMetadata>> metadata() {
return metaFut;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryFuture.java
index df55b83..aa0eed7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryFuture.java
@@ -31,7 +31,7 @@ public class GridCacheLocalQueryFuture<K, V, R> extends GridCacheQueryFutureAdap
private Runnable run;
/** */
- private IgniteFuture<?> fut;
+ private InternalFuture<?> fut;
/**
* Required by {@link Externalizable}.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesImpl.java
index 3ba1ceb..0e4efed 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesImpl.java
@@ -163,21 +163,21 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildIndexes(Class<?> cls) {
+ @Override public InternalFuture<?> rebuildIndexes(Class<?> cls) {
A.notNull(cls, "cls");
return ctx.queries().rebuildIndexes(cls);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildIndexes(String typeName) {
+ @Override public InternalFuture<?> rebuildIndexes(String typeName) {
A.notNull("typeName", typeName);
return ctx.queries().rebuildIndexes(typeName);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildAllIndexes() {
+ @Override public InternalFuture<?> rebuildAllIndexes() {
return ctx.queries().rebuildAllIndexes();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesProxy.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesProxy.java
index 9edcf6a..9a8b588 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesProxy.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueriesProxy.java
@@ -166,7 +166,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildIndexes(Class<?> cls) {
+ @Override public InternalFuture<?> rebuildIndexes(Class<?> cls) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -178,7 +178,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildIndexes(String typeName) {
+ @Override public InternalFuture<?> rebuildIndexes(String typeName) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -190,7 +190,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> rebuildAllIndexes() {
+ @Override public InternalFuture<?> rebuildAllIndexes() {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
[13/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
index bf40a85..491cdfd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
@@ -52,8 +52,6 @@ import static org.gridgain.grid.cache.GridCacheFlag.*;
import static org.gridgain.grid.cache.GridCachePeekMode.*;
import static org.gridgain.grid.cache.GridCacheTxConcurrency.*;
import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
-import static org.gridgain.grid.cache.GridCacheTxState.*;
-import static org.apache.ignite.events.IgniteEventType.*;
import static org.gridgain.grid.kernal.GridClosureCallMode.*;
import static org.gridgain.grid.kernal.processors.dr.GridDrType.*;
import static org.gridgain.grid.kernal.processors.task.GridTaskThreadContextKey.*;
@@ -80,8 +78,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
/** {@link GridCacheReturn}-to-value conversion. */
private static final IgniteClosure RET2VAL =
- new CX1<IgniteFuture<GridCacheReturn<Object>>, Object>() {
- @Nullable @Override public Object applyx(IgniteFuture<GridCacheReturn<Object>> fut) throws IgniteCheckedException {
+ new CX1<InternalFuture<GridCacheReturn<Object>>, Object>() {
+ @Nullable @Override public Object applyx(InternalFuture<GridCacheReturn<Object>> fut) throws IgniteCheckedException {
return fut.get().value();
}
@@ -92,8 +90,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
/** {@link GridCacheReturn}-to-success conversion. */
private static final IgniteClosure RET2FLAG =
- new CX1<IgniteFuture<GridCacheReturn<Object>>, Boolean>() {
- @Override public Boolean applyx(IgniteFuture<GridCacheReturn<Object>> fut) throws IgniteCheckedException {
+ new CX1<InternalFuture<GridCacheReturn<Object>>, Boolean>() {
+ @Override public Boolean applyx(InternalFuture<GridCacheReturn<Object>> fut) throws IgniteCheckedException {
return fut.get().success();
}
@@ -485,7 +483,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Optional filter.
* @return Locks future.
*/
- public abstract IgniteFuture<Boolean> txLockAsync(
+ public abstract InternalFuture<Boolean> txLockAsync(
Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K, V> tx,
@@ -1203,7 +1201,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
// Send job to remote nodes only.
Collection<ClusterNode> nodes = ctx.grid().forCache(name()).forRemotes().nodes();
- IgniteFuture<Object> fut = null;
+ InternalFuture<Object> fut = null;
if (!nodes.isEmpty()) {
ctx.kernalContext().task().setThreadContext(TC_TIMEOUT, timeout);
@@ -1300,15 +1298,15 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getForcePrimaryAsync(final K key) {
+ @Override public InternalFuture<V> getForcePrimaryAsync(final K key) {
ctx.denyOnFlag(LOCAL);
String taskName = ctx.kernalContext().job().currentTaskName();
return getAllAsync(Collections.singletonList(key), /*force primary*/true, /*skip tx*/false, null, null,
- taskName, true).chain(new CX1<IgniteFuture<Map<K, V>>, V>() {
+ taskName, true).chain(new CX1<InternalFuture<Map<K, V>>, V>() {
@Override
- public V applyx(IgniteFuture<Map<K, V>> e) throws IgniteCheckedException {
+ public V applyx(InternalFuture<Map<K, V>> e) throws IgniteCheckedException {
return e.get().get(key);
}
});
@@ -1322,7 +1320,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
+ @Override public InternalFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
String taskName = ctx.kernalContext().job().currentTaskName();
return getAllAsync(keys, ctx.hasFlag(GET_PRIMARY), /*skip tx*/true, null, null, taskName, true);
@@ -1334,7 +1332,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync(K key) {
+ @Override public InternalFuture<V> reloadAsync(K key) {
return reloadAsync(key, (IgnitePredicate<GridCacheEntry<K, V>>[])null);
}
@@ -1344,7 +1342,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
+ @Override public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
return reloadAllAsync(keys, (IgnitePredicate<GridCacheEntry<K, V>>[])null);
}
@@ -1356,7 +1354,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync() {
+ @Override public InternalFuture<?> reloadAllAsync() {
ctx.denyOnFlags(F.asList(LOCAL, READ));
return reloadAllAsync(keySet(), (IgnitePredicate<GridCacheEntry<K, V>>[])null);
@@ -1370,7 +1368,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param vis Visitor.
* @return Future.
*/
- public IgniteFuture<Object> readThroughAllAsync(final Collection<? extends K> keys, boolean reload,
+ public InternalFuture<Object> readThroughAllAsync(final Collection<? extends K> keys, boolean reload,
@Nullable final GridCacheTxEx<K, V> tx, IgnitePredicate<GridCacheEntry<K, V>>[] filter, @Nullable UUID subjId,
String taskName, final IgniteBiInClosure<K, V> vis) {
return ctx.closures().callLocalSafe(new GPC<Object>() {
@@ -1409,7 +1407,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter.
* @return Future.
*/
- public IgniteFuture<Map<K, V>> reloadAllAsync(@Nullable Collection<? extends K> keys, boolean ret,
+ public InternalFuture<Map<K, V>> reloadAllAsync(@Nullable Collection<? extends K> keys, boolean ret,
@Nullable UUID subjId, String taskName, @Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnFlag(READ);
@@ -1469,7 +1467,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
final Collection<K> loadedKeys = new GridConcurrentHashSet<>();
- IgniteFuture<Object> readFut =
+ InternalFuture<Object> readFut =
readThroughAllAsync(absentKeys, true, null, filter, subjId, taskName, new CI2<K, V>() {
/** Version for all loaded entries. */
private GridCacheVersion nextVer = ctx.versions().next();
@@ -1538,8 +1536,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
});
- return readFut.chain(new CX1<IgniteFuture<Object>, Map<K, V>>() {
- @Override public Map<K, V> applyx(IgniteFuture<Object> e) throws IgniteCheckedException {
+ return readFut.chain(new CX1<InternalFuture<Object>, Map<K, V>>() {
+ @Override public Map<K, V> applyx(InternalFuture<Object> e) throws IgniteCheckedException {
// Touch all not loaded keys.
for (K key : absentKeys) {
if (!loadedKeys.contains(key)) {
@@ -1599,12 +1597,12 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync(final K key) {
- IgniteFuture<V> fut = getAsync(key, true, null);
+ @Override public InternalFuture<V> getAsync(final K key) {
+ InternalFuture<V> fut = getAsync(key, true, null);
if (ctx.config().getInterceptor() != null)
- return fut.chain(new CX1<IgniteFuture<V>, V>() {
- @Override public V applyx(IgniteFuture<V> f) throws IgniteCheckedException {
+ return fut.chain(new CX1<InternalFuture<V>, V>() {
+ @Override public V applyx(InternalFuture<V> f) throws IgniteCheckedException {
return (V)ctx.config().getInterceptor().onGet(key, f.get());
}
});
@@ -1623,12 +1621,12 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(@Nullable final Collection<? extends K> keys) {
- IgniteFuture<Map<K, V>> fut = getAllAsync(keys, true, null);
+ @Override public InternalFuture<Map<K, V>> getAllAsync(@Nullable final Collection<? extends K> keys) {
+ InternalFuture<Map<K, V>> fut = getAllAsync(keys, true, null);
if (ctx.config().getInterceptor() != null)
- return fut.chain(new CX1<IgniteFuture<Map<K, V>>, Map<K, V>>() {
- @Override public Map<K, V> applyx(IgniteFuture<Map<K, V>> f) throws IgniteCheckedException {
+ return fut.chain(new CX1<InternalFuture<Map<K, V>>, Map<K, V>>() {
+ @Override public Map<K, V> applyx(InternalFuture<Map<K, V>> f) throws IgniteCheckedException {
return interceptGet(keys, f.get());
}
});
@@ -1678,7 +1676,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- protected IgniteFuture<Map<K, V>> getAllAsync(
+ protected InternalFuture<Map<K, V>> getAllAsync(
@Nullable Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@@ -1694,7 +1692,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- public IgniteFuture<Map<K, V>> getAllAsync(@Nullable final Collection<? extends K> keys,
+ public InternalFuture<Map<K, V>> getAllAsync(@Nullable final Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached, boolean checkTx, @Nullable final UUID subjId, final String taskName,
final boolean deserializePortable, final boolean forcePrimary,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
@@ -1903,8 +1901,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return map;
}
}), true),
- new C2<Map<K, V>, Exception, IgniteFuture<Map<K, V>>>() {
- @Override public IgniteFuture<Map<K, V>> apply(Map<K, V> map, Exception e) {
+ new C2<Map<K, V>, Exception, InternalFuture<Map<K, V>>>() {
+ @Override public InternalFuture<Map<K, V>> apply(Map<K, V> map, Exception e) {
if (e != null)
return new GridFinishedFuture<>(ctx.kernalContext(), e);
@@ -1964,7 +1962,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
final GridCacheEntryEx<K, V> cached0 = cached;
return asyncOp(tx, new AsyncOp<Map<K, V>>(keys) {
- @Override public IgniteFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
return ctx.wrapCloneMap(tx.getAllAsync(ctx, keys, cached0, deserializePortable, filter));
}
});
@@ -2027,13 +2025,13 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(K key, V val,
+ @Override public InternalFuture<V> putAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return putAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> entry,
final long ttl, @Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
A.notNull(key, "key", val, "val");
@@ -2046,9 +2044,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
@Override
- public IgniteFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
+ public InternalFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), true, entry, ttl, filter)
- .chain((IgniteClosure<IgniteFuture<GridCacheReturn<V>>, V>)RET2VAL);
+ .chain((IgniteClosure<InternalFuture<GridCacheReturn<V>>, V>)RET2VAL);
}
@Override
@@ -2104,7 +2102,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(final Map<? extends K, GridCacheDrInfo<V>> drMap)
+ @Override public InternalFuture<?> putAllDrAsync(final Map<? extends K, GridCacheDrInfo<V>> drMap)
throws IgniteCheckedException {
if (F.isEmpty(drMap))
return new GridFinishedFuture<Object>(ctx.kernalContext());
@@ -2114,7 +2112,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncInOp(drMap.keySet()) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllDrAsync(ctx, drMap);
}
@@ -2156,7 +2154,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return syncOp(new SyncOp<R>(true) {
@Override public R op(GridCacheTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
- IgniteFuture<GridCacheReturn<V>> ret = tx.transformAllAsync(ctx,
+ InternalFuture<GridCacheReturn<V>> ret = tx.transformAllAsync(ctx,
F.t(key, new GridCacheTransformComputeClosure<>(transformer)), true, null, -1);
return transformer.apply(ret.get().value()).get2();
@@ -2169,13 +2167,13 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return putxAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(final K key, final V val,
+ @Override public InternalFuture<Boolean> putxAsync(final K key, final V val,
@Nullable final GridCacheEntryEx<K, V> entry, final long ttl,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
A.notNull(key, "key", val, "val");
@@ -2188,9 +2186,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), false, entry, ttl, filter).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -2200,12 +2198,12 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(final K key, final IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(final K key, final IgniteClosure<V, V> transformer) {
return transformAsync(key, transformer, null, -1);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(final K key, final IgniteClosure<V, V> transformer,
+ @Override public InternalFuture<?> transformAsync(final K key, final IgniteClosure<V, V> transformer,
@Nullable final GridCacheEntryEx<K, V> entry, final long ttl) {
A.notNull(key, "key", transformer, "transformer");
@@ -2215,7 +2213,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncInOp(key) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.transformAllAsync(ctx, F.t(key, transformer), false, entry, ttl);
}
@@ -2248,7 +2246,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(final K key, final V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(final K key, final V val) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2259,9 +2257,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
- @Override public IgniteFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noPeekArray())
- .chain((IgniteClosure<IgniteFuture<GridCacheReturn<V>>, V>)RET2VAL);
+ .chain((IgniteClosure<InternalFuture<GridCacheReturn<V>>, V>)RET2VAL);
}
@Override public String toString() {
@@ -2293,7 +2291,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(final K key, final V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(final K key, final V val) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2304,9 +2302,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.noPeekArray()).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -2339,7 +2337,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(final K key, final V val) {
+ @Override public InternalFuture<V> replaceAsync(final K key, final V val) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2350,9 +2348,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
- @Override public IgniteFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.hasPeekArray()).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, V>)RET2VAL);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, V>)RET2VAL);
}
@Override public String toString() {
@@ -2384,7 +2382,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(final K key, final V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(final K key, final V val) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2395,9 +2393,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.hasPeekArray()).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -2436,7 +2434,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(final K key, final V oldVal, final V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(final K key, final V oldVal, final V newVal) {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
if (keyCheck)
@@ -2449,7 +2447,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
// Register before hiding in the filter.
if (ctx.deploymentEnabled()) {
try {
@@ -2461,7 +2459,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
return tx.putAllAsync(ctx, F.t(key, newVal), false, null, -1, ctx.equalsPeekArray(oldVal)).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -2531,7 +2529,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(final Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
if (F.isEmpty(m))
return new GridFinishedFuture<Object>(ctx.kernalContext());
@@ -2544,7 +2542,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncInOp(m.keySet()) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.putAllAsync(ctx, m, false, null, -1, filter);
}
@@ -2555,7 +2553,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable final Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable final Map<? extends K, ? extends IgniteClosure<V, V>> m) {
if (F.isEmpty(m))
return new GridFinishedFuture<>(ctx.kernalContext());
@@ -2565,7 +2563,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncInOp(m.keySet()) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.transformAllAsync(ctx, m, false, null, -1);
}
@@ -2576,7 +2574,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Set<? extends K> keys,
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Set<? extends K> keys,
final IgniteClosure<V, V> transformer) throws IgniteCheckedException {
if (F.isEmpty(keys))
return new GridFinishedFuture<>(ctx.kernalContext());
@@ -2622,12 +2620,12 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return removeAsync(key, null, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnLocalRead();
@@ -2637,10 +2635,10 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
validateCacheKey(key);
return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
- @Override public IgniteFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<V> op(GridCacheTxLocalAdapter<K, V> tx) {
// TODO should we invoke interceptor here?
return tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, filter)
- .chain((IgniteClosure<IgniteFuture<GridCacheReturn<V>>, V>) RET2VAL);
+ .chain((IgniteClosure<InternalFuture<GridCacheReturn<V>>, V>) RET2VAL);
}
@Override public String toString() {
@@ -2683,7 +2681,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys,
final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
if (F.isEmpty(keys))
return new GridFinishedFuture<Object>(ctx.kernalContext());
@@ -2694,7 +2692,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncInOp(keys) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.removeAllAsync(ctx, keys, null, false, filter);
}
@@ -2732,12 +2730,12 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<Boolean> removexAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return removexAsync(key, null, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnLocalRead();
@@ -2747,9 +2745,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
validateCacheKey(key);
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
return tx.removeAllAsync(ctx, Collections.singletonList(key), entry, false, filter).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -2804,7 +2802,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(final Map<? extends K, GridCacheVersion> drMap)
+ @Override public InternalFuture<?> removeAllDrAsync(final Map<? extends K, GridCacheVersion> drMap)
throws IgniteCheckedException {
ctx.denyOnLocalRead();
@@ -2814,7 +2812,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
return asyncOp(new AsyncInOp(drMap.keySet()) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.removeAllDrAsync(ctx, drMap);
}
@@ -2849,7 +2847,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(final K key, final V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(final K key, final V val) {
ctx.denyOnLocalRead();
A.notNull(key, "key", val, "val");
@@ -2858,7 +2856,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
validateCacheKey(key);
return asyncOp(new AsyncOp<GridCacheReturn<V>>(key) {
- @Override public IgniteFuture<GridCacheReturn<V>> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<GridCacheReturn<V>> op(GridCacheTxLocalAdapter<K, V> tx) {
// Register before hiding in the filter.
try {
if (ctx.deploymentEnabled())
@@ -2879,7 +2877,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(final K key, final V oldVal, final V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(final K key, final V oldVal, final V newVal) {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
if (keyCheck)
@@ -2888,7 +2886,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
ctx.denyOnLocalRead();
return asyncOp(new AsyncOp<GridCacheReturn<V>>(key) {
- @Override public IgniteFuture<GridCacheReturn<V>> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<GridCacheReturn<V>> op(GridCacheTxLocalAdapter<K, V> tx) {
// Register before hiding in the filter.
try {
if (ctx.deploymentEnabled())
@@ -2940,7 +2938,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(final K key, final V val) {
+ @Override public InternalFuture<Boolean> removeAsync(final K key, final V val) {
ctx.denyOnLocalRead();
A.notNull(key, "key", val, "val");
@@ -2951,7 +2949,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
validateCacheValue(val);
return asyncOp(new AsyncOp<Boolean>(key) {
- @Override public IgniteFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Boolean> op(GridCacheTxLocalAdapter<K, V> tx) {
// Register before hiding in the filter.
if (ctx.deploymentEnabled()) {
try {
@@ -2975,7 +2973,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return tx.removeAllAsync(ctx, Collections.singletonList(key0), null, false,
ctx.vararg(F.<K, V>cacheContainsPeek(val))).chain(
- (IgniteClosure<IgniteFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+ (IgniteClosure<InternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
}
@Override public String toString() {
@@ -3005,13 +3003,13 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<?> removeAllAsync(final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnLocalRead();
final Set<? extends K> keys = keySet(filter);
return asyncOp(new AsyncInOp(keys) {
- @Override public IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx) {
return tx.removeAllAsync(ctx, keys, null, false, null);
}
@@ -3061,7 +3059,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(K key, long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(K key, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
A.notNull(key, "key");
@@ -3225,7 +3223,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
assert tx0 != null;
- IgniteFuture<?> lockFut = tx0.groupLockAsync(ctx, (Collection)F.asList(grpLockKey));
+ InternalFuture<?> lockFut = tx0.groupLockAsync(ctx, (Collection)F.asList(grpLockKey));
try {
lockFut.get();
@@ -3355,7 +3353,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> loadCacheAsync(final IgniteBiPredicate<K, V> p, final long ttl, final Object[] args) {
+ @Override public InternalFuture<?> loadCacheAsync(final IgniteBiPredicate<K, V> p, final long ttl, final Object[] args) {
return ctx.closures().callLocalSafe(
ctx.projectSafe(new Callable<Object>() {
@Nullable
@@ -3536,18 +3534,18 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @return Transaction commit future.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<GridCacheTx> commitTxAsync(final GridCacheTx tx) {
+ public InternalFuture<GridCacheTx> commitTxAsync(final GridCacheTx tx) {
FutureHolder holder = lastFut.get();
holder.lock();
try {
- IgniteFuture fut = holder.future();
+ InternalFuture fut = holder.future();
if (fut != null && !fut.isDone()) {
- IgniteFuture<GridCacheTx> f = new GridEmbeddedFuture<>(fut,
- new C2<Object, Exception, IgniteFuture<GridCacheTx>>() {
- @Override public IgniteFuture<GridCacheTx> apply(Object o, Exception e) {
+ InternalFuture<GridCacheTx> f = new GridEmbeddedFuture<>(fut,
+ new C2<Object, Exception, InternalFuture<GridCacheTx>>() {
+ @Override public InternalFuture<GridCacheTx> apply(Object o, Exception e) {
return tx.commitAsync();
}
}, ctx.kernalContext());
@@ -3557,7 +3555,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return f;
}
- IgniteFuture<GridCacheTx> f = tx.commitAsync();
+ InternalFuture<GridCacheTx> f = tx.commitAsync();
saveFuture(holder, f);
@@ -3613,7 +3611,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
public void awaitLastFut() {
FutureHolder holder = lastFut.get();
- IgniteFuture fut = holder.future();
+ InternalFuture fut = holder.future();
if (fut != null && !fut.isDone()) {
try {
@@ -3638,7 +3636,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
// Send job to remote nodes only.
Collection<ClusterNode> nodes = ctx.grid().forCache(name()).forRemotes().nodes();
- IgniteFuture<Collection<Integer>> fut = null;
+ InternalFuture<Collection<Integer>> fut = null;
if (!nodes.isEmpty()) {
ctx.kernalContext().task().setThreadContext(TC_TIMEOUT, gridCfg.getNetworkTimeout());
@@ -3708,7 +3706,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return t;
}
- catch (GridInterruptedException | GridCacheTxHeuristicException | GridCacheTxRollbackException e) {
+ catch (InternalInterruptedException | GridCacheTxHeuristicException | GridCacheTxRollbackException e) {
throw e;
}
catch (IgniteCheckedException e) {
@@ -3743,7 +3741,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @return Future.
*/
@SuppressWarnings("unchecked")
- private <T> IgniteFuture<T> asyncOp(final AsyncOp<T> op) {
+ private <T> InternalFuture<T> asyncOp(final AsyncOp<T> op) {
try {
checkJta();
}
@@ -3778,8 +3776,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @return Future.
*/
@SuppressWarnings("unchecked")
- protected <T> IgniteFuture<T> asyncOp(GridCacheTxLocalAdapter<K, V> tx, final AsyncOp<T> op) {
- IgniteFuture<T> fail = asyncOpAcquire();
+ protected <T> InternalFuture<T> asyncOp(GridCacheTxLocalAdapter<K, V> tx, final AsyncOp<T> op) {
+ InternalFuture<T> fail = asyncOpAcquire();
if (fail != null)
return fail;
@@ -3789,14 +3787,14 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
holder.lock();
try {
- IgniteFuture fut = holder.future();
+ InternalFuture fut = holder.future();
if (fut != null && !fut.isDone()) {
final GridCacheTxLocalAdapter<K, V> tx0 = tx;
- IgniteFuture<T> f = new GridEmbeddedFuture<>(fut,
- new C2<T, Exception, IgniteFuture<T>>() {
- @Override public IgniteFuture<T> apply(T t, Exception e) {
+ InternalFuture<T> f = new GridEmbeddedFuture<>(fut,
+ new C2<T, Exception, InternalFuture<T>>() {
+ @Override public InternalFuture<T> apply(T t, Exception e) {
return op.op(tx0);
}
}, ctx.kernalContext());
@@ -3806,7 +3804,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return f;
}
- IgniteFuture<T> f = op.op(tx);
+ InternalFuture<T> f = op.op(tx);
saveFuture(holder, f);
@@ -3827,7 +3825,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param holder Future holder.
* @param fut Future to save.
*/
- protected void saveFuture(final FutureHolder holder, IgniteFuture<?> fut) {
+ protected void saveFuture(final FutureHolder holder, InternalFuture<?> fut) {
assert holder != null;
assert fut != null;
assert holder.holdsLock();
@@ -3840,8 +3838,8 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
asyncOpRelease();
}
else {
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
asyncOpRelease();
if (!holder.tryLock())
@@ -3864,7 +3862,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
*
* @return Failed future if waiting was interrupted.
*/
- @Nullable protected <T> IgniteFuture<T> asyncOpAcquire() {
+ @Nullable protected <T> InternalFuture<T> asyncOpAcquire() {
try {
if (asyncOpsSem != null)
asyncOpsSem.acquire();
@@ -3874,7 +3872,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- return new GridFinishedFutureEx<>(new GridInterruptedException("Failed to wait for asynchronous " +
+ return new GridFinishedFutureEx<>(new InternalInterruptedException("Failed to wait for asynchronous " +
"operation permit (thread got interrupted).", e));
}
}
@@ -3928,7 +3926,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> forceRepartition() {
+ @Override public InternalFuture<?> forceRepartition() {
ctx.preloader().forcePreload();
return ctx.preloader().syncFuture();
@@ -4314,7 +4312,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter to evaluate.
* @return Read operation future.
*/
- public final IgniteFuture<V> getAsync(final K key, boolean deserializePortable,
+ public final InternalFuture<V> getAsync(final K key, boolean deserializePortable,
@Nullable IgnitePredicate<GridCacheEntry<K, V>> filter) {
ctx.denyOnFlag(LOCAL);
@@ -4325,9 +4323,9 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
return new GridFinishedFuture<>(ctx.kernalContext(), e);
}
- return getAllAsync(Collections.singletonList(key), deserializePortable, filter).chain(new CX1<IgniteFuture<Map<K, V>>, V>() {
+ return getAllAsync(Collections.singletonList(key), deserializePortable, filter).chain(new CX1<InternalFuture<Map<K, V>>, V>() {
@Override
- public V applyx(IgniteFuture<Map<K, V>> e) throws IgniteCheckedException {
+ public V applyx(InternalFuture<Map<K, V>> e) throws IgniteCheckedException {
return e.get().get(key);
}
});
@@ -4398,7 +4396,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter to evaluate.
* @return Reload future.
*/
- public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys,
+ public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
UUID subjId = ctx.subjectIdPerCall(null);
@@ -4412,7 +4410,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter to evaluate.
* @return Reload future.
*/
- public IgniteFuture<V> reloadAsync(final K key,
+ public InternalFuture<V> reloadAsync(final K key,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>... filter) {
ctx.denyOnFlags(F.asList(LOCAL, READ));
@@ -4441,7 +4439,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter to evaluate.
* @return Reload future.
*/
- public IgniteFuture<?> reloadAllAsync(@Nullable final IgnitePredicate<GridCacheEntry<K, V>> filter) {
+ public InternalFuture<?> reloadAllAsync(@Nullable final IgnitePredicate<GridCacheEntry<K, V>> filter) {
ctx.denyOnFlag(READ);
return ctx.closures().callLocalSafe(ctx.projectSafe(new GPC() {
@@ -4458,7 +4456,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param filter Filter to evaluate.
* @return Read future.
*/
- public IgniteFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys,
+ public InternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys,
boolean deserializePortable, @Nullable IgnitePredicate<GridCacheEntry<K, V>> filter) {
String taskName = ctx.kernalContext().job().currentTaskName();
@@ -4649,7 +4647,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
* @param tx Transaction.
* @return Operation return value.
*/
- public abstract IgniteFuture<T> op(GridCacheTxLocalAdapter<K, V> tx);
+ public abstract InternalFuture<T> op(GridCacheTxLocalAdapter<K, V> tx);
}
/**
@@ -4672,15 +4670,15 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
/** {@inheritDoc} */
@SuppressWarnings({"unchecked"})
- @Override public final IgniteFuture<Object> op(GridCacheTxLocalAdapter<K, V> tx) {
- return (IgniteFuture<Object>)inOp(tx);
+ @Override public final InternalFuture<Object> op(GridCacheTxLocalAdapter<K, V> tx) {
+ return (InternalFuture<Object>)inOp(tx);
}
/**
* @param tx Transaction.
* @return Operation return value.
*/
- public abstract IgniteFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx);
+ public abstract InternalFuture<?> inOp(GridCacheTxLocalAdapter<K, V> tx);
}
/**
@@ -4794,7 +4792,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
private final ReentrantLock lock = new ReentrantLock();
/** Future. */
- private IgniteFuture fut;
+ private InternalFuture fut;
/**
* Tries to acquire lock.
@@ -4832,7 +4830,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
*
* @return Future.
*/
- public IgniteFuture future() {
+ public InternalFuture future() {
return fut;
}
@@ -4841,7 +4839,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
*
* @param fut Future.
*/
- public void future(@Nullable IgniteFuture fut) {
+ public void future(@Nullable InternalFuture fut) {
this.fut = fut;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityManager.java
index 834286d..03d60f8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityManager.java
@@ -90,10 +90,10 @@ public class GridCacheAffinityManager<K, V> extends GridCacheManagerAdapter<K, V
* @param topVer Topology version to wait.
* @return Affinity ready future.
*/
- public IgniteFuture<Long> affinityReadyFuture(long topVer) {
+ public InternalFuture<Long> affinityReadyFuture(long topVer) {
assert !cctx.isLocal();
- IgniteFuture<Long> fut = aff.readyFuture(topVer);
+ InternalFuture<Long> fut = aff.readyFuture(topVer);
return fut != null ? fut : new GridFinishedFutureEx<>(topVer);
}
@@ -105,7 +105,7 @@ public class GridCacheAffinityManager<K, V> extends GridCacheManagerAdapter<K, V
* @param topVer Topology version to wait.
* @return Affinity ready future or {@code null}.
*/
- @Nullable public IgniteFuture<Long> affinityReadyFuturex(long topVer) {
+ @Nullable public InternalFuture<Long> affinityReadyFuturex(long topVer) {
assert !cctx.isLocal();
return aff.readyFuture(topVer);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
index c6cb355..3db5454 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
@@ -15,7 +15,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.portables.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.cloner.*;
import org.gridgain.grid.kernal.*;
@@ -1207,12 +1206,12 @@ public class GridCacheContext<K, V> implements Externalizable {
* @param f Target future.
* @return Wrapped future that is aware of cloning behaviour.
*/
- public IgniteFuture<V> wrapClone(IgniteFuture<V> f) {
+ public InternalFuture<V> wrapClone(InternalFuture<V> f) {
if (!hasFlag(CLONE))
return f;
- return f.chain(new CX1<IgniteFuture<V>, V>() {
- @Override public V applyx(IgniteFuture<V> f) throws IgniteCheckedException {
+ return f.chain(new CX1<InternalFuture<V>, V>() {
+ @Override public V applyx(InternalFuture<V> f) throws IgniteCheckedException {
return cloneValue(f.get());
}
});
@@ -1222,12 +1221,12 @@ public class GridCacheContext<K, V> implements Externalizable {
* @param f Target future.
* @return Wrapped future that is aware of cloning behaviour.
*/
- public IgniteFuture<Map<K, V>> wrapCloneMap(IgniteFuture<Map<K, V>> f) {
+ public InternalFuture<Map<K, V>> wrapCloneMap(InternalFuture<Map<K, V>> f) {
if (!hasFlag(CLONE))
return f;
- return f.chain(new CX1<IgniteFuture<Map<K, V>>, Map<K, V>>() {
- @Override public Map<K, V> applyx(IgniteFuture<Map<K, V>> f) throws IgniteCheckedException {
+ return f.chain(new CX1<InternalFuture<Map<K, V>>, Map<K, V>>() {
+ @Override public Map<K, V> applyx(InternalFuture<Map<K, V>> f) throws IgniteCheckedException {
Map<K, V> map = new GridLeanMap<>();
for (Map.Entry<K, V> e : f.get().entrySet())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
index 452e074..7936f48 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
@@ -369,7 +369,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
GridCacheProjectionImpl<K, V> old = ctx.gate().enter(proxy.gateProjection());
try {
@@ -401,7 +401,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
return proxy.getAsync(key);
}
@@ -412,7 +412,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
// Should not pass dht entries as to near cache.
return proxy.putAsync(key, val, isNearEnabled(ctx) ? null : cached, ttl, filter);
}
@@ -424,7 +424,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<Boolean> setxAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
// Should not pass dht entries as to near cache.
return proxy.putxAsync(key, val, isNearEnabled(ctx) ? null : cached, ttl, filter);
}
@@ -435,7 +435,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Override public InternalFuture<V> replaceAsync(V val) {
return setAsync(val, ctx.hasPeekArray());
}
@@ -445,7 +445,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
return setxAsync(newVal, ctx.equalsPeekArray(newVal));
}
@@ -491,7 +491,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Override public InternalFuture<V> setIfAbsentAsync(V val) {
return setAsync(val, ctx.noPeekArray());
}
@@ -501,7 +501,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
return setxAsync(val, ctx.noPeekArray());
}
@@ -511,7 +511,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
return proxy.transformAsync(key, transformer, isNearEnabled(ctx) ? null : cached, ttl);
}
@@ -521,7 +521,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(V val) {
return setxAsync(val, ctx.hasPeekArray());
}
@@ -531,7 +531,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return proxy.removeAsync(key, isNearEnabled(ctx) ? null : cached, filter);
}
@@ -541,7 +541,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<Boolean> removexAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return proxy.removexAsync(key, isNearEnabled(ctx) ? null : cached, filter);
}
@@ -551,7 +551,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Override public InternalFuture<Boolean> removeAsync(V val) {
return proxy.removeAsync(key, val);
}
@@ -700,7 +700,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return proxy.lockAsync(key, timeout, filter);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
index b15b958..cc5077f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
@@ -204,7 +204,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
throw unsupported();
}
@@ -241,7 +241,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
throw unsupported();
}
@@ -251,7 +251,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
throw unsupported();
}
@@ -261,7 +261,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<Boolean> setxAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
throw unsupported();
}
@@ -271,7 +271,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
throw unsupported();
}
@@ -281,7 +281,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Override public InternalFuture<V> replaceAsync(V val) {
throw unsupported();
}
@@ -291,7 +291,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
throw unsupported();
}
@@ -311,7 +311,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Override public InternalFuture<V> setIfAbsentAsync(V val) {
throw unsupported();
}
@@ -321,7 +321,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
throw unsupported();
}
@@ -331,7 +331,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(V val) {
throw unsupported();
}
@@ -341,7 +341,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
throw unsupported();
}
@@ -351,7 +351,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<Boolean> removexAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
throw unsupported();
}
@@ -361,7 +361,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Override public InternalFuture<Boolean> removeAsync(V val) {
throw unsupported();
}
@@ -454,7 +454,7 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
throw unsupported();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionManager.java
index e07211c..8865eb3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionManager.java
@@ -1050,8 +1050,8 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
// Thread that prepares future should remove it and install listener.
curEvictFut.compareAndSet(fut, null);
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
if (!busyLock.enterBusy()) {
if (log.isDebugEnabled())
log.debug("Will not notify eviction future completion (grid is stopping): " +
@@ -1103,7 +1103,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
try {
t = fut.get();
}
- catch (IgniteFutureCancelledException ignored) {
+ catch (InternalFutureCancelledException ignored) {
assert false : "Future has been cancelled, but manager is not stopping: " + fut;
return;
@@ -1370,7 +1370,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
assert !cctx.isNear() && evictSync;
ClusterNode loc = cctx.localNode();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheExplicitLockSpan.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheExplicitLockSpan.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheExplicitLockSpan.java
index efb8811..7e157b3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheExplicitLockSpan.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheExplicitLockSpan.java
@@ -234,7 +234,7 @@ public class GridCacheExplicitLockSpan<K> extends ReentrantLock {
*
* @return Release future.
*/
- public IgniteFuture<Object> releaseFuture() {
+ public InternalFuture<Object> releaseFuture() {
return releaseFut;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
index 6862a5e..1255651 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
@@ -110,7 +110,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
throw new UnsupportedOperationException("getAsync");
}
@@ -125,7 +125,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
throw new UnsupportedOperationException("reloadAsync");
}
@@ -202,7 +202,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException("setAsync");
}
@@ -212,7 +212,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Override public InternalFuture<V> setIfAbsentAsync(V val) {
throw new UnsupportedOperationException("setIfAbsentAsync");
}
@@ -223,7 +223,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxAsync(V val,
+ @Override public InternalFuture<Boolean> setxAsync(V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException("setxAsync");
}
@@ -234,7 +234,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
throw new UnsupportedOperationException("setxIfAbsentAsync");
}
@@ -244,7 +244,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
throw new UnsupportedOperationException("transformAsync");
}
@@ -254,7 +254,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Override public InternalFuture<V> replaceAsync(V val) {
throw new UnsupportedOperationException("replaceAsync");
}
@@ -264,7 +264,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(V val) {
throw new UnsupportedOperationException("replacexAsync");
}
@@ -274,7 +274,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
throw new UnsupportedOperationException("replaceAsync");
}
@@ -285,7 +285,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException("removeAsync");
}
@@ -295,7 +295,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException("removexAsync");
}
@@ -305,7 +305,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Override public InternalFuture<Boolean> removeAsync(V val) {
throw new UnsupportedOperationException("removeAsync");
}
@@ -332,7 +332,7 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException("lockAsync");
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFuture.java
index 32b66f3..c3633f7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFuture.java
@@ -17,7 +17,7 @@ import java.util.*;
/**
* This interface should be implemented by all distributed futures.
*/
-public interface GridCacheFuture<R> extends IgniteFuture<R> {
+public interface GridCacheFuture<R> extends InternalFuture<R> {
/**
* @return Unique identifier for this future.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheIoManager.java
index a222c32..a93b60e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheIoManager.java
@@ -108,13 +108,13 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
log.debug("Received message has higher topology version [msg=" + msg +
", locTopVer=" + locTopVer + ", rmtTopVer=" + rmtTopVer + ']');
- IgniteFuture<Long> topFut = cctx.discovery().topologyFuture(rmtTopVer);
+ InternalFuture<Long> topFut = cctx.discovery().topologyFuture(rmtTopVer);
if (!topFut.isDone()) {
final IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c0 = c;
- topFut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ topFut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
onMessage0(nodeId, cacheMsg, c0);
}
});
@@ -203,7 +203,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
if (cacheMsg.allowForStartup())
processMessage(nodeId, cacheMsg, c);
else {
- IgniteFuture<?> startFut = startFuture(cacheMsg);
+ InternalFuture<?> startFut = startFuture(cacheMsg);
if (startFut.isDone())
processMessage(nodeId, cacheMsg, c);
@@ -213,8 +213,8 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
", locId=" + cctx.localNodeId() + ", msg=" + cacheMsg + ']');
// Don't hold this thread waiting for preloading to complete.
- startFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ startFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
rw.readLock();
try {
@@ -269,7 +269,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
* @param cacheMsg Cache message to get start future.
* @return Preloader start future.
*/
- private IgniteFuture<Object> startFuture(GridCacheMessage<K, V> cacheMsg) {
+ private InternalFuture<Object> startFuture(GridCacheMessage<K, V> cacheMsg) {
int cacheId = cacheMsg.cacheId();
return cacheId != 0 ? cctx.cacheContext(cacheId).preloader().startFuture() : cctx.preloadersStartFuture();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiTxFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiTxFuture.java
index 44e9711..ebbd48a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiTxFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiTxFuture.java
@@ -94,8 +94,8 @@ public final class GridCacheMultiTxFuture<K, V> extends GridFutureAdapter<Boolea
for (final GridCacheTxEx<K, V> tx : txs) {
if (!tx.done()) {
- tx.finishFuture().listenAsync(new CI1<IgniteFuture<GridCacheTx>>() {
- @Override public void apply(IgniteFuture<GridCacheTx> t) {
+ tx.finishFuture().listenAsync(new CI1<InternalFuture<GridCacheTx>>() {
+ @Override public void apply(InternalFuture<GridCacheTx> t) {
remainingTxs.remove(tx);
checkRemaining();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
index 10a953b..0fda7c1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.discovery.*;
import org.gridgain.grid.kernal.managers.eventstorage.*;
@@ -192,7 +191,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
}
}
- for (IgniteFuture<?> fut : atomicFuts.values()) {
+ for (InternalFuture<?> fut : atomicFuts.values()) {
if (fut instanceof GridCacheFuture) {
GridCacheFuture cacheFut = (GridCacheFuture)fut;
@@ -290,7 +289,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param fut Future.
*/
public void addAtomicFuture(GridCacheVersion futVer, GridCacheAtomicFuture<K, ?> fut) {
- IgniteFuture<?> old = atomicFuts.put(futVer, fut);
+ InternalFuture<?> old = atomicFuts.put(futVer, fut);
assert old == null;
}
@@ -308,7 +307,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param futVer Future ID.
* @return Future.
*/
- @Nullable public IgniteFuture<?> atomicFuture(GridCacheVersion futVer) {
+ @Nullable public InternalFuture<?> atomicFuture(GridCacheVersion futVer) {
return atomicFuts.get(futVer);
}
@@ -316,7 +315,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param futVer Future ID.
* @return Removed future.
*/
- @Nullable public IgniteFuture<?> removeAtomicFuture(GridCacheVersion futVer) {
+ @Nullable public InternalFuture<?> removeAtomicFuture(GridCacheVersion futVer) {
return atomicFuts.remove(futVer);
}
@@ -487,10 +486,10 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param ver Version.
* @return All futures for given lock version.
*/
- public <T> Collection<? extends IgniteFuture<T>> futures(GridCacheVersion ver) {
+ public <T> Collection<? extends InternalFuture<T>> futures(GridCacheVersion ver) {
Collection c = futs.get(ver);
- return c == null ? Collections.<IgniteFuture<T>>emptyList() : (Collection<IgniteFuture<T>>)c;
+ return c == null ? Collections.<InternalFuture<T>>emptyList() : (Collection<InternalFuture<T>>)c;
}
/**
@@ -893,7 +892,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @return Future that signals when all locks for given partitions are released.
*/
@SuppressWarnings({"unchecked"})
- public IgniteFuture<?> finishLocks(long topVer) {
+ public InternalFuture<?> finishLocks(long topVer) {
assert topVer > 0;
return finishLocks(null, topVer);
}
@@ -905,7 +904,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param topVer Topology version to wait for.
* @return Explicit locks release future.
*/
- public IgniteFuture<?> finishExplicitLocks(long topVer) {
+ public InternalFuture<?> finishExplicitLocks(long topVer) {
GridCompoundFuture<Object, Object> res = new GridCompoundFuture<>(cctx.kernalContext());
for (GridCacheExplicitLockSpan<K> span : pendingExplicit.values()) {
@@ -925,14 +924,14 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
*
* @return Finish update future.
*/
- public IgniteFuture<?> finishAtomicUpdates(long topVer) {
+ public InternalFuture<?> finishAtomicUpdates(long topVer) {
GridCompoundFuture<Object, Object> res = new GridCompoundFuture<>(cctx.kernalContext());
res.ignoreChildFailures(ClusterTopologyException.class, GridCachePartialUpdateException.class);
for (GridCacheAtomicFuture<K, ?> fut : atomicFuts.values()) {
if (fut.waitForPartitionExchange() && fut.topologyVersion() < topVer)
- res.add((IgniteFuture<Object>)fut);
+ res.add((InternalFuture<Object>)fut);
}
res.markInitialized();
@@ -946,7 +945,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @return Future that signals when all locks for given keys are released.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<?> finishKeys(Collection<K> keys, long topVer) {
+ public InternalFuture<?> finishKeys(Collection<K> keys, long topVer) {
if (!(keys instanceof Set))
keys = new HashSet<>(keys);
@@ -964,7 +963,7 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
* @param topVer Topology version.
* @return Future that signals when all locks for given partitions will be released.
*/
- private IgniteFuture<?> finishLocks(@Nullable final IgnitePredicate<K> keyFilter, long topVer) {
+ private InternalFuture<?> finishLocks(@Nullable final IgnitePredicate<K> keyFilter, long topVer) {
assert topVer != 0;
if (topVer < 0)
@@ -984,8 +983,8 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
finishFuts.add(finishFut);
- finishFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ finishFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
finishFuts.remove(finishFut);
// This call is required to make sure that the concurrent queue
[15/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
index f478377..f2993e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
@@ -27,11 +27,11 @@ public interface IgniteFuture<R> {
* returns computation result.
*
* @return Computation result.
- * @throws org.gridgain.grid.GridInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
- * @throws IgniteFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
- * @throws IgniteCheckedException If computation failed.
+ * @throws IgniteInterruptedException Subclass of {@link IgniteException} thrown if the wait was interrupted.
+ * @throws IgniteFutureCancelledException Subclass of {@link IgniteException} throws if computation was cancelled.
+ * @throws IgniteException If computation failed.
*/
- public R get() throws IgniteCheckedException;
+ public R get() throws IgniteException;
/**
* Synchronously waits for completion of the computation for
@@ -40,12 +40,12 @@ public interface IgniteFuture<R> {
*
* @param timeout The maximum time to wait in milliseconds.
* @return Computation result.
- * @throws GridInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
- * @throws IgniteFutureTimeoutException Subclass of {@link IgniteCheckedException} thrown if the wait was timed out.
- * @throws IgniteFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
- * @throws IgniteCheckedException If computation failed.
+ * @throws IgniteInterruptedException Subclass of {@link IgniteException} thrown if the wait was interrupted.
+ * @throws IgniteFutureTimeoutException Subclass of {@link IgniteException} thrown if the wait was timed out.
+ * @throws IgniteFutureCancelledException Subclass of {@link IgniteException} throws if computation was cancelled.
+ * @throws IgniteException If computation failed.
*/
- public R get(long timeout) throws IgniteCheckedException;
+ public R get(long timeout) throws IgniteException;
/**
* Synchronously waits for completion of the computation for
@@ -54,20 +54,20 @@ public interface IgniteFuture<R> {
* @param timeout The maximum time to wait.
* @param unit The time unit of the {@code timeout} argument.
* @return Computation result.
- * @throws GridInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
- * @throws IgniteFutureTimeoutException Subclass of {@link IgniteCheckedException} thrown if the wait was timed out.
- * @throws IgniteFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
- * @throws IgniteCheckedException If computation failed.
+ * @throws IgniteInterruptedException Subclass of {@link IgniteException} thrown if the wait was interrupted.
+ * @throws IgniteFutureTimeoutException Subclass of {@link IgniteException} thrown if the wait was timed out.
+ * @throws IgniteFutureCancelledException Subclass of {@link IgniteException} throws if computation was cancelled.
+ * @throws IgniteException If computation failed.
*/
- public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
+ public R get(long timeout, TimeUnit unit) throws IgniteException;
/**
* Cancels this future.
*
* @return {@code True} if future was canceled (i.e. was not finished prior to this call).
- * @throws IgniteCheckedException If cancellation failed.
+ * @throws IgniteException If cancellation failed.
*/
- public boolean cancel() throws IgniteCheckedException;
+ public boolean cancel() throws IgniteException;
/**
* Checks if computation is done.
@@ -106,7 +106,7 @@ public interface IgniteFuture<R> {
* immediately notified within the same thread.
* <p>
* Default value is {@code false}. To change the default, set
- * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
+ * {@link IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
*
* @param syncNotify Flag to turn on or off synchronous listener notification.
*/
@@ -120,7 +120,7 @@ public interface IgniteFuture<R> {
* immediately notified within the same thread.
* <p>
* Default value is {@code false}. To change the default, set
- * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
+ * {@link IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
*
* @return Synchronous listener notification flag.
*/
@@ -135,7 +135,7 @@ public interface IgniteFuture<R> {
* started the future, or in a different thread).
* <p>
* Default value is {@code false}. To change the default, set
- * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
+ * {@link IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
*
* @param concurNotify Flag to turn on or off concurrent listener notification.
*/
@@ -150,7 +150,7 @@ public interface IgniteFuture<R> {
* started the future, or in a different thread).
* <p>
* Default value is {@code false}. To change the default, set
- * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
+ * {@link IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
*
* @return Concurrent listener notification flag
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/IgniteFutureCancelledException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFutureCancelledException.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFutureCancelledException.java
index 692c725..86bdc72 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFutureCancelledException.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFutureCancelledException.java
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.*;
/**
* Future computation cannot be retrieved because it was cancelled.
*/
-public class IgniteFutureCancelledException extends IgniteCheckedException {
+public class IgniteFutureCancelledException extends IgniteException {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/InternalFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/InternalFuture.java b/modules/core/src/main/java/org/apache/ignite/lang/InternalFuture.java
new file mode 100644
index 0000000..643b1d9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/InternalFuture.java
@@ -0,0 +1,182 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.lang;
+
+import org.apache.ignite.*;
+import org.gridgain.grid.*;
+import org.jetbrains.annotations.*;
+
+import java.util.concurrent.*;
+
+/**
+ * Extension for standard {@link Future} interface. It adds simplified exception handling,
+ * functional programming support and ability to listen for future completion via functional
+ * callback.
+ * @param <R> Type of the result for the future.
+ */
+public interface InternalFuture<R> {
+ /**
+ * Synchronously waits for completion of the computation and
+ * returns computation result.
+ *
+ * @return Computation result.
+ * @throws InternalInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
+ * @throws InternalFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
+ * @throws IgniteCheckedException If computation failed.
+ */
+ public R get() throws IgniteCheckedException;
+
+ /**
+ * Synchronously waits for completion of the computation for
+ * up to the timeout specified and returns computation result.
+ * This method is equivalent to calling {@link #get(long, TimeUnit) get(long, TimeUnit.MILLISECONDS)}.
+ *
+ * @param timeout The maximum time to wait in milliseconds.
+ * @return Computation result.
+ * @throws InternalInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
+ * @throws InternalFutureTimeoutException Subclass of {@link IgniteCheckedException} thrown if the wait was timed out.
+ * @throws InternalFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
+ * @throws IgniteCheckedException If computation failed.
+ */
+ public R get(long timeout) throws IgniteCheckedException;
+
+ /**
+ * Synchronously waits for completion of the computation for
+ * up to the timeout specified and returns computation result.
+ *
+ * @param timeout The maximum time to wait.
+ * @param unit The time unit of the {@code timeout} argument.
+ * @return Computation result.
+ * @throws InternalInterruptedException Subclass of {@link IgniteCheckedException} thrown if the wait was interrupted.
+ * @throws InternalFutureTimeoutException Subclass of {@link IgniteCheckedException} thrown if the wait was timed out.
+ * @throws InternalFutureCancelledException Subclass of {@link IgniteCheckedException} throws if computation was cancelled.
+ * @throws IgniteCheckedException If computation failed.
+ */
+ public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
+
+ /**
+ * Cancels this future.
+ *
+ * @return {@code True} if future was canceled (i.e. was not finished prior to this call).
+ * @throws IgniteCheckedException If cancellation failed.
+ */
+ public boolean cancel() throws IgniteCheckedException;
+
+ /**
+ * Checks if computation is done.
+ *
+ * @return {@code True} if computation is done, {@code false} otherwise.
+ */
+ public boolean isDone();
+
+ /**
+ * Returns {@code true} if this computation was cancelled before it completed normally.
+ *
+ * @return {@code True} if this computation was cancelled before it completed normally.
+ */
+ public boolean isCancelled();
+
+ /**
+ * Gets start time for this future.
+ *
+ * @return Start time for this future.
+ */
+ public long startTime();
+
+ /**
+ * Gets duration in milliseconds between start of the future and current time if future
+ * is not finished, or between start and finish of this future.
+ *
+ * @return Time in milliseconds this future has taken to execute.
+ */
+ public long duration();
+
+ /**
+ * Flag to turn on or off synchronous listener notification. If this flag is {@code true}, then
+ * upon future completion the notification may happen in the same thread that created
+ * the future. This becomes especially important when adding listener to a future that
+ * is already {@code done} - if this flag is {@code true}, then listener will be
+ * immediately notified within the same thread.
+ * <p>
+ * Default value is {@code false}. To change the default, set
+ * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
+ *
+ * @param syncNotify Flag to turn on or off synchronous listener notification.
+ */
+ public void syncNotify(boolean syncNotify);
+
+ /**
+ * Gets value of synchronous listener notification flag. If this flag is {@code true}, then
+ * upon future completion the notification may happen in the same thread that created
+ * the future. This becomes especially important when adding listener to a future that
+ * is already {@code done} - if this flag is {@code true}, then listener will be
+ * immediately notified within the same thread.
+ * <p>
+ * Default value is {@code false}. To change the default, set
+ * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_SYNC_NOTIFICATION} system property to {@code true}.
+ *
+ * @return Synchronous listener notification flag.
+ */
+ public boolean syncNotify();
+
+ /**
+ * Flag to turn on or off concurrent listener notification. This flag comes into play only
+ * when a future has more than one listener subscribed to it. If this flag is {@code true},
+ * then all listeners will be notified concurrently by different threads; otherwise,
+ * listeners will be notified one after another within one thread (depending on
+ * {@link #syncNotify()} flag, these notifications may happen either in the same thread which
+ * started the future, or in a different thread).
+ * <p>
+ * Default value is {@code false}. To change the default, set
+ * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
+ *
+ * @param concurNotify Flag to turn on or off concurrent listener notification.
+ */
+ public void concurrentNotify(boolean concurNotify);
+
+ /**
+ * Gets value concurrent listener notification flag. This flag comes into play only
+ * when a future has more than one listener subscribed to it. If this flag is {@code true},
+ * then all listeners will be notified concurrently by different threads; otherwise,
+ * listeners will be notified one after another within one thread (depending on
+ * {@link #syncNotify()} flag, these notifications may happen either in the same thread which
+ * started the future, or in a different thread).
+ * <p>
+ * Default value is {@code false}. To change the default, set
+ * {@link org.apache.ignite.IgniteSystemProperties#GG_FUT_CONCURRENT_NOTIFICATION} system property to {@code true}.
+ *
+ * @return Concurrent listener notification flag
+ */
+ public boolean concurrentNotify();
+
+ /**
+ * Registers listener closure to be asynchronously notified whenever future completes.
+ *
+ * @param lsnr Listener closure to register. If not provided - this method is no-op.
+ */
+ public void listenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>> lsnr);
+
+ /**
+ * Removes given listeners from the future. If no listener is passed in, then all listeners
+ * will be removed.
+ *
+ * @param lsnr Listeners to remove.
+ */
+ public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>>... lsnr);
+
+ /**
+ * Make a chained future to convert result of this future (when complete) into a new format.
+ * It is guaranteed that done callback will be called only ONCE.
+ *
+ * @param doneCb Done callback that is applied to this future when it finishes to produce chained future result.
+ * @return Chained future that finishes after this future completes and done callback is called.
+ */
+ public <T> InternalFuture<T> chain(IgniteClosure<? super InternalFuture<R>, T> doneCb);
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureCancelledException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureCancelledException.java b/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureCancelledException.java
new file mode 100644
index 0000000..b3c8e3d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureCancelledException.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.lang;
+
+import org.apache.ignite.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Future computation cannot be retrieved because it was cancelled.
+ */
+public class InternalFutureCancelledException extends IgniteCheckedException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Creates new exception with given error message.
+ *
+ * @param msg Error message.
+ */
+ public InternalFutureCancelledException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Creates new exception with given throwable as a nested cause and
+ * source of error message.
+ *
+ * @param cause Non-null throwable cause.
+ */
+ public InternalFutureCancelledException(Throwable cause) {
+ this(cause.getMessage(), cause);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ * @param cause Optional nested exception (can be {@code null}).
+ */
+ public InternalFutureCancelledException(String msg, @Nullable Throwable cause) {
+ super(msg, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureTimeoutException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureTimeoutException.java b/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureTimeoutException.java
new file mode 100644
index 0000000..057b2c8
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/InternalFutureTimeoutException.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.lang;
+
+import org.apache.ignite.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Future computation completion is timed out.
+ */
+public class InternalFutureTimeoutException extends IgniteCheckedException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Creates new exception with given error message.
+ *
+ * @param msg Error message.
+ */
+ public InternalFutureTimeoutException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Creates new exception with given throwable as a nested cause and
+ * source of error message.
+ *
+ * @param cause Non-null throwable cause.
+ */
+ public InternalFutureTimeoutException(Throwable cause) {
+ this(cause.getMessage(), cause);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ * @param cause Optional nested exception (can be {@code null}).
+ */
+ public InternalFutureTimeoutException(String msg, @Nullable Throwable cause) {
+ super(msg, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectStreamRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectStreamRegistry.java b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectStreamRegistry.java
index 28cbcad..c375b77 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectStreamRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectStreamRegistry.java
@@ -57,9 +57,9 @@ class IgniteOptimizedObjectStreamRegistry {
* Gets output stream.
*
* @return Object output stream.
- * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
+ * @throws InternalInterruptedException If thread is interrupted while trying to take holder from pool.
*/
- static IgniteOptimizedObjectOutputStream out() throws GridInterruptedException {
+ static IgniteOptimizedObjectOutputStream out() throws InternalInterruptedException {
return holder().acquireOut();
}
@@ -67,9 +67,9 @@ class IgniteOptimizedObjectStreamRegistry {
* Gets input stream.
*
* @return Object input stream.
- * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
+ * @throws InternalInterruptedException If thread is interrupted while trying to take holder from pool.
*/
- static IgniteOptimizedObjectInputStream in() throws GridInterruptedException {
+ static IgniteOptimizedObjectInputStream in() throws InternalInterruptedException {
return holder().acquireIn();
}
@@ -120,9 +120,9 @@ class IgniteOptimizedObjectStreamRegistry {
* Gets holder from pool or thread local.
*
* @return Stream holder.
- * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
+ * @throws InternalInterruptedException If thread is interrupted while trying to take holder from pool.
*/
- private static StreamHolder holder() throws GridInterruptedException {
+ private static StreamHolder holder() throws InternalInterruptedException {
StreamHolder holder = holders.get();
if (holder == null) {
@@ -130,7 +130,7 @@ class IgniteOptimizedObjectStreamRegistry {
holders.set(holder = pool != null ? pool.take() : new StreamHolder());
}
catch (InterruptedException e) {
- throw new GridInterruptedException("Failed to take object stream from pool (thread interrupted).", e);
+ throw new InternalInterruptedException("Failed to take object stream from pool (thread interrupted).", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/scheduler/SchedulerFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/scheduler/SchedulerFuture.java b/modules/core/src/main/java/org/apache/ignite/scheduler/SchedulerFuture.java
index f9756b2..3661e70 100644
--- a/modules/core/src/main/java/org/apache/ignite/scheduler/SchedulerFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/scheduler/SchedulerFuture.java
@@ -20,7 +20,7 @@ import java.util.concurrent.*;
* when calling {@link org.apache.ignite.IgniteScheduler#scheduleLocal(Callable, String)} or
* {@link org.apache.ignite.IgniteScheduler#scheduleLocal(Runnable, String)} methods.
*/
-public interface SchedulerFuture<R> extends IgniteFuture<R> {
+public interface SchedulerFuture<R> extends InternalFuture<R> {
/**
* Gets scheduled task ID.
*
@@ -126,7 +126,7 @@ public interface SchedulerFuture<R> extends IgniteFuture<R> {
*
* @return Result of the next execution.
* @throws CancellationException {@inheritDoc}
- * @throws GridInterruptedException {@inheritDoc}
+ * @throws InternalInterruptedException {@inheritDoc}
* @throws IgniteCheckedException {@inheritDoc}
*/
@Override public R get() throws IgniteCheckedException;
@@ -139,8 +139,8 @@ public interface SchedulerFuture<R> extends IgniteFuture<R> {
* @param timeout {@inheritDoc}
* @return The computed result of the next execution.
* @throws CancellationException {@inheritDoc}
- * @throws GridInterruptedException {@inheritDoc}
- * @throws org.apache.ignite.lang.IgniteFutureTimeoutException {@inheritDoc}
+ * @throws InternalInterruptedException {@inheritDoc}
+ * @throws InternalFutureTimeoutException {@inheritDoc}
* @throws IgniteCheckedException {@inheritDoc}
*/
@Override public R get(long timeout) throws IgniteCheckedException;
@@ -153,8 +153,8 @@ public interface SchedulerFuture<R> extends IgniteFuture<R> {
* @param unit {@inheritDoc}
* @return The computed result of the next execution.
* @throws CancellationException {@inheritDoc}
- * @throws GridInterruptedException {@inheritDoc}
- * @throws org.apache.ignite.lang.IgniteFutureTimeoutException {@inheritDoc}
+ * @throws InternalInterruptedException {@inheritDoc}
+ * @throws InternalFutureTimeoutException {@inheritDoc}
* @throws IgniteCheckedException {@inheritDoc}
*/
@Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 9ba7c45..01da206 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -1525,7 +1525,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
if (log.isDebugEnabled())
log.debug("Context has been initialized.");
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
U.warn(log, "Thread has been interrupted while waiting for SPI context initialization.", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index bf1b783..7509bd3 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -487,7 +487,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
U.closeQuiet(sock);
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Joining thread was interrupted.");
@@ -510,7 +510,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
U.sleep(2000);
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Joining thread was interrupted.");
}
@@ -609,7 +609,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
}
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Disconnect handler was interrupted.");
@@ -654,7 +654,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
sockRdr.addMessage(msg);
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Heartbeat sender was interrupted.");
}
@@ -776,7 +776,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
try {
U.join(msgWrk);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 35aec0e..e58f60b 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -266,7 +266,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
private final Object mux = new Object();
/** Map with proceeding ping requests. */
- private final ConcurrentMap<InetSocketAddress, IgniteFuture<IgniteBiTuple<UUID, Boolean>>> pingMap =
+ private final ConcurrentMap<InetSocketAddress, InternalFuture<IgniteBiTuple<UUID, Boolean>>> pingMap =
new ConcurrentHashMap8<>();
/** Debug mode. */
@@ -789,7 +789,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
try {
U.sleep(2000);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
@@ -880,7 +880,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
if (log.isDebugEnabled())
log.debug("Context has been initialized.");
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
U.warn(log, "Thread has been interrupted while waiting for SPI context initialization.", e);
}
}
@@ -1156,7 +1156,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
GridFutureAdapterEx<IgniteBiTuple<UUID, Boolean>> fut = new GridFutureAdapterEx<>();
- IgniteFuture<IgniteBiTuple<UUID, Boolean>> oldFut = pingMap.putIfAbsent(addr, fut);
+ InternalFuture<IgniteBiTuple<UUID, Boolean>> oldFut = pingMap.putIfAbsent(addr, fut);
if (oldFut != null)
return oldFut.get();
@@ -1473,7 +1473,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
try {
U.sleep(2000);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
@@ -1497,7 +1497,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
try {
U.sleep(2000);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
index fa45f64..af6dce6 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
@@ -626,7 +626,7 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
try {
U.sleep(2000);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java
index 7514d2a..b3e8d73 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java
@@ -327,7 +327,7 @@ public class TcpDiscoveryJdbcIpFinder extends TcpDiscoveryIpFinderAdapter {
try {
U.await(initLatch);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index b3e1327..8c91232 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -476,7 +476,7 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
return rmtAddrs;
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
U.warn(log, "Got interrupted while sending address request.");
Thread.currentThread().interrupt();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java
index 110a3bd..91f4121 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java
@@ -153,7 +153,7 @@ public class TcpDiscoverySharedFsIpFinder extends TcpDiscoveryIpFinderAdapter {
try {
U.await(initLatch);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
index 45406dc..f0368c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
@@ -285,7 +285,7 @@ public class FileSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi,
try {
space.stop();
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
U.error(log, "Interrupted.", e);
}
}
@@ -1546,9 +1546,9 @@ public class FileSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi,
/**
* Stops space.
*
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- public void stop() throws GridInterruptedException {
+ public void stop() throws InternalInterruptedException {
U.interrupt(writer);
U.interrupt(compactor);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java
index 76f5d8b..b72f855 100644
--- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java
@@ -232,7 +232,7 @@ public class StreamerBoundedSizeBatchWindow<E> extends StreamerWindowAdapter<E>
try {
return enqueueInternal(evt);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
return false;
}
}
@@ -243,10 +243,10 @@ public class StreamerBoundedSizeBatchWindow<E> extends StreamerWindowAdapter<E>
* @param evt Event to add.
* @return {@code True} if event was added.
*
- * @throws GridInterruptedException If thread was interrupted.
+ * @throws InternalInterruptedException If thread was interrupted.
*/
@SuppressWarnings("LockAcquiredButNotSafelyReleased")
- private boolean enqueueInternal(E evt) throws GridInterruptedException {
+ private boolean enqueueInternal(E evt) throws InternalInterruptedException {
QueueHolder tup = holder;
ConcurrentLinkedDeque8<Batch> evts = tup.batchQueue();
@@ -617,9 +617,9 @@ public class StreamerBoundedSizeBatchWindow<E> extends StreamerWindowAdapter<E>
/**
* Waits for latch count down after last event was added.
*
- * @throws GridInterruptedException If wait was interrupted.
+ * @throws InternalInterruptedException If wait was interrupted.
*/
- public void finish() throws GridInterruptedException {
+ public void finish() throws InternalInterruptedException {
writeLock().lock();
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java
index 829e6fa..f54c670 100644
--- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java
@@ -266,7 +266,7 @@ public class StreamerBoundedTimeBatchWindow<E> extends StreamerWindowAdapter<E>
try {
return enqueue0(evt, U.currentTimeMillis());
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
return false;
}
}
@@ -278,9 +278,9 @@ public class StreamerBoundedTimeBatchWindow<E> extends StreamerWindowAdapter<E>
* @param ts Event timestamp.
* @return {@code True} if event was added.
*
- * @throws GridInterruptedException If thread was interrupted.
+ * @throws InternalInterruptedException If thread was interrupted.
*/
- private boolean enqueue0(E evt, long ts) throws GridInterruptedException {
+ private boolean enqueue0(E evt, long ts) throws InternalInterruptedException {
WindowHolder tup = ref.get();
ConcurrentLinkedDeque8<Batch> evts = tup.batchQueue();
@@ -697,9 +697,9 @@ public class StreamerBoundedTimeBatchWindow<E> extends StreamerWindowAdapter<E>
/**
* Waits for latch count down after last event was added.
*
- * @throws GridInterruptedException If wait was interrupted.
+ * @throws InternalInterruptedException If wait was interrupted.
*/
- public void finish() throws GridInterruptedException {
+ public void finish() throws InternalInterruptedException {
writeLock().lock();
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/client/impl/GridClientAbstractProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/client/impl/GridClientAbstractProjection.java b/modules/core/src/main/java/org/gridgain/client/impl/GridClientAbstractProjection.java
index 2c73b1f..29b633e 100644
--- a/modules/core/src/main/java/org/gridgain/client/impl/GridClientAbstractProjection.java
+++ b/modules/core/src/main/java/org/gridgain/client/impl/GridClientAbstractProjection.java
@@ -134,7 +134,7 @@ abstract class GridClientAbstractProjection<T extends GridClientAbstractProjecti
catch (GridClientException e) {
return new GridClientFutureAdapter<>(e);
}
- catch (GridInterruptedException | InterruptedException e) {
+ catch (InternalInterruptedException | InterruptedException e) {
Thread.currentThread().interrupt();
return new GridClientFutureAdapter<>(
@@ -206,7 +206,7 @@ abstract class GridClientAbstractProjection<T extends GridClientAbstractProjecti
catch (GridClientException e) {
return new GridClientFutureAdapter<>(e);
}
- catch (GridInterruptedException | InterruptedException e) {
+ catch (InternalInterruptedException | InterruptedException e) {
Thread.currentThread().interrupt();
return new GridClientFutureAdapter<>(new GridClientException("Interrupted when (re)trying to perform " +
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java b/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java
index 3ae1a50..f0bed92 100644
--- a/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java
+++ b/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.*;
/**
* Deployment or re-deployment failed.
*/
-public class GridDeploymentException extends IgniteCheckedException {
+public class GridDeploymentException extends IgniteException {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java b/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java
deleted file mode 100644
index 8c6230d..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid;
-
-import org.apache.ignite.*;
-
-/**
- * This exception is used to wrap standard {@link InterruptedException} into {@link IgniteCheckedException}.
- */
-@SuppressWarnings({"TypeMayBeWeakened"})
-public class GridInterruptedException extends IgniteCheckedException {
- /** */
- private static final long serialVersionUID = 0L;
-
- /**
- * Creates new exception with given throwable as a nested cause and
- * source of error message.
- *
- * @param cause Non-null throwable cause.
- */
- public GridInterruptedException(InterruptedException cause) {
- this(cause.getMessage(), cause);
- }
-
- /**
- * Creates a new exception with given error message and optional nested cause exception.
- *
- * @param msg Error message.
- */
- public GridInterruptedException(String msg) {
- super(msg);
- }
-
- /**
- * Creates a new exception with given error message and optional nested cause exception.
- *
- * @param msg Error message.
- * @param cause Optional nested exception (can be {@code null}).
- */
- public GridInterruptedException(String msg, InterruptedException cause) {
- super(msg, cause);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/IgniteInterruptedException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/IgniteInterruptedException.java b/modules/core/src/main/java/org/gridgain/grid/IgniteInterruptedException.java
new file mode 100644
index 0000000..6e2920e
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/IgniteInterruptedException.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.gridgain.grid;
+
+import org.apache.ignite.*;
+
+/**
+ * This exception is used to wrap standard {@link InterruptedException} into {@link IgniteException}.
+ */
+@SuppressWarnings({"TypeMayBeWeakened"})
+public class IgniteInterruptedException extends IgniteException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Creates new exception with given throwable as a nested cause and
+ * source of error message.
+ *
+ * @param cause Non-null throwable cause.
+ */
+ public IgniteInterruptedException(InterruptedException cause) {
+ this(cause.getMessage(), cause);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ */
+ public IgniteInterruptedException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ * @param cause Optional nested exception (can be {@code null}).
+ */
+ public IgniteInterruptedException(String msg, InterruptedException cause) {
+ super(msg, cause);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/InternalInterruptedException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/InternalInterruptedException.java b/modules/core/src/main/java/org/gridgain/grid/InternalInterruptedException.java
new file mode 100644
index 0000000..45f020d
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/InternalInterruptedException.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.gridgain.grid;
+
+import org.apache.ignite.*;
+
+/**
+ * This exception is used to wrap standard {@link InterruptedException} into {@link IgniteCheckedException}.
+ */
+@SuppressWarnings({"TypeMayBeWeakened"})
+public class InternalInterruptedException extends IgniteCheckedException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Creates new exception with given throwable as a nested cause and
+ * source of error message.
+ *
+ * @param cause Non-null throwable cause.
+ */
+ public InternalInterruptedException(InterruptedException cause) {
+ this(cause.getMessage(), cause);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ */
+ public InternalInterruptedException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Creates a new exception with given error message and optional nested cause exception.
+ *
+ * @param msg Error message.
+ * @param cause Optional nested exception (can be {@code null}).
+ */
+ public InternalInterruptedException(String msg, InterruptedException cause) {
+ super(msg, cause);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/GridCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCache.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCache.java
index 3af8e94..21d3850 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCache.java
@@ -223,7 +223,7 @@ public interface GridCache<K, V> extends GridCacheProjection<K, V> {
* {@link GridCacheStore#loadCache(org.apache.ignite.lang.IgniteBiInClosure,Object...)} method.
* @return Future to be completed whenever loading completes.
*/
- public IgniteFuture<?> loadCacheAsync(@Nullable IgniteBiPredicate<K, V> p, long ttl, @Nullable Object... args);
+ public InternalFuture<?> loadCacheAsync(@Nullable IgniteBiPredicate<K, V> p, long ttl, @Nullable Object... args);
/**
* Gets a random entry out of cache. In the worst cache scenario this method
@@ -261,7 +261,7 @@ public interface GridCache<K, V> extends GridCacheProjection<K, V> {
* <p>
* @return Future that will be completed when preloading is finished.
*/
- public IgniteFuture<?> forceRepartition();
+ public InternalFuture<?> forceRepartition();
/**
* Resets metrics for current cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
index 725f377..c038dd1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
@@ -119,7 +119,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
*
* @return See {@link GridCacheProjection#reloadAsync(Object)}.
*/
- public IgniteFuture<V> reloadAsync();
+ public InternalFuture<V> reloadAsync();
/**
* This method has the same semantic as
@@ -219,7 +219,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
*
* @return See {@link GridCacheProjection#getAsync(Object)}.
*/
- public IgniteFuture<V> getAsync();
+ public InternalFuture<V> getAsync();
/**
* This method has the same semantic as {@link #set(Object, org.apache.ignite.lang.IgnitePredicate[])} method, however it
@@ -249,7 +249,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param filter See {@link GridCacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}.
* @return See {@link GridCacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}.
*/
- public IgniteFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* This method has the same semantic as
@@ -268,7 +268,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param val See {@link GridCacheProjection#putIfAbsentAsync(Object, Object)}
* @return See {@link GridCacheProjection#putIfAbsentAsync(Object, Object)}.
*/
- public IgniteFuture<V> setIfAbsentAsync(V val);
+ public InternalFuture<V> setIfAbsentAsync(V val);
/**
* This method has the same semantic as
@@ -290,7 +290,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param filter See {@link GridCacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}.
* @return See {@link GridCacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}.
*/
- public IgniteFuture<Boolean> setxAsync(V val,
+ public InternalFuture<Boolean> setxAsync(V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -310,7 +310,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param val See {@link GridCacheProjection#putxIfAbsentAsync(Object, Object)}
* @return See {@link GridCacheProjection#putxIfAbsentAsync(Object, Object)}.
*/
- public IgniteFuture<Boolean> setxIfAbsentAsync(V val);
+ public InternalFuture<Boolean> setxIfAbsentAsync(V val);
/**
* This method has the same semantic as
@@ -331,7 +331,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* {@code null}, the associated value will be removed from cache.
* @return Transform operation future.
*/
- public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer);
+ public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer);
/**
* This method has the same semantic as
@@ -350,7 +350,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param val See {@link GridCacheProjection#replaceAsync(Object, Object)}
* @return See {@link GridCacheProjection#replaceAsync(Object, Object)}.
*/
- public IgniteFuture<V> replaceAsync(V val);
+ public InternalFuture<V> replaceAsync(V val);
/**
* This method has the same semantic as
@@ -369,7 +369,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param val See {@link GridCacheProjection#replacexAsync(Object, Object)}
* @return See {@link GridCacheProjection#replacexAsync(Object, Object)}.
*/
- public IgniteFuture<Boolean> replacexAsync(V val);
+ public InternalFuture<Boolean> replacexAsync(V val);
/**
* This method has the same semantic as
@@ -390,7 +390,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param newVal See {@link GridCacheProjection#replaceAsync(Object, Object, Object)}
* @return See {@link GridCacheProjection#replaceAsync(Object, Object)}.
*/
- public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal);
+ public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal);
/**
* This method has the same semantic as
@@ -409,7 +409,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param filter See {@link GridCacheProjection#removeAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}.
* @return See {@link GridCacheProjection#removeAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}.
*/
- public IgniteFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* This method has the same semantic as
@@ -428,7 +428,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param filter See {@link GridCacheProjection#removexAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}.
* @return See {@link GridCacheProjection#removexAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}.
*/
- public IgniteFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* This method has the same semantic as
@@ -447,7 +447,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* @param val See {@link GridCacheProjection#removeAsync(Object, Object)}.
* @return See {@link GridCacheProjection#removeAsync(Object, Object)}.
*/
- public IgniteFuture<Boolean> removeAsync(V val);
+ public InternalFuture<Boolean> removeAsync(V val);
/**
* This method has the same semantic as
@@ -519,7 +519,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
* {@code false} otherwise.
* @throws GridCacheFlagException If flags validation failed.
*/
- public IgniteFuture<Boolean> lockAsync(long timeout,
+ public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java
index 92d7c99..8ee0da1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java
@@ -392,7 +392,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @param key Key to reload.
* @return Future to be completed whenever the entry is reloaded.
*/
- public IgniteFuture<V> reloadAsync(K key);
+ public InternalFuture<V> reloadAsync(K key);
/**
* Reloads all currently cached keys form persistent storage.
@@ -413,7 +413,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
*
* @return Future which will complete whenever {@code reload} completes.
*/
- public IgniteFuture<?> reloadAllAsync();
+ public InternalFuture<?> reloadAllAsync();
/**
* Reloads specified entries from underlying persistent storage.
@@ -436,7 +436,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @param keys Keys to reload.
* @return Future which will complete whenever {@code reload} completes.
*/
- public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys);
+ public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys);
/**
* Peeks at in-memory cached value using default {@link GridCachePeekMode#SMART}
@@ -521,7 +521,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException if the key is {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<V> getAsync(K key);
+ public InternalFuture<V> getAsync(K key);
/**
* Retrieves values mapped to the specified keys from cache. Value will only be returned if
@@ -568,7 +568,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @return Future for the get operation.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys);
+ public InternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys);
/**
* Stores given key-value pair in cache. If filters are provided, then entries will
@@ -640,7 +640,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<V> putAsync(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<V> putAsync(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* Stores given key-value pair in cache. If filters are provided, then entries will
@@ -704,7 +704,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> putxAsync(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<Boolean> putxAsync(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* Stores result of applying {@code valTransform} closure to the previous value associated with
@@ -780,7 +780,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @return Future for the transform operation.
* @throws NullPointerException If either key or transform closure is {@code null}.
*/
- public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer);
+ public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer);
/**
* Stores given key-value pair in cache only if cache had no previous mapping for it. If cache
@@ -842,7 +842,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<V> putIfAbsentAsync(K key, V val);
+ public InternalFuture<V> putIfAbsentAsync(K key, V val);
/**
* Stores given key-value pair in cache only if cache had no previous mapping for it.
@@ -893,7 +893,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val);
+ public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val);
/**
* Stores given key-value pair in cache only if there is a previous mapping for it.
@@ -952,7 +952,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<V> replaceAsync(K key, V val);
+ public InternalFuture<V> replaceAsync(K key, V val);
/**
* Stores given key-value pair in cache only if only if there is a previous mapping for it.
@@ -1003,7 +1003,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> replacexAsync(K key, V val);
+ public InternalFuture<Boolean> replacexAsync(K key, V val);
/**
* Stores given key-value pair in cache only if only if the previous value is equal to the
@@ -1052,7 +1052,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal);
+ public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal);
/**
* Stores given key-value pairs in cache. If filters are provided, then entries will
@@ -1151,7 +1151,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @return Future for putAll operation.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
+ public InternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -1178,7 +1178,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @param m Map containing keys and closures to be applied to values.
* @return Future for operation.
*/
- public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m);
+ public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m);
/**
* Stores result of applying the specified transform closure to previous values associated
@@ -1207,7 +1207,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @return Future for operation.
* @throws IgniteCheckedException On any error occurred while storing value in cache.
*/
- public IgniteFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
+ public InternalFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
throws IgniteCheckedException;
/**
@@ -1636,7 +1636,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException if the key is {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* Removes given key mapping from cache.
@@ -1689,7 +1689,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException if the key is {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> removexAsync(K key,
+ public InternalFuture<Boolean> removexAsync(K key,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -1736,7 +1736,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* @throws NullPointerException if the key or value is {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<Boolean> removeAsync(K key, V val);
+ public InternalFuture<Boolean> removeAsync(K key, V val);
/**
* Removes given key mappings from cache for entries for which the optionally passed in filters do
@@ -1780,7 +1780,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* remove operation completes.
* @throws GridCacheFlagException If flags validation failed.
*/
- public IgniteFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
+ public InternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -1833,7 +1833,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* remove operation completes.
* @throws GridCacheFlagException If flags validation failed.
*/
- public IgniteFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
+ public InternalFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
* Synchronously acquires lock on a cached object with given
@@ -1884,7 +1884,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* {@code false} otherwise.
* @throws GridCacheFlagException If flags validation failed.
*/
- public IgniteFuture<Boolean> lockAsync(K key, long timeout,
+ public InternalFuture<Boolean> lockAsync(K key, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -1936,7 +1936,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V>
* timeout has expired, {@code false} otherwise.
* @throws GridCacheFlagException If flags validation failed.
*/
- public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
+ public InternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
index 6e8c5bd..79ce938 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
@@ -232,7 +232,7 @@ public interface GridCacheTx extends GridMetadataAware, AutoCloseable {
*
* @return Future for commit operation.
*/
- public IgniteFuture<GridCacheTx> commitAsync();
+ public InternalFuture<GridCacheTx> commitAsync();
/**
* Rolls back this transaction.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/affinity/consistenthash/GridCacheConsistentHashAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/affinity/consistenthash/GridCacheConsistentHashAffinityFunction.java b/modules/core/src/main/java/org/gridgain/grid/cache/affinity/consistenthash/GridCacheConsistentHashAffinityFunction.java
index e026e50..a03c4de 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/affinity/consistenthash/GridCacheConsistentHashAffinityFunction.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/affinity/consistenthash/GridCacheConsistentHashAffinityFunction.java
@@ -582,7 +582,7 @@ public class GridCacheConsistentHashAffinityFunction implements GridCacheAffinit
try {
U.await(initLatch);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// Recover interrupted state flag.
Thread.currentThread().interrupt();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java
index 80e1efa..0186b1a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java
@@ -77,11 +77,11 @@ public interface GridCacheCountDownLatch {
* <li>has its interrupted status set on entry to this method; or
* <li>is interrupted while waiting,
* </ul>
- * then {@link GridInterruptedException} is thrown and the current thread's
+ * then {@link InternalInterruptedException} is thrown and the current thread's
* interrupted status is cleared.
*
* @throws IgniteCheckedException If operation failed.
- * @throws GridInterruptedException if the current thread is interrupted
+ * @throws InternalInterruptedException if the current thread is interrupted
* while waiting
*/
public void await() throws IgniteCheckedException;
@@ -111,7 +111,7 @@ public interface GridCacheCountDownLatch {
* <li>has its interrupted status set on entry to this method; or
* <li>is interrupted while waiting,
* </ul>
- * then {@link GridInterruptedException} is thrown and the current thread's
+ * then {@link InternalInterruptedException} is thrown and the current thread's
* interrupted status is cleared.
* <p>
* If the specified waiting time elapses then the value {@code false}
@@ -121,7 +121,7 @@ public interface GridCacheCountDownLatch {
* @param timeout The maximum time to wait in milliseconds.
* @return {@code True} if the count reached zero and {@code false}
* if the waiting time elapsed before the count reached zero.
- * @throws GridInterruptedException If the current thread is interrupted
+ * @throws InternalInterruptedException If the current thread is interrupted
* while waiting.
* @throws IgniteCheckedException If operation failed.
*/
@@ -152,7 +152,7 @@ public interface GridCacheCountDownLatch {
* <li>has its interrupted status set on entry to this method; or
* <li>is interrupted while waiting,
* </ul>
- * then {@link GridInterruptedException} is thrown and the current thread's
+ * then {@link InternalInterruptedException} is thrown and the current thread's
* interrupted status is cleared.
* <p>
* If the specified waiting time elapses then the value {@code false}
@@ -164,7 +164,7 @@ public interface GridCacheCountDownLatch {
* @param unit The time unit of the {@code timeout} argument.
* @return {@code True} if the count reached zero and {@code false}
* if the waiting time elapsed before the count reached zero.
- * @throws GridInterruptedException If the current thread is interrupted
+ * @throws InternalInterruptedException If the current thread is interrupted
* while waiting.
* @throws IgniteCheckedException If operation failed.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueries.java b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueries.java
index 2e1180d..091a433 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueries.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueries.java
@@ -103,7 +103,7 @@ public interface GridCacheQueries<K, V> {
*
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildIndexes(Class<?> cls);
+ public InternalFuture<?> rebuildIndexes(Class<?> cls);
/**
* Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
@@ -116,7 +116,7 @@ public interface GridCacheQueries<K, V> {
*
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildIndexes(String typeName);
+ public InternalFuture<?> rebuildIndexes(String typeName);
/**
* Forces this cache to rebuild search indexes of all types. Sometimes indexes
@@ -127,7 +127,7 @@ public interface GridCacheQueries<K, V> {
*
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildAllIndexes();
+ public InternalFuture<?> rebuildAllIndexes();
/**
* Accumulated metrics for all queries executed for this cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java
index 9d3b045..8ba717c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java
@@ -19,7 +19,7 @@ import java.util.*;
* Cache query future returned by query execution.
* Refer to {@link GridCacheQuery} documentation for more information.
*/
-public interface GridCacheQueryFuture<T> extends IgniteFuture<Collection<T>> {
+public interface GridCacheQueryFuture<T> extends InternalFuture<Collection<T>> {
/**
* Returns number of elements that are already fetched and can
* be returned from {@link #next()} method without blocking.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoop.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoop.java b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoop.java
index 75e637b..91d0888 100644
--- a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoop.java
+++ b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoop.java
@@ -38,7 +38,7 @@ public interface GridHadoop {
* @param jobInfo Job info to submit.
* @return Execution future.
*/
- public IgniteFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo);
+ public InternalFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo);
/**
* Gets Hadoop job execution status.
@@ -65,7 +65,7 @@ public interface GridHadoop {
* @return Job finish future or {@code null} in case job with the given ID is not found.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException;
+ @Nullable public InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException;
/**
* Kills job.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTask.java b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTask.java
index f4d4e1c..7becdc4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTask.java
@@ -53,7 +53,7 @@ public abstract class GridHadoopTask {
* Runs task.
*
* @param taskCtx Context.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
* @throws IgniteCheckedException If failed.
*/
public abstract void run(GridHadoopTaskContext taskCtx) throws IgniteCheckedException;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/ComputeTaskFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/ComputeTaskFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/ComputeTaskFutureAdapter.java
new file mode 100644
index 0000000..200d600
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/ComputeTaskFutureAdapter.java
@@ -0,0 +1,29 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.gridgain.grid.kernal;
+
+import org.apache.ignite.compute.*;
+
+/**
+ *
+ */
+public class ComputeTaskFutureAdapter<R> extends IgniteFutureAdapter<R> implements ComputeTaskFuture<R> {
+ /**
+ * @param delegate Delegate.
+ */
+ public ComputeTaskFutureAdapter(InternalComputeTaskFuture<R> delegate) {
+ super(delegate);
+ }
+
+ /** {@inheritDoc} */
+ @Override public ComputeTaskSession getTaskSession() {
+ return ((InternalComputeTaskFuture<R>)delegate).getTaskSession();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/GridEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridEx.java
index d1f8ce4..c8feb0b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridEx.java
@@ -116,7 +116,7 @@ public interface GridEx extends Ignite, ClusterGroupEx, IgniteCluster {
/**
* Schedule sending of given email to all configured admin emails.
*/
- IgniteFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html);
+ InternalFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html);
/**
* Get GGFS instance returning null if it doesn't exist.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java
index 429ad54..e369e5b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java
@@ -130,7 +130,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal {
if (!ses.isFullSupport()) {
// Need to fetch task session from task worker.
- ComputeTaskFuture<Object> fut = ctx.task().taskFuture(ses.getId());
+ InternalComputeTaskFuture<Object> fut = ctx.task().taskFuture(ses.getId());
return fut.getTaskSession().getJobSiblings();
}
@@ -147,7 +147,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal {
assert !ses.isFullSupport();
// Need to fetch task session from task worker.
- ComputeTaskFuture<Object> fut = ctx.task().taskFuture(ses.getId());
+ InternalComputeTaskFuture<Object> fut = ctx.task().taskFuture(ses.getId());
return fut.getTaskSession().getJobSiblings();
}
@@ -269,7 +269,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> mapFuture() {
+ @Override public InternalFuture<?> mapFuture() {
return new GridFinishedFuture<>(ctx);
}
[06/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentMultiThreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentMultiThreadedSelfTest.java
index 012a833..ac35562 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentMultiThreadedSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -98,7 +97,7 @@ public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest
/**
* Test task.
*/
- private static class GridDeploymentTestTask extends ComputeTaskAdapter<Object, Object> {
+ private static class GridDeploymentTestTask extends ComputeTaskFutureAdapter<Object, Object> {
/** {@inheritDoc} */
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Object arg) throws IgniteCheckedException {
assert false;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentSelfTest.java
index 33858b1..e9764c0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridDeploymentSelfTest.java
@@ -17,7 +17,6 @@ import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.deployment.local.*;
import org.gridgain.testframework.junits.common.*;
@@ -152,7 +151,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridDeploymentTestTask.class, GridDeploymentTestTask.class.getClassLoader());
// Check auto-deploy.
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridDeploymentTestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridDeploymentTestTask.class.getName(), null);
fut.get();
@@ -348,7 +347,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest {
/**
* Test deployable task.
*/
- private static class GridDeploymentTestTask extends ComputeTaskAdapter<Object, Object> {
+ private static class GridDeploymentTestTask extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
@@ -382,7 +381,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest {
* Test deployable named task.
*/
@ComputeTaskName(value = "GridDeploymentTestTask")
- private static class GridDeploymentTestTask1 extends ComputeTaskAdapter<Object, Object> {
+ private static class GridDeploymentTestTask1 extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
@@ -414,7 +413,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest {
* Test deployable named task.
*/
@ComputeTaskName(value = "GridDeploymentTestTask")
- private static class GridDeploymentTestTask2 extends ComputeTaskAdapter<Object, Object> {
+ private static class GridDeploymentTestTask2 extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridEventStorageCheckAllEventsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridEventStorageCheckAllEventsSelfTest.java
index 0c0fa14..e806c45 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridEventStorageCheckAllEventsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridEventStorageCheckAllEventsSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -147,7 +146,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe
public void testFailTask() throws Exception {
long tstamp = startTimestamp();
- ComputeTaskFuture<?> fut = generateEvents(null, new GridAllEventsFailTestJob());
+ InternalComputeTaskFuture<?> fut = generateEvents(null, new GridAllEventsFailTestJob());
try {
fut.get();
@@ -175,7 +174,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe
public void testTimeoutTask() throws Exception {
long tstamp = startTimestamp();
- ComputeTaskFuture<?> fut = generateEvents(1000L, new GridAllEventsTimeoutTestJob());
+ InternalComputeTaskFuture<?> fut = generateEvents(1000L, new GridAllEventsTimeoutTestJob());
try {
fut.get();
@@ -281,7 +280,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe
* @return Task future.
* @throws Exception If failed.
*/
- private ComputeTaskFuture<?> generateEvents(@Nullable Long timeout, ComputeJob job) throws Exception {
+ private InternalComputeTaskFuture<?> generateEvents(@Nullable Long timeout, ComputeJob job) throws Exception {
IgniteCompute comp = ignite.compute().enableAsync();
if (timeout == null)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
index 4b5a5fa..a480072 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.*;
@@ -389,7 +388,7 @@ public class GridExplicitImplicitDeploymentSelfTest extends GridCommonAbstractTe
*/
@SuppressWarnings({"PublicInnerClass"})
@ComputeTaskName("GridDeploymentResourceTestTask")
- public static class GridDeploymentResourceTestTask extends ComputeTaskAdapter<String, Integer> {
+ public static class GridDeploymentResourceTestTask extends ComputeTaskFutureAdapter<String, Integer> {
/** */
@IgniteLocalNodeIdResource
private UUID locId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
index c695b84..78722f8 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.failover.*;
import org.apache.ignite.spi.failover.always.*;
import org.gridgain.testframework.junits.common.*;
@@ -74,7 +73,7 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest {
ignite1.compute().localDeployTask(JobTask.class, JobTask.class.getClassLoader());
try {
- ComputeTaskFuture<String> fut;
+ InternalComputeTaskFuture<String> fut;
synchronized(mux){
IgniteCompute comp = ignite1.compute().enableAsync();
@@ -110,7 +109,7 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest {
/** */
@SuppressWarnings("PublicInnerClass")
- public static class JobTask extends ComputeTaskAdapter<String, String> {
+ public static class JobTask extends ComputeTaskFutureAdapter<String, String> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCheckpointCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCheckpointCleanupSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCheckpointCleanupSelfTest.java
index ac2c46f..0bd3172 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCheckpointCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCheckpointCleanupSelfTest.java
@@ -6,7 +6,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.checkpoint.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -116,7 +115,7 @@ public class GridJobCheckpointCleanupSelfTest extends GridCommonAbstractTest {
*
*/
@ComputeTaskSessionFullSupport
- private static class CheckpointCountingTestTask extends ComputeTaskAdapter<ClusterNode, Object> {
+ private static class CheckpointCountingTestTask extends ComputeTaskFutureAdapter<ClusterNode, Object> {
/** {@inheritDoc} */
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable ClusterNode arg)
throws IgniteCheckedException {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCollisionCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCollisionCancelSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCollisionCancelSelfTest.java
index 5f646cd..08d3998 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCollisionCancelSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobCollisionCancelSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -59,7 +58,7 @@ public class GridJobCollisionCancelSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridCancelTestTask.class, GridCancelTestTask.class.getClassLoader());
- ComputeTaskFuture<?> res0 =
+ InternalComputeTaskFuture<?> res0 =
executeAsync(ignite.compute().withTimeout(maxJobExecTime * 2), GridCancelTestTask.class.getName(), null);
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
index 6aae0f6..083ce73 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
@@ -138,7 +138,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
try {
U.sleep(500);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
// No-op.
}
@@ -247,8 +247,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testApply1() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
IgniteCompute comp = compute(grid).enableAsync();
comp.apply(new TestClosure(), "arg");
@@ -262,8 +262,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testApply2() throws Exception {
- testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
IgniteCompute comp = compute(grid).enableAsync();
comp.apply(new TestClosure(), Arrays.asList("arg1", "arg2"));
@@ -277,8 +277,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testApply3() throws Exception {
- testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup grid) throws IgniteCheckedException {
IgniteCompute comp = compute(grid).enableAsync();
comp.apply(new TestClosure(),
@@ -302,8 +302,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testRun1() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.run(new TestRunnable());
@@ -317,8 +317,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testRun2() throws Exception {
- testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.run(Arrays.asList(new TestRunnable(), new TestRunnable()));
@@ -332,8 +332,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testCall1() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.call(new TestCallable());
@@ -347,8 +347,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testCall2() throws Exception {
- testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.call(Arrays.asList(new TestCallable(), new TestCallable()));
@@ -362,8 +362,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testCall3() throws Exception {
- testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.call(
@@ -387,8 +387,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testBroadcast1() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.broadcast(new TestRunnable());
@@ -402,8 +402,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testBroadcast2() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.broadcast(new TestCallable());
@@ -417,8 +417,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testBroadcast3() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
comp.broadcast(new TestClosure(), "arg");
@@ -432,8 +432,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAffinityRun() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
GridCacheAffinity<Object> aff = prj.ignite().cache(null).affinity();
@@ -451,8 +451,8 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAffinityCall() throws Exception {
- testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() {
- @Override public IgniteFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
+ testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, InternalFuture<?>>() {
+ @Override public InternalFuture<?> applyx(ClusterGroup prj) throws IgniteCheckedException {
IgniteCompute comp = compute(prj).enableAsync();
GridCacheAffinity<Object> aff = prj.ignite().cache(null).affinity();
@@ -494,7 +494,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
* @param taskStarter Task started.
* @throws Exception If failed.
*/
- private void testMasterLeaveAwareCallback(int expJobs, IgniteClosure<ClusterGroup, IgniteFuture<?>> taskStarter)
+ private void testMasterLeaveAwareCallback(int expJobs, IgniteClosure<ClusterGroup, InternalFuture<?>> taskStarter)
throws Exception {
jobLatch = new CountDownLatch(expJobs);
invokeLatch = new CountDownLatch(expJobs);
@@ -504,7 +504,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
int lastGridIdx = GRID_CNT - 1;
- IgniteFuture<?> fut = taskStarter.apply(grid(lastGridIdx).forPredicate(excludeLastPredicate()));
+ InternalFuture<?> fut = taskStarter.apply(grid(lastGridIdx).forPredicate(excludeLastPredicate()));
jobLatch.await();
@@ -755,7 +755,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
try {
U.await(waitLatch);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
// No-op.
}
}
@@ -790,9 +790,9 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
/**
* Await for job execution response to come.
*
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- private void awaitResponse() throws GridInterruptedException{
+ private void awaitResponse() throws InternalInterruptedException {
U.await(respLatch);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
index 60b3458..a063700 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
@@ -16,7 +16,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.jobstealing.*;
import org.apache.ignite.spi.failover.jobstealing.*;
import org.gridgain.grid.util.typedef.*;
@@ -291,7 +290,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest {
/**
* Job stealing task, that spreads jobs equally over the grid.
*/
- private static class JobStealingSpreadTask extends ComputeTaskAdapter<Object, Object> {
+ private static class JobStealingSpreadTask extends ComputeTaskFutureAdapter<Object, Object> {
/** Grid. */
@IgniteInstanceResource
private Ignite ignite;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingZeroActiveJobsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingZeroActiveJobsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingZeroActiveJobsSelfTest.java
index 8641fc9..742b1d3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingZeroActiveJobsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingZeroActiveJobsSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.jobstealing.*;
import org.apache.ignite.spi.failover.jobstealing.*;
import org.gridgain.testframework.junits.common.*;
@@ -85,7 +84,7 @@ public class GridJobStealingZeroActiveJobsSelfTest extends GridCommonAbstractTes
/** */
@SuppressWarnings({"PublicInnerClass"})
- public static class JobStealingTask extends ComputeTaskAdapter<Object, Object> {
+ public static class JobStealingTask extends ComputeTaskFutureAdapter<Object, Object> {
/** Grid. */
@IgniteInstanceResource
private Ignite ignite;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobSubjectIdSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobSubjectIdSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobSubjectIdSelfTest.java
index 7d3bc4e..f2f25d1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobSubjectIdSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobSubjectIdSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -83,7 +82,7 @@ public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest {
* Task class.
*/
@SuppressWarnings("PublicInnerClass")
- public static class Task extends ComputeTaskAdapter<Object, Object> {
+ public static class Task extends ComputeTaskFutureAdapter<Object, Object> {
/** Target node ID. */
private UUID targetNodeId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleJobsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleJobsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleJobsSelfTest.java
index 186c9e5..78e9495 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleJobsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleJobsSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal;
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.affinity.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -145,13 +144,13 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest {
comp.call(job);
- IgniteFuture<Boolean> fut = comp.future();
+ InternalFuture<Boolean> fut = comp.future();
if (cnt % LOG_MOD == 0)
X.println("Submitted jobs: " + cnt);
- fut.listenAsync(new CIX1<IgniteFuture<Boolean>>() {
- @Override public void applyx(IgniteFuture<Boolean> f) throws IgniteCheckedException {
+ fut.listenAsync(new CIX1<InternalFuture<Boolean>>() {
+ @Override public void applyx(InternalFuture<Boolean> f) throws IgniteCheckedException {
try {
assert f.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
index c7fde8e..427df32 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.checkpoint.sharedfs.*;
import org.apache.ignite.spi.failover.*;
import org.apache.ignite.spi.failover.always.*;
@@ -220,7 +219,7 @@ public class GridMultipleSpisSelfTest extends GridCommonAbstractTest {
@SuppressWarnings({"PublicInnerClass"})
@ComputeTaskSpis(loadBalancingSpi = "load2", failoverSpi = "fail2", checkpointSpi = "cp2")
@ComputeTaskSessionFullSupport
- public static final class GridTestMultipleSpisTask extends ComputeTaskAdapter<UUID, Integer> {
+ public static final class GridTestMultipleSpisTask extends ComputeTaskFutureAdapter<UUID, Integer> {
/** */
@IgniteTaskSessionResource
private ComputeTaskSession taskSes;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
index 3753614..bfa0644 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
@@ -16,7 +16,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -104,7 +103,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
ignite.compute().localDeployTask(taskCls1, ldr1);
// Task will wait for the signal.
- ComputeTaskFuture fut = executeAsync(ignite.compute(), "GridDeploymentTestTask", null);
+ InternalComputeTaskFuture fut = executeAsync(ignite.compute(), "GridDeploymentTestTask", null);
// We should wait here when to be sure that job has been started.
// Since we loader task/job classes with different class loaders we cannot
@@ -177,7 +176,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
g1.compute().localDeployTask(taskCls1, ldr1);
// Task will wait for the signal.
- ComputeTaskFuture fut1 = executeAsync(g1.compute(), "GridDeploymentTestTask", null);
+ InternalComputeTaskFuture fut1 = executeAsync(g1.compute(), "GridDeploymentTestTask", null);
assert checkDeployed(g1, "GridDeploymentTestTask");
@@ -191,7 +190,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
g1.compute().localDeployTask(taskCls2, ldr2);
// Task will wait for the signal.
- ComputeTaskFuture fut2 = executeAsync(g1.compute(), "GridDeploymentTestTask", null);
+ InternalComputeTaskFuture fut2 = executeAsync(g1.compute(), "GridDeploymentTestTask", null);
boolean deployed = checkDeployed(g1, "GridDeploymentTestTask");
@@ -225,7 +224,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
*/
@SuppressWarnings({"PublicInnerClass"})
@ComputeTaskName(value="GridDeploymentTestTask")
- public static class GridDeploymentTestTask extends ComputeTaskAdapter<Object, Object> {
+ public static class GridDeploymentTestTask extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@IgniteLocalNodeIdResource
private UUID locNodeId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultithreadedJobStealingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultithreadedJobStealingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultithreadedJobStealingSelfTest.java
index 6335dda..19bef0d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultithreadedJobStealingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultithreadedJobStealingSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.jobstealing.*;
import org.apache.ignite.spi.failover.jobstealing.*;
import org.gridgain.grid.util.typedef.*;
@@ -140,7 +139,7 @@ public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest
/**
* Job stealing task.
*/
- private static class JobStealingTask extends ComputeTaskAdapter<Object, JobStealingResult> {
+ private static class JobStealingTask extends ComputeTaskFutureAdapter<Object, JobStealingResult> {
/** Grid. */
@IgniteInstanceResource
private Ignite ignite;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionAbstractTest.java
index d375fd8..560b609 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionAbstractTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -320,7 +319,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.broadcast(runJob);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -342,7 +341,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.run(jobs);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -362,7 +361,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.broadcast(calJob);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -384,7 +383,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.call(jobs);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -404,7 +403,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.apply(clrJob, (String) null);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -426,7 +425,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.apply(clrJob, args);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -446,7 +445,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.broadcast(new TestClosure(), "arg");
- IgniteFuture<Collection<String>> fut = comp.future();
+ InternalFuture<Collection<String>> fut = comp.future();
waitForExecution(fut);
@@ -473,7 +472,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.apply(clrJob, args, rdc);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -495,7 +494,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
comp.call(jobs, rdc);
- IgniteFuture fut = comp.future();
+ InternalFuture fut = comp.future();
waitForExecution(fut);
@@ -595,7 +594,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
* @throws InterruptedException Thrown if wait was interrupted.
*/
@SuppressWarnings({"UnconditionalWait"})
- private void waitForExecution(IgniteFuture fut) throws InterruptedException {
+ private void waitForExecution(InternalFuture fut) throws InterruptedException {
long sleep = 250;
long threshold = System.currentTimeMillis() + WAIT_TIMEOUT;
@@ -642,16 +641,16 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
cnt.set(0);
- Collection<ComputeTaskFuture<Object>> futsList = new ArrayList<>();
+ Collection<InternalComputeTaskFuture<Object>> futsList = new ArrayList<>();
for (int i = 0; i < 10; i++) {
comp.call(new TestWaitCallable<Object>());
- ComputeTaskFuture<Object> fut = comp.future();
+ InternalComputeTaskFuture<Object> fut = comp.future();
assertFalse(fut.isDone());
- Map<IgniteUuid, ComputeTaskFuture<Object>> futs = comp.activeTaskFutures();
+ Map<IgniteUuid, InternalComputeTaskFuture<Object>> futs = comp.activeTaskFutures();
assertEquals(i + 1, futs.size());
@@ -666,7 +665,7 @@ public abstract class GridProjectionAbstractTest extends GridCommonAbstractTest
mux.notifyAll();
}
- for (ComputeTaskFuture<Object> fut : futsList)
+ for (InternalComputeTaskFuture<Object> fut : futsList)
fut.get();
assertEquals(0, comp.activeTaskFutures().size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridReduceSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridReduceSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridReduceSelfTest.java
index 3f24b06..f46a858 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridReduceSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridReduceSelfTest.java
@@ -100,7 +100,7 @@ public class GridReduceSelfTest extends GridCommonAbstractTest {
}
});
- IgniteFuture<Long> fut = comp.future();
+ InternalFuture<Long> fut = comp.future();
assertEquals((Long)1L, fut.get());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
index 967ffd3..f4522ae 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -68,7 +67,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut =
+ InternalComputeTaskFuture<?> fut =
executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.EXECUTE);
try {
@@ -98,7 +97,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut =
+ InternalComputeTaskFuture<?> fut =
executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.MAP);
try {
@@ -128,7 +127,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut =
+ InternalComputeTaskFuture<?> fut =
executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.RESULT);
try {
@@ -158,7 +157,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut =
+ InternalComputeTaskFuture<?> fut =
executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.RESULT);
try {
@@ -202,7 +201,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
}
/** */
- private static class GridTaskFailedTestTask extends ComputeTaskAdapter<Serializable, Serializable> {
+ private static class GridTaskFailedTestTask extends ComputeTaskFutureAdapter<Serializable, Serializable> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
index 89f6ee2..31bd77e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -70,7 +69,7 @@ public class GridStopWithCancelSelfTest extends GridCommonAbstractTest {
* Test task that will be canceled.
*/
@SuppressWarnings({"PublicInnerClass"})
- public static final class CancelledTask extends ComputeTaskAdapter<String, Object> {
+ public static final class CancelledTask extends ComputeTaskFutureAdapter<String, Object> {
/** */
@IgniteLocalNodeIdResource
private UUID locId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
index c7b0f2a..a773373 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.failover.always.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -57,7 +56,7 @@ public class GridStopWithWaitSelfTest extends GridCommonAbstractTest {
public void testWait() throws Exception {
jobStarted = new CountDownLatch(1);
- ComputeTaskFuture<Object> fut = null;
+ InternalComputeTaskFuture<Object> fut = null;
try {
Ignite ignite1 = startGrid(1);
@@ -91,7 +90,7 @@ public class GridStopWithWaitSelfTest extends GridCommonAbstractTest {
public void testWaitFailover() throws Exception {
jobStarted = new CountDownLatch(1);
- ComputeTaskFuture<Object> fut = null;
+ InternalComputeTaskFuture<Object> fut = null;
Ignite ignite1 = startGrid(1);
Ignite ignite2 = startGrid(2);
@@ -123,7 +122,7 @@ public class GridStopWithWaitSelfTest extends GridCommonAbstractTest {
*
*/
@ComputeTaskSessionFullSupport
- private static class GridWaitTask extends ComputeTaskAdapter<UUID, Integer> {
+ private static class GridWaitTask extends ComputeTaskFutureAdapter<UUID, Integer> {
/** {@inheritDoc} */
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, UUID arg) throws IgniteCheckedException {
ClusterNode mappedNode = null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskCancelSingleNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskCancelSingleNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskCancelSingleNodeSelfTest.java
index 604dd62..afaf942 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskCancelSingleNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskCancelSingleNodeSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.junits.common.*;
@@ -97,7 +96,7 @@ public class GridTaskCancelSingleNodeSelfTest extends GridCommonAbstractTest {
comp.execute(TestTask.class, null);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
if (timeoutBeforeCancel > 0L)
Thread.sleep(timeoutBeforeCancel);
@@ -131,7 +130,7 @@ public class GridTaskCancelSingleNodeSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskContinuousMapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskContinuousMapperSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskContinuousMapperSelfTest.java
index 526e74d..6a13bc4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskContinuousMapperSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskContinuousMapperSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import java.io.*;
@@ -70,7 +69,7 @@ public class GridTaskContinuousMapperSelfTest extends GridCommonAbstractTest {
/** */
@SuppressWarnings({"PublicInnerClass"})
- public static class TestAllMethodsTask extends ComputeTaskAdapter<Object, Object> {
+ public static class TestAllMethodsTask extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@SuppressWarnings({"UnusedDeclaration"})
@IgniteTaskContinuousMapperResource
@@ -116,7 +115,7 @@ public class GridTaskContinuousMapperSelfTest extends GridCommonAbstractTest {
/** */
@SuppressWarnings({"PublicInnerClass"})
- public static class TestLifeCycleTask extends ComputeTaskAdapter<Object, Object> {
+ public static class TestLifeCycleTask extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@IgniteLoggerResource
private IgniteLogger log;
@@ -205,7 +204,7 @@ public class GridTaskContinuousMapperSelfTest extends GridCommonAbstractTest {
/** */
@SuppressWarnings({"PublicInnerClass"})
- public static class TestNegativeTask extends ComputeTaskAdapter<Object, Object> {
+ public static class TestNegativeTask extends ComputeTaskFutureAdapter<Object, Object> {
/** */
@SuppressWarnings({"UnusedDeclaration"})
@IgniteTaskContinuousMapperResource
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionSelfTest.java
index 6065786..12155d3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionSelfTest.java
@@ -52,7 +52,7 @@ public class GridTaskExecutionSelfTest extends GridCommonAbstractTest {
assertNull(comp.execute(GridTestTask.class, "testArg"));
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFailoverSelfTest.java
index 247c249..70f1dc6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFailoverSelfTest.java
@@ -12,7 +12,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import java.io.*;
@@ -41,7 +40,7 @@ public class GridTaskFailoverSelfTest extends GridCommonAbstractTest {
try {
ignite.compute().localDeployTask(GridFailoverTestTask.class, GridFailoverTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut = ignite.compute().execute(GridFailoverTestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = ignite.compute().execute(GridFailoverTestTask.class.getName(), null);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFutureImplStopGridSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFutureImplStopGridSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFutureImplStopGridSelfTest.java
index 955d696..cce13b6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFutureImplStopGridSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskFutureImplStopGridSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -58,11 +57,11 @@ public class GridTaskFutureImplStopGridSelfTest extends GridCommonAbstractTest {
Thread futThread = null;
try {
- final ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridStopTestTask.class.getName(), null);
+ final InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridStopTestTask.class.getName(), null);
- fut.listenAsync(new CI1<IgniteFuture>() {
+ fut.listenAsync(new CI1<InternalFuture>() {
@SuppressWarnings({"NakedNotify"})
- @Override public void apply(IgniteFuture gridFut) {
+ @Override public void apply(InternalFuture gridFut) {
synchronized (mux) {
mux.notifyAll();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstanceExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstanceExecutionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstanceExecutionSelfTest.java
index cd63264..05e1db1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstanceExecutionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstanceExecutionSelfTest.java
@@ -49,7 +49,7 @@ public class GridTaskInstanceExecutionSelfTest extends GridCommonAbstractTest {
assertNull(comp.execute(task, "testArg"));
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
index 2ce5c70..f6dd0a3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
@@ -53,7 +53,7 @@ public class GridTaskInstantiationSelfTest extends GridCommonAbstractTest {
/**
* Test task defined as private inner class.
*/
- private static class PrivateClassTask extends ComputeTaskAdapter<String, Object> {
+ private static class PrivateClassTask extends ComputeTaskFutureAdapter<String, Object> {
/** */
@IgniteLocalNodeIdResource
private UUID locId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskJobRejectSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskJobRejectSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskJobRejectSelfTest.java
index 5e3edcf..1ddf4dc 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskJobRejectSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskJobRejectSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.fifoqueue.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -111,7 +110,7 @@ public class GridTaskJobRejectSelfTest extends GridCommonAbstractTest {
IgniteCompute comp = grid(1).compute().enableAsync();
- comp.execute(new ComputeTaskAdapter<Void, Void>() {
+ comp.execute(new ComputeTaskFutureAdapter<Void, Void>() {
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
@Nullable Void arg) {
return F.asMap(new SleepJob(), node, new SleepJob(), node);
@@ -123,7 +122,7 @@ public class GridTaskJobRejectSelfTest extends GridCommonAbstractTest {
}
}, null);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
assert startedLatch.await(2, SECONDS);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskListenerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskListenerSelfTest.java
index 680cfd5..e93fd62 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskListenerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskListenerSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -40,8 +39,8 @@ public class GridTaskListenerSelfTest extends GridCommonAbstractTest {
public void testGridTaskListener() throws Exception {
final AtomicInteger cnt = new AtomicInteger(0);
- IgniteInClosure<IgniteFuture<?>> lsnr = new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut) {
+ IgniteInClosure<InternalFuture<?>> lsnr = new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut) {
assert fut != null;
cnt.incrementAndGet();
@@ -54,7 +53,7 @@ public class GridTaskListenerSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(TestTask.class, TestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), TestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), TestTask.class.getName(), null);
fut.listenAsync(lsnr);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskTimeoutSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskTimeoutSelfTest.java
index 67c4d32..9cde576 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskTimeoutSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -69,7 +68,7 @@ public class GridTaskTimeoutSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskTimeoutTestTask.class, GridTaskTimeoutTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute().withTimeout(TIMEOUT),
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute().withTimeout(TIMEOUT),
GridTaskTimeoutTestTask.class.getName(), null);
try {
@@ -94,7 +93,7 @@ public class GridTaskTimeoutSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridTaskTimeoutTestTask.class, GridTaskTimeoutTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute().withTimeout(TIMEOUT),
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute().withTimeout(TIMEOUT),
GridTaskTimeoutTestTask.class.getName(), null);
// Allow timed out events to be executed.
@@ -135,7 +134,7 @@ public class GridTaskTimeoutSelfTest extends GridCommonAbstractTest {
@Override public void run() {
while (!finish.get()) {
try {
- ComputeTaskFuture<?> fut = executeAsync(
+ InternalComputeTaskFuture<?> fut = executeAsync(
ignite.compute().withTimeout(TIMEOUT), GridTaskTimeoutTestTask.class.getName(), null);
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointManagerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointManagerAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointManagerAbstractSelfTest.java
index ace207c..d8558e3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointManagerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointManagerAbstractSelfTest.java
@@ -243,7 +243,7 @@ public abstract class GridCheckpointManagerAbstractSelfTest extends GridCommonAb
Ignite ignite = startGrid(gridName);
- IgniteFuture fut = executeAsync(ignite.compute(), new GridMultiNodeGlobalConsumerTask(), null);
+ InternalFuture fut = executeAsync(ignite.compute(), new GridMultiNodeGlobalConsumerTask(), null);
executeAsync(ignite.compute(), GridMultiNodeTestCheckPointTask.class, null).get(2 * 60 * 1000);
@@ -740,9 +740,9 @@ public abstract class GridCheckpointManagerAbstractSelfTest extends GridCommonAb
* Wrapper around {@link GridTestUtils#retryAssert(org.apache.ignite.IgniteLogger, int, long, GridAbsClosure)}.
* For the given closure provides count of retries, configured by {@link #retries} attribute.
* @param assertion Closure with assertion inside.
- * @throws GridInterruptedException If was interrupted.
+ * @throws InternalInterruptedException If was interrupted.
*/
- private static void assertWithRetries(GridAbsClosureX assertion) throws GridInterruptedException {
+ private static void assertWithRetries(GridAbsClosureX assertion) throws InternalInterruptedException {
GridTestUtils.retryAssert(null, retries, 5000, assertion);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentMessageCountSelfTest.java
index e16e19b..17b4609 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentMessageCountSelfTest.java
@@ -83,7 +83,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest {
try {
startGrids(2);
- ComputeTaskFuture<Object> taskFut = executeAsync(grid(0).compute(), taskCls, 2);
+ InternalComputeTaskFuture<Object> taskFut = executeAsync(grid(0).compute(), taskCls, 2);
Integer res = (Integer)taskFut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/managers/events/GridEventStorageManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/events/GridEventStorageManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/events/GridEventStorageManagerSelfTest.java
index 0614969..369fc1c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/events/GridEventStorageManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/events/GridEventStorageManagerSelfTest.java
@@ -53,7 +53,7 @@ public class GridEventStorageManagerSelfTest extends GridCommonAbstractTest {
final int usrType = Integer.MAX_VALUE - 1;
- IgniteFuture<IgniteEvent> fut = waitForLocalEvent(ignite.events(), new IgnitePredicate<IgniteEvent>() {
+ InternalFuture<IgniteEvent> fut = waitForLocalEvent(ignite.events(), new IgnitePredicate<IgniteEvent>() {
@Override public boolean apply(IgniteEvent e) {
return e.type() == usrType;
}
@@ -64,7 +64,7 @@ public class GridEventStorageManagerSelfTest extends GridCommonAbstractTest {
fail("GridFutureTimeoutException must have been thrown.");
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Caught expected exception: " + e);
}
@@ -91,7 +91,7 @@ public class GridEventStorageManagerSelfTest extends GridCommonAbstractTest {
fail("GridFutureTimeoutException must have been thrown.");
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Caught expected exception: " + e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java
index aa0b031..1aa6b54 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -247,7 +246,7 @@ public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstrac
final int half = ENTRY_CNT / 2;
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
info("Run topology change.");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
index 340c24f..decc0ff 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
@@ -57,7 +57,7 @@ public abstract class GridCacheAbstractFlagsTest extends GridCacheAbstractSelfTe
final AtomicInteger cntr = new AtomicInteger();
- IgniteFuture<?> f = multithreadedAsync(new Callable() {
+ InternalFuture<?> f = multithreadedAsync(new Callable() {
@Override public Object call() throws Exception {
int idx = cntr.getAndIncrement() % gridCount();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
index b24b3b2..ef02f15 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -64,7 +64,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
private void runTest(final IgniteInClosure<GridCache<String, Integer>> c) throws Exception {
- final IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ final InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (true) {
int i = cnt.getAndIncrement();
@@ -82,7 +82,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
}
}, WRITE_THREAD_CNT, WRITE_THREAD_NAME);
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
GridCache<String, Integer> cache = cache();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 7ac3801..fdba86c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
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.apache.ignite.spi.swapspace.inmemory.*;
import org.gridgain.grid.util.lang.*;
@@ -401,9 +400,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache().put("key1", 1);
cache().put("key2", 2);
- IgniteFuture<Integer> fut1 = cache().getAsync("key1");
- IgniteFuture<Integer> fut2 = cache().getAsync("key2");
- IgniteFuture<Integer> fut3 = cache().getAsync("wrongKey");
+ InternalFuture<Integer> fut1 = cache().getAsync("key1");
+ InternalFuture<Integer> fut2 = cache().getAsync("key2");
+ InternalFuture<Integer> fut3 = cache().getAsync("wrongKey");
assert fut1.get() == 1;
assert fut2.get() == 2;
@@ -417,8 +416,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache().put("key1", 1);
cache().put("key2", 100);
- IgniteFuture<Integer> fut1 = cache().projection(gte100).getAsync("key1");
- IgniteFuture<Integer> fut2 = cache().projection(gte100).getAsync("key2");
+ InternalFuture<Integer> fut1 = cache().projection(gte100).getAsync("key1");
+ InternalFuture<Integer> fut2 = cache().projection(gte100).getAsync("key2");
assert fut1.get() == null;
assert fut2.get() == 100;
@@ -623,9 +622,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache().put("key1", 1);
cache().put("key2", 2);
- IgniteFuture<Map<String, Integer>> fut1 = cache().getAllAsync(null);
- IgniteFuture<Map<String, Integer>> fut2 = cache().getAllAsync(Collections.<String>emptyList());
- IgniteFuture<Map<String, Integer>> fut3 = cache().getAllAsync(F.asList("key1", "key2"));
+ InternalFuture<Map<String, Integer>> fut1 = cache().getAllAsync(null);
+ InternalFuture<Map<String, Integer>> fut2 = cache().getAllAsync(Collections.<String>emptyList());
+ InternalFuture<Map<String, Integer>> fut3 = cache().getAllAsync(F.asList("key1", "key2"));
assert fut1.get().isEmpty();
assert fut2.get().isEmpty();
@@ -645,8 +644,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
List<String> keys = F.asList("key1", "key2", "key3", "key4");
- IgniteFuture<Map<String, Integer>> fut1 = cache().projection(gte100).getAllAsync(keys);
- IgniteFuture<Map<String, Integer>> fut2 = cache().projection(gte200).getAllAsync(keys);
+ InternalFuture<Map<String, Integer>> fut1 = cache().projection(gte100).getAllAsync(keys);
+ InternalFuture<Map<String, Integer>> fut2 = cache().projection(gte200).getAllAsync(keys);
assert fut1.get().size() == 4 : "Invalid map: " + fut1.get();
assert fut1.get().get("key1") == 100;
@@ -1153,8 +1152,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache().put("key1", 1);
cache().put("key2", 2);
- IgniteFuture<Integer> fut1 = cache().putAsync("key1", 10);
- IgniteFuture<Integer> fut2 = cache().putAsync("key2", 11);
+ InternalFuture<Integer> fut1 = cache().putAsync("key1", 10);
+ InternalFuture<Integer> fut2 = cache().putAsync("key2", 11);
assertEquals((Integer)1, fut1.get(5000));
assertEquals((Integer)2, fut2.get(5000));
@@ -1167,8 +1166,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception In case of error.
*/
public void testPutAsync0() throws Exception {
- IgniteFuture<Integer> fut1 = cache().putAsync("key1", 0);
- IgniteFuture<Integer> fut2 = cache().putAsync("key2", 1);
+ InternalFuture<Integer> fut1 = cache().putAsync("key1", 0);
+ InternalFuture<Integer> fut2 = cache().putAsync("key2", 1);
assert fut1.get(5000) == null;
assert fut2.get(5000) == null;
@@ -1201,9 +1200,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache.put("key2", 1);
cache.put("key3", 3);
- IgniteFuture<?> fut0 = cache.transformAsync("key1", INCR_CLOS);
- IgniteFuture<?> fut1 = cache.transformAsync("key2", INCR_CLOS);
- IgniteFuture<?> fut2 = cache.transformAsync("key3", RMV_CLOS);
+ InternalFuture<?> fut0 = cache.transformAsync("key1", INCR_CLOS);
+ InternalFuture<?> fut1 = cache.transformAsync("key2", INCR_CLOS);
+ InternalFuture<?> fut2 = cache.transformAsync("key3", RMV_CLOS);
fut0.get();
fut1.get();
@@ -1551,10 +1550,10 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
cache().put("key2", 1);
- IgniteFuture<Boolean> fut1 = cache().putxAsync("key1", 10);
- IgniteFuture<Boolean> fut2 = cache().putxAsync("key2", 11);
+ InternalFuture<Boolean> fut1 = cache().putxAsync("key1", 10);
+ InternalFuture<Boolean> fut2 = cache().putxAsync("key2", 11);
- IgniteFuture<GridCacheTx> f = tx == null ? null : tx.commitAsync();
+ InternalFuture<GridCacheTx> f = tx == null ? null : tx.commitAsync();
assert fut1.get();
assert fut2.get();
@@ -1571,12 +1570,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception In case of error.
*/
public void testPutxAsyncFiltered() throws Exception {
- IgniteFuture<Boolean> f1 = cache().putxAsync("key1", 1);
- IgniteFuture<Boolean> f2 = cache().putxAsync("key1", 101, F.<String, Integer>cacheHasPeekValue());
- IgniteFuture<Boolean> f3 = cache().putxAsync("key2", 2);
- IgniteFuture<Boolean> f4 = cache().putxAsync("key2", 202, F.<String, Integer>cacheHasPeekValue());
- IgniteFuture<Boolean> f5 = cache().putxAsync("key1", 1, F.<String, Integer>cacheNoPeekValue());
- IgniteFuture<Boolean> f6 = cache().putxAsync("key2", 2, F.<String, Integer>cacheNoPeekValue());
+ InternalFuture<Boolean> f1 = cache().putxAsync("key1", 1);
+ InternalFuture<Boolean> f2 = cache().putxAsync("key1", 101, F.<String, Integer>cacheHasPeekValue());
+ InternalFuture<Boolean> f3 = cache().putxAsync("key2", 2);
+ InternalFuture<Boolean> f4 = cache().putxAsync("key2", 202, F.<String, Integer>cacheHasPeekValue());
+ InternalFuture<Boolean> f5 = cache().putxAsync("key1", 1, F.<String, Integer>cacheNoPeekValue());
+ InternalFuture<Boolean> f6 = cache().putxAsync("key2", 2, F.<String, Integer>cacheNoPeekValue());
assert f1.get() : "Invalid future1: " + f1;
assert f2.get() : "Invalid future2: " + f2;
@@ -1689,12 +1688,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
public void testPutAllAsync() throws Exception {
Map<String, Integer> map = F.asMap("key1", 1, "key2", 2);
- IgniteFuture<?> f1 = cache().putAllAsync(map);
+ InternalFuture<?> f1 = cache().putAllAsync(map);
map.put("key1", 10);
map.put("key2", 20);
- IgniteFuture<?> f2 = cache().putAllAsync(map);
+ InternalFuture<?> f2 = cache().putAllAsync(map);
f2.get();
f1.get();
@@ -1711,11 +1710,11 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
public void testPutAllAsyncFiltered() throws Exception {
Map<String, Integer> map1 = F.asMap("key1", 1, "key2", 2);
- IgniteFuture<?> f1 = cache().putAllAsync(map1, F.<String, Integer>cacheNoPeekValue());
+ InternalFuture<?> f1 = cache().putAllAsync(map1, F.<String, Integer>cacheNoPeekValue());
Map<String, Integer> map2 = F.asMap("key1", 10, "key2", 20, "key3", 3);
- IgniteFuture<?> f2 = cache().putAllAsync(map2, F.<String, Integer>cacheNoPeekValue());
+ InternalFuture<?> f2 = cache().putAllAsync(map2, F.<String, Integer>cacheNoPeekValue());
f2.get();
f1.get();
@@ -1809,12 +1808,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
GridCacheTx tx = txEnabled() ? cache().txStart() : null;
try {
- IgniteFuture<Integer> fut1 = cache().putIfAbsentAsync("key", 1);
+ InternalFuture<Integer> fut1 = cache().putIfAbsentAsync("key", 1);
assert fut1.get() == null;
assert cache().get("key") != null && cache().get("key") == 1;
- IgniteFuture<Integer> fut2 = cache().putIfAbsentAsync("key", 2);
+ InternalFuture<Integer> fut2 = cache().putIfAbsentAsync("key", 2);
assert fut2.get() != null && fut2.get() == 1;
assert cache().get("key") != null && cache().get("key") == 1;
@@ -1925,12 +1924,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
private void checkPutxIfAbsentAsync(boolean inTx) throws Exception {
- IgniteFuture<Boolean> fut1 = cache().putxIfAbsentAsync("key", 1);
+ InternalFuture<Boolean> fut1 = cache().putxIfAbsentAsync("key", 1);
assert fut1.get();
assert cache().get("key") != null && cache().get("key") == 1;
- IgniteFuture<Boolean> fut2 = cache().putxIfAbsentAsync("key", 2);
+ InternalFuture<Boolean> fut2 = cache().putxIfAbsentAsync("key", 2);
assert !fut2.get();
assert cache().get("key") != null && cache().get("key") == 1;
@@ -1973,8 +1972,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception In case of error.
*/
public void testPutxIfAbsentAsyncConcurrent() throws Exception {
- IgniteFuture<Boolean> fut1 = cache().putxIfAbsentAsync("key1", 1);
- IgniteFuture<Boolean> fut2 = cache().putxIfAbsentAsync("key2", 2);
+ InternalFuture<Boolean> fut1 = cache().putxIfAbsentAsync("key1", 1);
+ InternalFuture<Boolean> fut2 = cache().putxIfAbsentAsync("key2", 2);
assert fut1.get();
assert fut2.get();
@@ -3302,13 +3301,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
comp.call(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
- IgniteFuture<Boolean> f = cache().lockAsync("key", 1000);
+ InternalFuture<Boolean> f = cache().lockAsync("key", 1000);
try {
f.get(100);
fail();
- } catch (IgniteFutureTimeoutException ex) {
+ } catch (InternalFutureTimeoutException ex) {
info("Caught expected exception: " + ex);
}
@@ -3324,7 +3323,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
});
- IgniteFuture<Boolean> f = comp.future();
+ InternalFuture<Boolean> f = comp.future();
// Let another thread start.
latch.await();
@@ -3381,13 +3380,13 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
@Override public Boolean call() throws Exception {
syncLatch.countDown();
- IgniteFuture<Boolean> f = e.lockAsync(1000);
+ InternalFuture<Boolean> f = e.lockAsync(1000);
try {
f.get(100);
fail();
- } catch (IgniteFutureTimeoutException ex) {
+ } catch (InternalFutureTimeoutException ex) {
info("Caught expected exception: " + ex);
}
@@ -3401,7 +3400,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
});
- IgniteFuture<Boolean> f = comp.future();
+ InternalFuture<Boolean> f = comp.future();
syncLatch.await();
[11/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
index 4e61db6..1ace06d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
@@ -190,7 +190,7 @@ public class GridCacheTxProxyImpl<K, V> implements GridCacheTxProxy, Externaliza
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
enter();
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
index d28f728..8724658 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -1052,10 +1051,10 @@ public class GridCacheUtils {
* @param excl Excludes.
* @return Future listener that logs errors.
*/
- public static IgniteInClosure<IgniteFuture<?>> errorLogger(final IgniteLogger log,
+ public static IgniteInClosure<InternalFuture<?>> errorLogger(final IgniteLogger log,
final Class<? extends Exception>... excl) {
- return new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ return new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
try {
f.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
index e9f6828..636488b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStore.java
@@ -495,9 +495,9 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
* @param key Key for which update is performed.
* @param val New value, may be null for remove operation.
* @param operation Updated value status
- * @throws GridInterruptedException If interrupted while waiting for value to be flushed.
+ * @throws InternalInterruptedException If interrupted while waiting for value to be flushed.
*/
- private void updateCache(K key, @Nullable V val, StoreOperation operation) throws GridInterruptedException {
+ private void updateCache(K key, @Nullable V val, StoreOperation operation) throws InternalInterruptedException {
StatefulValue<V> newVal = new StatefulValue<>(val, operation);
StatefulValue<V> prev;
@@ -724,7 +724,7 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!stopping.get() || writeCache.sizex() > 0) {
awaitOperationsAvailable();
@@ -957,9 +957,9 @@ public class GridCacheWriteBehindStore<K, V> implements GridCacheStore<K, V>, Li
/**
* Awaits a signal on flush condition
*
- * @throws GridInterruptedException If thread was interrupted.
+ * @throws InternalInterruptedException If thread was interrupted.
*/
- private void waitForFlush() throws GridInterruptedException {
+ private void waitForFlush() throws InternalInterruptedException {
U.await(flushCond);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
index 8785b2a..cb32528 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicSequenceImpl.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache.datastructures;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.datastructures.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -255,7 +254,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
* @throws IgniteCheckedException If update failed.
*/
@SuppressWarnings("SignalWithoutCorrespondingAwait")
- private IgniteFuture<Long> internalUpdateAsync(long l, @Nullable Callable<Long> updateCall, boolean updated)
+ private InternalFuture<Long> internalUpdateAsync(long l, @Nullable Callable<Long> updateCall, boolean updated)
throws IgniteCheckedException {
checkRemoved();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
index bedefa9..0e6763c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.future.*;
@@ -210,7 +209,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
*/
public void onResult(UUID nodeId, GridCacheOptimisticCheckPreparedTxResponse<K, V> res) {
if (!isDone()) {
- for (IgniteFuture<Boolean> fut : pending()) {
+ for (InternalFuture<Boolean> fut : pending()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -243,7 +242,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -293,7 +292,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
index 1e31fdf..31bd481 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
@@ -159,7 +159,7 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
*/
public void onResult(UUID nodeId, GridCachePessimisticCheckCommittedTxResponse<K, V> res) {
if (!isDone()) {
- for (IgniteFuture<GridCacheCommittedTxInfo<K, V>> fut : pending()) {
+ for (InternalFuture<GridCacheCommittedTxInfo<K, V>> fut : pending()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -192,7 +192,7 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -248,7 +248,7 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxFinishSync.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxFinishSync.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxFinishSync.java
index d71b4e9..6e0386e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxFinishSync.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxFinishSync.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.future.*;
@@ -64,7 +63,7 @@ public class GridCacheTxFinishSync<K, V> {
* @param threadId Thread ID to wait ack.
* @return {@code null} if ack was received or future that will be completed when ack is received.
*/
- public IgniteFuture<?> awaitAckAsync(UUID nodeId, long threadId) {
+ public InternalFuture<?> awaitAckAsync(UUID nodeId, long threadId) {
ThreadFinishSync threadSync = threadMap.get(threadId);
if (threadSync == null)
@@ -143,7 +142,7 @@ public class GridCacheTxFinishSync<K, V> {
* @param nodeId Node ID to wait ack from.
* @return {@code null} if ack has been received or future that will be completed when ack is received.
*/
- public IgniteFuture<?> awaitAckAsync(UUID nodeId) {
+ public InternalFuture<?> awaitAckAsync(UUID nodeId) {
TxFinishSync sync = nodeMap.get(nodeId);
if (sync == null)
@@ -226,7 +225,7 @@ public class GridCacheTxFinishSync<K, V> {
*
* @return {@code null} if ack has been received, or future that will be completed when ack is received.
*/
- @Nullable public IgniteFuture<?> awaitAckAsync() {
+ @Nullable public InternalFuture<?> awaitAckAsync() {
synchronized (this) {
if (cnt == 0)
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 21e0b8b..514bac8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -49,7 +49,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> txLockAsync(
+ @Override public InternalFuture<Boolean> txLockAsync(
Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K, V> tx,
@@ -65,7 +65,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCacheTxLocalEx<K, V> tx = ctx.tm().userTxx();
@@ -84,7 +84,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
* @param filter Optional filter.
* @return Future for locks.
*/
- protected abstract IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ protected abstract InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
@Nullable GridCacheTxLocalEx<K, V> tx, boolean isInvalidate, boolean isRead, boolean retval,
@Nullable GridCacheTxIsolation isolation, IgnitePredicate<GridCacheEntry<K, V>>[] filter);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index 3cd3e2d..42ac6e8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -380,7 +380,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> prepareAsync() {
assert false;
return null;
}
@@ -724,7 +724,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
try {
commit();
@@ -755,7 +755,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> rollbackAsync() {
+ @Override public InternalFuture<GridCacheTx> rollbackAsync() {
rollback();
return new GridFinishedFutureEx<GridCacheTx>(this);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index c13f8f4..dd68d32 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -237,7 +237,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
* @param topVer Topology version.
* @return Finish future.
*/
- @Nullable public IgniteFuture<?> multiUpdateFinishFuture(long topVer) {
+ @Nullable public InternalFuture<?> multiUpdateFinishFuture(long topVer) {
GridCompoundFuture<IgniteUuid, Object> fut = null;
for (MultiUpdateFuture multiFut : multiTxFuts.values()) {
@@ -425,7 +425,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
* @param filter {@inheritDoc}
* @return {@inheritDoc}
*/
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
@Nullable Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@@ -455,7 +455,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
* @param filter {@inheritDoc}
* @return {@inheritDoc}
*/
- IgniteFuture<Map<K, V>> getDhtAllAsync(@Nullable Collection<? extends K> keys, @Nullable UUID subjId,
+ InternalFuture<Map<K, V>> getDhtAllAsync(@Nullable Collection<? extends K> keys, @Nullable UUID subjId,
String taskName, boolean deserializePortable, @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, taskName, deserializePortable, false,
filter);
@@ -488,12 +488,12 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
protected void processNearGetRequest(final UUID nodeId, final GridNearGetRequest<K, V> req) {
assert isAffinityNode(cacheCfg);
- IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> fut =
+ InternalFuture<Collection<GridCacheEntryInfo<K, V>>> fut =
getDhtAsync(nodeId, req.messageId(), req.keys(), req.reload(), req.topologyVersion(), req.subjectId(),
req.taskNameHash(), false, req.filter());
- fut.listenAsync(new CI1<IgniteFuture<Collection<GridCacheEntryInfo<K, V>>>>() {
- @Override public void apply(IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> f) {
+ fut.listenAsync(new CI1<InternalFuture<Collection<GridCacheEntryInfo<K, V>>>>() {
+ @Override public void apply(InternalFuture<Collection<GridCacheEntryInfo<K, V>>> f) {
GridNearGetResponse<K, V> res = new GridNearGetResponse<>(ctx.cacheId(),
req.futureId(), req.miniId(), req.version());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index be2596d..d1ce358 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -345,7 +345,7 @@ public class GridDhtCacheEntry<K, V> extends GridDistributedCacheEntry<K, V> {
* @throws GridCacheEntryRemovedException If entry was removed.
*/
@SuppressWarnings("unchecked")
- @Nullable public IgniteFuture<Boolean> addReader(UUID nodeId, long msgId, long topVer)
+ @Nullable public InternalFuture<Boolean> addReader(UUID nodeId, long msgId, long topVer)
throws GridCacheEntryRemovedException {
// Don't add local node as reader.
if (cctx.nodeId().equals(nodeId))
@@ -439,8 +439,8 @@ public class GridDhtCacheEntry<K, V> extends GridDistributedCacheEntry<K, V> {
if (!txFut.isDone()) {
final ReaderId<K, V> reader0 = reader;
- txFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ txFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
synchronized (this) {
// Release memory.
reader0.resetTxFuture();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtEmbeddedFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtEmbeddedFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtEmbeddedFuture.java
index 204c03d..3ee0b26 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtEmbeddedFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtEmbeddedFuture.java
@@ -41,7 +41,7 @@ public class GridDhtEmbeddedFuture<A, B> extends GridEmbeddedFuture<A, B> implem
* @param embedded Embedded.
* @param c Closure.
*/
- public GridDhtEmbeddedFuture(GridKernalContext ctx, IgniteFuture<B> embedded, IgniteBiClosure<B, Exception, A> c) {
+ public GridDhtEmbeddedFuture(GridKernalContext ctx, InternalFuture<B> embedded, IgniteBiClosure<B, Exception, A> c) {
super(ctx, embedded, c);
invalidParts = Collections.emptyList();
@@ -52,8 +52,8 @@ public class GridDhtEmbeddedFuture<A, B> extends GridEmbeddedFuture<A, B> implem
* @param c Embedding closure.
* @param ctx Kernal context.
*/
- public GridDhtEmbeddedFuture(IgniteFuture<B> embedded,
- IgniteBiClosure<B, Exception, IgniteFuture<A>> c, GridKernalContext ctx) {
+ public GridDhtEmbeddedFuture(InternalFuture<B> embedded,
+ IgniteBiClosure<B, Exception, InternalFuture<A>> c, GridKernalContext ctx) {
super(embedded, c, ctx);
invalidParts = Collections.emptyList();
@@ -65,7 +65,7 @@ public class GridDhtEmbeddedFuture<A, B> extends GridEmbeddedFuture<A, B> implem
* @param c Closure.
* @param invalidParts Retries.
*/
- public GridDhtEmbeddedFuture(GridKernalContext ctx, IgniteFuture<B> embedded, IgniteBiClosure<B, Exception, A> c,
+ public GridDhtEmbeddedFuture(GridKernalContext ctx, InternalFuture<B> embedded, IgniteBiClosure<B, Exception, A> c,
Collection<Integer> invalidParts) {
super(ctx, embedded, c);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtFuture.java
index be2c93f..7ff6342 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtFuture.java
@@ -16,7 +16,7 @@ import java.util.*;
/**
* Keys to retry.
*/
-public interface GridDhtFuture<T> extends IgniteFuture<T> {
+public interface GridDhtFuture<T> extends InternalFuture<T> {
/**
* Node that future should be able to provide keys to retry before
* it completes, so it's not necessary to wait till future is done
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 6db3540..7cb1f74 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -261,7 +261,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
* @return Future for local get.
*/
@SuppressWarnings( {"unchecked", "IfMayBeConditional"})
- private IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> getAsync(final LinkedHashMap<? extends K, Boolean> keys) {
+ private InternalFuture<Collection<GridCacheEntryInfo<K, V>>> getAsync(final LinkedHashMap<? extends K, Boolean> keys) {
if (F.isEmpty(keys))
return new GridFinishedFuture<Collection<GridCacheEntryInfo<K, V>>>(cctx.kernalContext(),
Collections.<GridCacheEntryInfo<K, V>>emptyList());
@@ -296,7 +296,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
// TODO: To fix, check that reader is contained in the list of readers once
// TODO: again after the returned future completes - if not, try again.
// TODO: Also, why is info read before transactions are complete, and not after?
- IgniteFuture<Boolean> f = (!e.deleted() && k.getValue()) ? e.addReader(reader, msgId, topVer) : null;
+ InternalFuture<Boolean> f = (!e.deleted() && k.getValue()) ? e.addReader(reader, msgId, topVer) : null;
if (f != null) {
if (txFut == null)
@@ -322,7 +322,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
if (txFut != null)
txFut.markInitialized();
- IgniteFuture<Map<K, V>> fut;
+ InternalFuture<Map<K, V>> fut;
if (txFut == null || txFut.isDone()) {
if (reload && cctx.isStoreEnabled() && cctx.store().configured())
@@ -337,8 +337,8 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
// transactions to complete.
fut = new GridEmbeddedFuture<>(
txFut,
- new C2<Boolean, Exception, IgniteFuture<Map<K, V>>>() {
- @Override public IgniteFuture<Map<K, V>> apply(Boolean b, Exception e) {
+ new C2<Boolean, Exception, InternalFuture<Map<K, V>>>() {
+ @Override public InternalFuture<Map<K, V>> apply(Boolean b, Exception e) {
if (e != null)
throw new GridClosureException(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index b77bae2..aaa2956 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -235,7 +235,7 @@ public class GridDhtLocalPartition<K, V> implements Comparable<GridDhtLocalParti
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -382,7 +382,7 @@ public class GridDhtLocalPartition<K, V> implements Comparable<GridDhtLocalParti
* @param updateSeq Update sequence.
* @return Future to signal that this node is no longer an owner or backup.
*/
- IgniteFuture<?> rent(boolean updateSeq) {
+ InternalFuture<?> rent(boolean updateSeq) {
while (true) {
int reservations = state.getStamp();
@@ -410,7 +410,7 @@ public class GridDhtLocalPartition<K, V> implements Comparable<GridDhtLocalParti
* @param updateSeq Update sequence.
* @return Future for evict attempt.
*/
- private IgniteFuture<Boolean> tryEvictAsync(boolean updateSeq) {
+ private InternalFuture<Boolean> tryEvictAsync(boolean updateSeq) {
if (map.isEmpty() && state.compareAndSet(RENTING, EVICTED, 0, 0)) {
if (log.isDebugEnabled())
log.debug("Evicted partition: " + this);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
index be4153a..818600b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
@@ -217,8 +216,8 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
* @return Participating nodes.
*/
@Override public Collection<? extends ClusterNode> nodes() {
- return F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ return F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -453,7 +452,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
@Override public boolean onNodeLeft(UUID nodeId) {
boolean found = false;
- for (IgniteFuture<?> fut : futures()) {
+ for (InternalFuture<?> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -479,7 +478,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
boolean found = false;
- for (IgniteFuture<Boolean> fut : pending()) {
+ for (InternalFuture<Boolean> fut : pending()) {
if (isMini(fut)) {
MiniFuture mini = (MiniFuture)fut;
@@ -695,7 +694,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTopologyFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
index cf3ad80..3b0d3e1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
@@ -21,7 +21,7 @@ import org.gridgain.grid.kernal.managers.discovery.*;
* When new new transaction is started, it will wait for this future before acquiring new locks on particular
* topology version.
*/
-public interface GridDhtTopologyFuture extends IgniteFuture<Long> {
+public interface GridDhtTopologyFuture extends InternalFuture<Long> {
/**
* Gets a topology snapshot for the topology version represented by the future. Note that by the time
* partition exchange completes some nodes from the snapshot may leave the grid. One should use discovery
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 69500dd..217a56d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -329,14 +329,14 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
* @param req Request.
*/
protected final void processDhtLockRequest(final UUID nodeId, final GridDhtLockRequest<K, V> req) {
- IgniteFuture<Object> keyFut = F.isEmpty(req.keys()) ? null :
+ InternalFuture<Object> keyFut = F.isEmpty(req.keys()) ? null :
ctx.dht().dhtPreloader().request(req.keys(), req.topologyVersion());
if (keyFut == null || keyFut.isDone())
processDhtLockRequest0(nodeId, req);
else {
- keyFut.listenAsync(new CI1<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ keyFut.listenAsync(new CI1<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
processDhtLockRequest0(nodeId, req);
}
});
@@ -507,7 +507,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
}
// Group lock can be only started from local node, so we never start group lock transaction on remote node.
- IgniteFuture<?> f = lockAllAsync(ctx, nearNode, req, null);
+ InternalFuture<?> f = lockAllAsync(ctx, nearNode, req, null);
// Register listener just so we print out errors.
// Exclude lock timeout exception since it's not a fatal exception.
@@ -536,7 +536,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys,
+ @Override public InternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K, V> txx,
boolean isInvalidate,
@@ -638,14 +638,14 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
* @param filter0 Filter.
* @return Future.
*/
- public IgniteFuture<GridNearLockResponse<K, V>> lockAllAsync(
+ public InternalFuture<GridNearLockResponse<K, V>> lockAllAsync(
final GridCacheContext<K, V> cacheCtx,
final ClusterNode nearNode,
final GridNearLockRequest<K, V> req,
@Nullable final IgnitePredicate<GridCacheEntry<K, V>>[] filter0) {
final List<K> keys = req.keys();
- IgniteFuture<Object> keyFut = null;
+ InternalFuture<Object> keyFut = null;
if (req.onePhaseCommit()) {
boolean forceKeys = req.hasTransforms() || req.filter() != null;
@@ -663,8 +663,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
keyFut = new GridFinishedFutureEx<>();
return new GridEmbeddedFuture<>(true, keyFut,
- new C2<Object, Exception, IgniteFuture<GridNearLockResponse<K,V>>>() {
- @Override public IgniteFuture<GridNearLockResponse<K, V>> apply(Object o, Exception exx) {
+ new C2<Object, Exception, InternalFuture<GridNearLockResponse<K,V>>>() {
+ @Override public InternalFuture<GridNearLockResponse<K, V>> apply(Object o, Exception exx) {
if (exx != null)
return new GridDhtFinishedFuture<>(ctx.kernalContext(), exx);
@@ -792,7 +792,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
assert req.writeEntries() == null || req.writeEntries().size() == entries.size();
- IgniteFuture<GridCacheReturn<V>> txFut = tx.lockAllAsync(
+ InternalFuture<GridCacheReturn<V>> txFut = tx.lockAllAsync(
cacheCtx,
entries,
req.writeEntries(),
@@ -806,8 +806,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
return new GridDhtEmbeddedFuture<>(
txFut,
- new C2<GridCacheReturn<V>, Exception, IgniteFuture<GridNearLockResponse<K, V>>>() {
- @Override public IgniteFuture<GridNearLockResponse<K, V>> apply(GridCacheReturn<V> o,
+ new C2<GridCacheReturn<V>, Exception, InternalFuture<GridNearLockResponse<K, V>>>() {
+ @Override public InternalFuture<GridNearLockResponse<K, V>> apply(GridCacheReturn<V> o,
Exception e) {
if (e != null)
e = U.unwrap(e);
@@ -822,8 +822,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
assert t.implicit();
return t.commitAsync().chain(
- new C1<IgniteFuture<GridCacheTx>, GridNearLockResponse<K, V>>() {
- @Override public GridNearLockResponse<K, V> apply(IgniteFuture<GridCacheTx> f) {
+ new C1<InternalFuture<GridCacheTx>, GridNearLockResponse<K, V>>() {
+ @Override public GridNearLockResponse<K, V> apply(InternalFuture<GridCacheTx> f) {
try {
// Check for error.
f.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index 2e9311d..0464ff4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
@@ -112,8 +111,8 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -124,7 +123,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -189,7 +188,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
*/
public void onResult(UUID nodeId, GridDhtTxFinishResponse<K, V> res) {
if (!isDone()) {
- for (IgniteFuture<GridCacheTx> fut : futures()) {
+ for (InternalFuture<GridCacheTx> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -229,7 +228,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocal.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocal.java
index b53c1c8..587b2cd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -232,7 +232,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> future() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> future() {
return prepFut.get();
}
@@ -244,7 +244,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
}
/** {@inheritDoc} */
- @Override @Nullable protected IgniteFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
+ @Override @Nullable protected InternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
GridCacheTxEntry<K, V> entry, long topVer) {
// Don't add local node as reader.
if (!cctx.localNodeId().equals(nearNodeId)) {
@@ -274,7 +274,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> prepareAsync() {
if (optimistic()) {
assert isSystemInvalidate();
@@ -346,7 +346,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
* @param lastBackups IDs of backup nodes receiving last prepare request.
* @return Future that will be completed when locks are acquired.
*/
- public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync(@Nullable Iterable<GridCacheTxEntry<K, V>> reads,
+ public InternalFuture<GridCacheTxEx<K, V>> prepareAsync(@Nullable Iterable<GridCacheTxEntry<K, V>> reads,
@Nullable Iterable<GridCacheTxEntry<K, V>> writes, Map<GridCacheTxKey<K>, GridCacheVersion> verMap, long msgId,
IgniteUuid nearMiniId, Map<UUID, Collection<UUID>> txNodes, boolean last, Collection<UUID> lastBackups) {
assert optimistic();
@@ -442,7 +442,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
/** {@inheritDoc} */
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
if (log.isDebugEnabled())
log.debug("Committing dht local tx: " + this);
@@ -479,8 +479,8 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
}
}
else
- prep.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prep.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
try {
f.get(); // Check for errors of a parent future.
@@ -537,7 +537,7 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> rollbackAsync() {
+ @Override public InternalFuture<GridCacheTx> rollbackAsync() {
GridDhtTxPrepareFuture<K, V> prepFut = this.prepFut.get();
final GridDhtTxFinishFuture<K, V> fut = new GridDhtTxFinishFuture<>(cctx, this, /*rollback*/false);
@@ -567,8 +567,8 @@ public class GridDhtTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> implements
else {
prepFut.complete();
- prepFut.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> f) {
+ prepFut.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> f) {
try {
f.get(); // Check for errors of a parent future.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index d594df3..8fdb5af 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -130,7 +130,7 @@ public abstract class GridDhtTxLocalAdapter<K, V> extends GridCacheTxLocalAdapte
* @param entry Transaction entry.
* @return {@code True} if reader was added as a result of this call.
*/
- @Nullable protected abstract IgniteFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
+ @Nullable protected abstract InternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached,
GridCacheTxEntry<K, V> entry, long topVer);
/**
@@ -386,7 +386,7 @@ public abstract class GridDhtTxLocalAdapter<K, V> extends GridCacheTxLocalAdapte
* @return Future for active transactions for the time when reader was added.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public IgniteFuture<Boolean> addEntry(long msgId, GridCacheTxEntry<K, V> e) throws IgniteCheckedException {
+ @Nullable public InternalFuture<Boolean> addEntry(long msgId, GridCacheTxEntry<K, V> e) throws IgniteCheckedException {
init();
GridCacheTxState state = state();
@@ -473,7 +473,7 @@ public abstract class GridDhtTxLocalAdapter<K, V> extends GridCacheTxLocalAdapte
* @param read Read flag.
* @return Lock future.
*/
- IgniteFuture<GridCacheReturn<V>> lockAllAsync(
+ InternalFuture<GridCacheReturn<V>> lockAllAsync(
GridCacheContext<K, V> cacheCtx,
Collection<GridCacheEntryEx<K, V>> entries,
List<GridCacheTxEntry<K, V>> writeEntries,
@@ -583,7 +583,7 @@ public abstract class GridDhtTxLocalAdapter<K, V> extends GridCacheTxLocalAdapte
* @param filter Entry write filter.
* @return Future for lock acquisition.
*/
- private IgniteFuture<GridCacheReturn<V>> obtainLockAsync(
+ private InternalFuture<GridCacheReturn<V>> obtainLockAsync(
final GridCacheContext<K, V> cacheCtx,
GridCacheReturn<V> ret,
final Collection<? extends K> passedKeys,
@@ -599,7 +599,7 @@ public abstract class GridDhtTxLocalAdapter<K, V> extends GridCacheTxLocalAdapte
GridDhtTransactionalCacheAdapter<K, V> dhtCache = cacheCtx.isNear() ? cacheCtx.nearTx().dht() : cacheCtx.dhtTx();
- IgniteFuture<Boolean> fut = dhtCache.lockAllAsyncInternal(passedKeys,
+ InternalFuture<Boolean> fut = dhtCache.lockAllAsyncInternal(passedKeys,
lockTimeout(), this, isInvalidate(), read, /*retval*/false, isolation, CU.<K, V>empty());
return new GridEmbeddedFuture<>(
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index f872cf9..1ff5d52 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -165,8 +165,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -237,7 +237,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<?> fut : futures())
+ for (InternalFuture<?> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -295,7 +295,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
*/
public void onResult(UUID nodeId, GridDhtTxPrepareResponse<K, V> res) {
if (!isDone()) {
- for (IgniteFuture<GridCacheTxEx<K, V>> fut : pending()) {
+ for (InternalFuture<GridCacheTxEx<K, V>> fut : pending()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -406,7 +406,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
try {
get();
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
onError(new IgniteCheckedException("Got interrupted while waiting for replies to be sent.", e));
}
catch (IgniteCheckedException ignored) {
@@ -503,7 +503,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index f79bc2f..c097871 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
@@ -180,8 +179,8 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
@SuppressWarnings("unchecked")
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<Map<K, V>>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<Map<K, V>> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<Map<K, V>>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<Map<K, V>> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -192,7 +191,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
/** {@inheritDoc} */
@Override public boolean onNodeLeft(UUID nodeId) {
- for (IgniteFuture<Map<K, V>> fut : futures())
+ for (InternalFuture<Map<K, V>> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -211,7 +210,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
* @param res Result.
*/
public void onResult(UUID nodeId, GridNearGetResponse<K, V> res) {
- for (IgniteFuture<Map<K, V>> fut : futures())
+ for (InternalFuture<Map<K, V>> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -240,7 +239,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<Map<K, V>> f) {
+ private boolean isMini(InternalFuture<Map<K, V>> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -317,8 +316,8 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
}
// Add new future.
- add(fut.chain(new C1<IgniteFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() {
- @Override public Map<K, V> apply(IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> fut) {
+ add(fut.chain(new C1<InternalFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() {
+ @Override public Map<K, V> apply(InternalFuture<Collection<GridCacheEntryInfo<K, V>>> fut) {
try {
return createResultMap(fut.get());
}
@@ -650,11 +649,11 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
log.debug("Remapping mini get future [invalidParts=" + invalidParts + ", fut=" + this + ']');
// Need to wait for next topology version to remap.
- IgniteFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer);
+ InternalFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer);
- topFut.listenAsync(new CIX1<IgniteFuture<Long>>() {
+ topFut.listenAsync(new CIX1<InternalFuture<Long>>() {
@SuppressWarnings("unchecked")
- @Override public void applyx(IgniteFuture<Long> fut) throws IgniteCheckedException {
+ @Override public void applyx(InternalFuture<Long> fut) throws IgniteCheckedException {
long topVer = fut.get();
// This will append new futures to compound list.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 997671b..3b0d6e9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -13,8 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.security.*;
-import org.apache.ignite.portables.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.communication.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -249,7 +247,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
@Nullable final Collection<? extends K> keys,
final boolean forcePrimary,
boolean skipTx,
@@ -263,8 +261,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
final UUID subjId0 = subjId;
- return asyncOp(new CO<IgniteFuture<Map<K, V>>>() {
- @Override public IgniteFuture<Map<K, V>> apply() {
+ return asyncOp(new CO<InternalFuture<Map<K, V>>>() {
+ @Override public InternalFuture<Map<K, V>> apply() {
return getAllAsync0(keys, false, forcePrimary, filter, subjId0, taskName, deserializePortable);
}
});
@@ -290,14 +288,14 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
long ttl, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return updateAllAsync0(F0.asMap(key, val), null, null, null, true, false, entry, ttl, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return updateAllAsync0(F0.asMap(key, val), null, null, null, false, false, entry, ttl, filter);
}
@@ -308,7 +306,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(K key, V val) {
return putAsync(key, val, ctx.noPeekArray());
}
@@ -318,7 +316,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
return putxAsync(key, val, ctx.noPeekArray());
}
@@ -328,7 +326,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(K key, V val) {
+ @Override public InternalFuture<V> replaceAsync(K key, V val) {
return putAsync(key, val, ctx.hasPeekArray());
}
@@ -338,7 +336,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(K key, V val) {
return putxAsync(key, val, ctx.hasPeekArray());
}
@@ -348,7 +346,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
return putxAsync(key, newVal, ctx.equalsPeekArray(oldVal));
}
@@ -364,13 +362,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
return removeAllAsync0(F.asList(key), null, null, true, true, ctx.equalsPeekArray(val));
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
return updateAllAsync0(F.asMap(key, newVal), null, null, null, true, true, null, 0,
ctx.equalsPeekArray(oldVal));
}
@@ -382,7 +380,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return updateAllAsync0(m, null, null, null, false, false, null, 0, filter);
}
@@ -393,7 +391,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) {
+ @Override public InternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) {
ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
return updateAllAsync0(null, null, drMap, null, false, false, null, 0, null);
@@ -413,7 +411,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
+ @Override public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
@Nullable GridCacheEntryEx<K, V> entry, long ttl) {
return updateAllAsync0(null, Collections.singletonMap(key, transformer), null, null, false, false, entry, ttl,
null);
@@ -425,7 +423,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
if (F.isEmpty(m))
return new GridFinishedFuture<Object>(ctx.kernalContext());
@@ -440,7 +438,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return removeAllAsync0(Collections.singletonList(key), null, entry, true, false, filter);
}
@@ -452,7 +450,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(Collection<? extends K> keys,
IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return removeAllAsync0(keys, null, null, false, false, filter);
}
@@ -465,7 +463,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return removeAllAsync0(Collections.singletonList(key), null, entry, false, false, filter);
}
@@ -476,7 +474,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> removeAsync(K key, V val) {
return removexAsync(key, ctx.equalsPeekArray(val));
}
@@ -486,7 +484,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<?> removeAllAsync(IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return removeAllAsync(keySet(filter), filter);
}
@@ -496,7 +494,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) {
+ @Override public InternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) {
ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
return removeAllAsync0(null, drMap, null, false, false, null);
@@ -514,8 +512,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @return Future.
*/
@SuppressWarnings("unchecked")
- protected <T> IgniteFuture<T> asyncOp(final CO<IgniteFuture<T>> op) {
- IgniteFuture<T> fail = asyncOpAcquire();
+ protected <T> InternalFuture<T> asyncOp(final CO<InternalFuture<T>> op) {
+ InternalFuture<T> fail = asyncOpAcquire();
if (fail != null)
return fail;
@@ -525,12 +523,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
holder.lock();
try {
- IgniteFuture fut = holder.future();
+ InternalFuture fut = holder.future();
if (fut != null && !fut.isDone()) {
- IgniteFuture<T> f = new GridEmbeddedFuture<>(fut,
- new C2<T, Exception, IgniteFuture<T>>() {
- @Override public IgniteFuture<T> apply(T t, Exception e) {
+ InternalFuture<T> f = new GridEmbeddedFuture<>(fut,
+ new C2<T, Exception, InternalFuture<T>>() {
+ @Override public InternalFuture<T> apply(T t, Exception e) {
return op.apply();
}
}, ctx.kernalContext());
@@ -540,7 +538,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
return f;
}
- IgniteFuture<T> f = op.apply();
+ InternalFuture<T> f = op.apply();
saveFuture(holder, f);
@@ -552,7 +550,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override protected IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys,
+ @Override protected InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys,
long timeout,
@Nullable GridCacheTxLocalEx<K, V> tx,
boolean isInvalidate,
@@ -578,7 +576,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param filter Cache entry filter for atomic updates.
* @return Completion future.
*/
- private IgniteFuture updateAllAsync0(
+ private InternalFuture updateAllAsync0(
@Nullable final Map<? extends K, ? extends V> map,
@Nullable final Map<? extends K, ? extends IgniteClosure<V, V>> transformMap,
@Nullable final Map<? extends K, GridCacheDrInfo<V>> drPutMap,
@@ -616,8 +614,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
subjId,
taskNameHash);
- return asyncOp(new CO<IgniteFuture<Object>>() {
- @Override public IgniteFuture<Object> apply() {
+ return asyncOp(new CO<InternalFuture<Object>>() {
+ @Override public InternalFuture<Object> apply() {
updateFut.map();
return updateFut;
@@ -636,7 +634,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param filter Cache entry filter for atomic removes.
* @return Completion future.
*/
- private IgniteFuture removeAllAsync0(
+ private InternalFuture removeAllAsync0(
@Nullable final Collection<? extends K> keys,
@Nullable final Map<? extends K, GridCacheVersion> drMap,
@Nullable GridCacheEntryEx<K, V> cached,
@@ -672,8 +670,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
subjId,
taskNameHash);
- return asyncOp(new CO<IgniteFuture<Object>>() {
- @Override public IgniteFuture<Object> apply() {
+ return asyncOp(new CO<InternalFuture<Object>>() {
+ @Override public InternalFuture<Object> apply() {
updateFut.map();
return updateFut;
@@ -690,7 +688,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
* @param filter Filter.
* @return Get future.
*/
- private IgniteFuture<Map<K, V>> getAllAsync0(@Nullable Collection<? extends K> keys, boolean reload,
+ private InternalFuture<Map<K, V>> getAllAsync0(@Nullable Collection<? extends K> keys, boolean reload,
boolean forcePrimary, @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter, UUID subjId, String taskName,
boolean deserializePortable) {
ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
@@ -809,13 +807,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
@Nullable final GridCacheEntryEx<K, V> cached,
final CI2<GridNearAtomicUpdateRequest<K, V>, GridNearAtomicUpdateResponse<K, V>> completionCb
) {
- IgniteFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
+ InternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
if (forceFut.isDone())
updateAllAsyncInternal0(nodeId, req, cached, completionCb);
else {
- forceFut.listenAsync(new CI1<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ forceFut.listenAsync(new CI1<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
updateAllAsyncInternal0(nodeId, req, cached, completionCb);
}
});
@@ -1401,7 +1399,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
res.addNearValue(i, updRes.newValue(), newValBytes);
if (updRes.newValue() != null || newValBytes != null) {
- IgniteFuture<Boolean> f = entry.addReader(node.id(), req.messageId(), topVer);
+ InternalFuture<Boolean> f = entry.addReader(node.id(), req.messageId(), topVer);
assert f == null : f;
}
@@ -1628,7 +1626,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
res.nearTtl(req.ttl());
if (writeVal != null || !entry.valueBytes().isNull()) {
- IgniteFuture<Boolean> f = entry.addReader(node.id(), req.messageId(), topVer);
+ InternalFuture<Boolean> f = entry.addReader(node.id(), req.messageId(), topVer);
assert f == null : f;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index d660112..78fc105 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.discovery.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -413,8 +412,8 @@ public class GridNearAtomicUpdateFuture<K, V> extends GridFutureAdapter<Object>
snapshot = fut.topologySnapshot();
}
else {
- fut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ fut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
mapOnTopology(keys, remap, oldNodeId);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index c028efd..c33798d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -141,7 +141,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
@Nullable final Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@@ -161,7 +161,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
if (tx != null && !tx.implicit() && !skipTx) {
return asyncOp(tx, new AsyncOp<Map<K, V>>(keys) {
- @Override public IgniteFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
+ @Override public InternalFuture<Map<K, V>> op(GridCacheTxLocalAdapter<K, V> tx) {
return ctx.wrapCloneMap(tx.getAllAsync(ctx, keys, entry, deserializePortable, filter));
}
});
@@ -210,7 +210,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
* @param filter Filter.
* @return Loaded values.
*/
- public IgniteFuture<Map<K, V>> loadAsync(@Nullable Collection<? extends K> keys, boolean reload,
+ public InternalFuture<Map<K, V>> loadAsync(@Nullable Collection<? extends K> keys, boolean reload,
boolean forcePrimary, long topVer, @Nullable UUID subjId, String taskName, boolean deserializePortable,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
if (keys == null || keys.isEmpty())
@@ -314,7 +314,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
*
* {@inheritDoc}
*/
- @Override public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
@Nullable GridCacheTxLocalEx<K, V> tx, boolean isInvalidate, boolean isRead, boolean retval,
@Nullable GridCacheTxIsolation isolation, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
assert tx == null || tx instanceof GridNearTxLocal;
@@ -533,7 +533,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
* @param filter filter Optional filter.
* @return Lock future.
*/
- IgniteFuture<Exception> lockAllAsync(
+ InternalFuture<Exception> lockAllAsync(
final GridCacheContext<K, V> cacheCtx,
@Nullable final GridNearTxLocal<K, V> tx,
final long threadId,
@@ -546,7 +546,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
) {
assert keys != null;
- IgniteFuture<Object> keyFut = ctx.dht().dhtPreloader().request(keys, topVer);
+ InternalFuture<Object> keyFut = ctx.dht().dhtPreloader().request(keys, topVer);
// Prevent embedded future creation if possible.
if (keyFut.isDone()) {
@@ -562,8 +562,8 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
}
else {
return new GridEmbeddedFuture<>(true, keyFut,
- new C2<Object, Exception, IgniteFuture<Exception>>() {
- @Override public IgniteFuture<Exception> apply(Object o, Exception exx) {
+ new C2<Object, Exception, InternalFuture<Exception>>() {
+ @Override public InternalFuture<Exception> apply(Object o, Exception exx) {
if (exx != null)
return new GridDhtFinishedFuture<>(ctx.kernalContext(), exx);
@@ -585,7 +585,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
* @param filter filter Optional filter.
* @return Lock future.
*/
- private IgniteFuture<Exception> lockAllAsync0(
+ private InternalFuture<Exception> lockAllAsync0(
GridCacheContext<K, V> cacheCtx,
@Nullable final GridNearTxLocal<K, V> tx, long threadId,
final GridCacheVersion ver, final long topVer, final Collection<K> keys, final boolean txRead,
@@ -657,7 +657,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
if (log.isDebugEnabled())
log.debug("Performing colocated lock [tx=" + tx + ", keys=" + keys + ']');
- IgniteFuture<GridCacheReturn<V>> txFut = tx.lockAllAsync(cacheCtx, keys, tx.implicit(), txRead);
+ InternalFuture<GridCacheReturn<V>> txFut = tx.lockAllAsync(cacheCtx, keys, tx.implicit(), txRead);
return new GridDhtEmbeddedFuture<>(
ctx.kernalContext(),
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index d27ee3d..8464448 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht.colocated;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.discovery.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -157,8 +156,8 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
*/
@Override public Collection<? extends ClusterNode> nodes() {
return
- F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) {
+ F.viewReadOnly(futures(), new IgniteClosure<InternalFuture<?>, ClusterNode>() {
+ @Nullable @Override public ClusterNode apply(InternalFuture<?> f) {
if (isMini(f))
return ((MiniFuture)f).node();
@@ -335,7 +334,7 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
@Override public boolean onNodeLeft(UUID nodeId) {
boolean found = false;
- for (IgniteFuture<?> fut : futures()) {
+ for (InternalFuture<?> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -368,7 +367,7 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
log.debug("Received lock response from node [nodeId=" + nodeId + ", res=" + res + ", fut=" +
this + ']');
- for (IgniteFuture<Boolean> fut : pending()) {
+ for (InternalFuture<Boolean> fut : pending()) {
if (isMini(fut)) {
MiniFuture mini = (MiniFuture)fut;
@@ -500,7 +499,7 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
* @param f Future.
* @return {@code True} if mini-future.
*/
- private boolean isMini(IgniteFuture<?> f) {
+ private boolean isMini(InternalFuture<?> f) {
return f.getClass().equals(MiniFuture.class);
}
@@ -560,8 +559,8 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
markInitialized();
}
else {
- fut.listenAsync(new CI1<IgniteFuture<Long>>() {
- @Override public void apply(IgniteFuture<Long> t) {
+ fut.listenAsync(new CI1<InternalFuture<Long>>() {
+ @Override public void apply(InternalFuture<Long> t) {
mapOnTopology();
}
});
@@ -822,7 +821,7 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
add(fut); // Append new future.
- IgniteFuture<?> txSync = null;
+ InternalFuture<?> txSync = null;
if (inTx())
txSync = cctx.tm().awaitFinishAckAsync(node.id(), tx.threadId());
@@ -841,8 +840,8 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
}
}
else {
- txSync.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ txSync.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
try {
if (log.isDebugEnabled())
log.debug("Sending near lock request [node=" + node.id() + ", req=" + req + ']');
@@ -875,7 +874,7 @@ public final class GridDhtColocatedLockFuture<K, V> extends GridCompoundIdentity
if (log.isDebugEnabled())
log.debug("Before locally locking keys : " + keys);
- IgniteFuture<Exception> fut = cctx.colocated().lockAllAsync(cctx, tx, threadId, lockVer,
+ InternalFuture<Exception> fut = cctx.colocated().lockAllAsync(cctx, tx, threadId, lockVer,
topVer, keys, read, timeout, filter);
// Add new future.
[05/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractIteratorsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
index 6982236..c75d7dd 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
@@ -86,7 +86,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra
for (int i = 0; i < gridCount(); i++)
cache(i).removeAll();
- final IgniteFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ final InternalFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
for (int i = 0; i < entryCount(); i++)
cache().put(KEY_PREFIX + i, i);
@@ -165,7 +165,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra
for (int i = 0; i < gridCount(); i++)
cache(i).removeAll();
- final IgniteFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ final InternalFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
for (int i = 0; i < entryCount(); i++)
cache().put(KEY_PREFIX + i, i);
@@ -254,7 +254,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra
for (int i = 0; i < gridCount(); i++)
cache(i).removeAll();
- final IgniteFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ final InternalFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
for (int i = 0; i < entryCount(); i++)
cache().put(KEY_PREFIX + i, i);
@@ -322,7 +322,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra
for (int i = 0; i < gridCount(); i++)
cache(i).removeAll();
- final IgniteFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ final InternalFuture<?> putFut = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
for (int i = 0; i < entryCount(); i++)
cache().put(KEY_PREFIX + i, i);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractRemoveFailureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractRemoveFailureTest.java
index 6686911..169d32a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractRemoveFailureTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractRemoveFailureTest.java
@@ -11,7 +11,6 @@ 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.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -121,7 +120,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
// Expected values in cache.
final Map<Integer, GridTuple<Integer>> expVals = new ConcurrentHashMap8<>();
- IgniteFuture<?> updateFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> updateFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
ThreadLocalRandom rnd = ThreadLocalRandom.current();
@@ -170,7 +169,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
}
});
- IgniteFuture<?> killFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> killFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
while (!stop.get()) {
U.sleep(random(KILL_DELAY.get1(), KILL_DELAY.get2()));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java
index 2cee21a..bda7a4e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java
@@ -49,10 +49,10 @@ public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelf
cnt.incrementAndGet();
- IgniteFuture<Boolean> fut = cache().putxAsync("key" + i, i);
+ InternalFuture<Boolean> fut = cache().putxAsync("key" + i, i);
- fut.listenAsync(new CI1<IgniteFuture<Boolean>>() {
- @Override public void apply(IgniteFuture<Boolean> t) {
+ fut.listenAsync(new CI1<InternalFuture<Boolean>>() {
+ @Override public void apply(InternalFuture<Boolean> t) {
cnt.decrementAndGet();
max.setIfGreater(cnt.get());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentMapTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentMapTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentMapTest.java
index 7c38ee8..578b027 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentMapTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentMapTest.java
@@ -84,7 +84,7 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!done.get()) {
@@ -104,7 +104,7 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
3
);
- IgniteFuture<?> fut2 = multithreadedAsync(
+ InternalFuture<?> fut2 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!done.get()) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index dcbf820..d462da6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.cache.datastructures.*;
@@ -305,7 +304,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
comp.execute(RequestTask.class, new Message(terminalId, nodeId));
- ComputeTaskFuture<Void> f1 = comp.future();
+ InternalComputeTaskFuture<Void> f1 = comp.future();
submitTime.setIfGreater(System.currentTimeMillis() - submitTime1);
@@ -315,7 +314,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
comp.execute(ResponseTask.class, new Message(terminalId, nodeId));
- ComputeTaskFuture<Void> f2 = comp.future();
+ InternalComputeTaskFuture<Void> f2 = comp.future();
submitTime.setIfGreater(System.currentTimeMillis() - submitTime1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFinishPartitionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFinishPartitionsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFinishPartitionsSelfTest.java
index d5e744c..9b5f8b3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFinishPartitionsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFinishPartitionsSelfTest.java
@@ -123,10 +123,10 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
cache.get(key);
- IgniteFuture<?> fut = grid.context().cache().context().partitionReleaseFuture(GRID_CNT + 1);
+ InternalFuture<?> fut = grid.context().cache().context().partitionReleaseFuture(GRID_CNT + 1);
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
latch.countDown();
}
});
@@ -186,9 +186,9 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
GridCacheAdapter<String, Integer> internal = grid.internalCache();
- IgniteFuture<?> nearFut = internal.context().mvcc().finishKeys(Collections.singletonList(key), 2);
+ InternalFuture<?> nearFut = internal.context().mvcc().finishKeys(Collections.singletonList(key), 2);
- IgniteFuture<?> dhtFut = internal.context().near().dht().context().mvcc().finishKeys(
+ InternalFuture<?> dhtFut = internal.context().near().dht().context().mvcc().finishKeys(
Collections.singletonList(key), 2);
assert !nearFut.isDone();
@@ -220,12 +220,12 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
info("Start time: " + start);
- IgniteFuture<?> fut = ctx.partitionReleaseFuture(GRID_CNT + 1);
+ InternalFuture<?> fut = ctx.partitionReleaseFuture(GRID_CNT + 1);
assert fut != null;
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
end.set(System.currentTimeMillis());
latch.countDown();
@@ -274,12 +274,12 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
info("Start time: " + start);
- IgniteFuture<?> fut = ctx.partitionReleaseFuture(GRID_CNT + 1);
+ InternalFuture<?> fut = ctx.partitionReleaseFuture(GRID_CNT + 1);
assert fut != null;
- fut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> e) {
+ fut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> e) {
end.set(System.currentTimeMillis());
latch.countDown();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
index 28e6073..852a7d3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
@@ -67,7 +67,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra
final GridCache<Integer, H2TextValue> c = grid(0).cache(null);
- IgniteFuture<?> fut1 = multithreadedAsync(new Callable() {
+ InternalFuture<?> fut1 = multithreadedAsync(new Callable() {
@Override public Object call() throws Exception {
for (int i = 0; i < keyCnt; i++) {
c.putx(i, new H2TextValue(txt));
@@ -90,7 +90,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut2 = multithreadedAsync(new Callable() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Callable() {
@Override public Object call() throws Exception {
int cnt = 0;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
index 8a929bf..c397d69 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
@@ -110,7 +110,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm
final IgniteClosure<String, String> trans = new TransformClosure();
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
GridCache<Integer, String> c = cache(ThreadLocalRandom.current().nextInt(3));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 f9fe5e9..571cc1f 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
@@ -13,7 +13,6 @@ 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.affinity.*;
import org.gridgain.grid.cache.store.*;
@@ -359,7 +358,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
final CountDownLatch unlockLatch = new CountDownLatch(1);
final CountDownLatch lockLatch = new CountDownLatch(1);
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
assertTrue(cache.lock(key1, 0));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 c812755..f7a5891 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
@@ -15,7 +15,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
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.*;
@@ -76,7 +75,7 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
* Result future queue (restrict the queue size
* to 50 in order to prevent in-memory data grid from over loading).
*/
- private final BlockingQueue<ComputeTaskFuture<?>> resQueue = new LinkedBlockingQueue<>(10);
+ private final BlockingQueue<InternalComputeTaskFuture<?>> resQueue = new LinkedBlockingQueue<>(10);
/**
* @return {@code True} if test should use optimistic transactions.
@@ -317,11 +316,11 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
comp.execute(new GridCacheGroupLockPutTask(preferredNodeId, CACHE_NAME, optimisticTx()), dataChunk);
- ComputeTaskFuture<Void> fut = comp.future();
+ InternalComputeTaskFuture<Void> fut = comp.future();
- fut.listenAsync(new CI1<IgniteFuture<Void>>() {
- @Override public void apply(IgniteFuture<Void> f) {
- ComputeTaskFuture taskFut = (ComputeTaskFuture)f;
+ fut.listenAsync(new CI1<InternalFuture<Void>>() {
+ @Override public void apply(InternalFuture<Void> f) {
+ InternalComputeTaskFuture taskFut = (InternalComputeTaskFuture)f;
boolean fail = false;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 7a9ac04..11b0139 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
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.jetbrains.annotations.*;
@@ -61,7 +60,7 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
* @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 IgniteCheckedException If mapping could not complete successfully. This exception will be thrown out of {@link
- * org.apache.ignite.compute.ComputeTaskFuture#get()} method.
+ * InternalComputeTaskFuture#get()} method.
*/
@Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
@Nullable final Collection<Integer> data) throws IgniteCheckedException {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheIncrementTransformTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheIncrementTransformTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheIncrementTransformTest.java
index 44b8618..9cf1c36 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheIncrementTransformTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheIncrementTransformTest.java
@@ -105,7 +105,7 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest {
final AtomicBoolean stop = new AtomicBoolean();
final AtomicReference<Throwable> error = new AtomicReference<>();
- IgniteFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
@Override public void run() {
try {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLuceneQueryIndexTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLuceneQueryIndexTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLuceneQueryIndexTest.java
index ce2ef84..54bd6ec 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLuceneQueryIndexTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLuceneQueryIndexTest.java
@@ -101,7 +101,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
final int keyCnt = 10000;
- final IgniteFuture<?> fut = multithreadedAsync(
+ final InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
int threadIdx = threadIdxGen.getAndIncrement() % 2;
@@ -121,7 +121,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
},
10);
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!fut.isDone()) {
@@ -158,7 +158,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
final int keyCnt = 10000;
- final IgniteFuture<?> fut = multithreadedAsync(
+ final InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
int threadIdx = threadIdxGen.getAndIncrement() % 2;
@@ -192,7 +192,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
},
10);
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!fut.isDone()) {
@@ -231,7 +231,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
final ObjectValue val = new ObjectValue("String value");
- final IgniteFuture<?> fut = multithreadedAsync(
+ final InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
int threadIdx = threadIdxGen.getAndIncrement() % 2;
@@ -265,7 +265,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
},
10);
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!fut.isDone()) {
@@ -307,7 +307,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
for (int i = 0; i < vals.length; i++)
vals[i] = new ObjectValue("Object value " + i);
- final IgniteFuture<?> fut = multithreadedAsync(
+ final InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
int threadIdx = threadIdxGen.getAndIncrement() % 2;
@@ -341,7 +341,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
},
1);
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!fut.isDone()) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMissingCommitVersionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
index a22ae6f..b06456c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMissingCommitVersionSelfTest.java
@@ -107,12 +107,12 @@ public class GridCacheMissingCommitVersionSelfTest extends GridCommonAbstractTes
log.info("Trying to update " + failedKey);
- IgniteFuture<?> fut = cache.putAsync(failedKey, 2);
+ InternalFuture<?> fut = cache.putAsync(failedKey, 2);
try {
fut.get(5000);
}
- catch (IgniteFutureTimeoutException ignore) {
+ catch (InternalFutureTimeoutException ignore) {
fail("Put failed to finish in 5s.");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
index 1db99d9..3f5210f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java
@@ -71,7 +71,7 @@ public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractT
final AtomicBoolean finished = new AtomicBoolean();
- IgniteFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new IgniteCallable<Object>() {
+ InternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new IgniteCallable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -130,7 +130,7 @@ public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractT
GridCacheContext<Object, Object> cctx = grid.internalCache(null).context();
- IgniteFuture<Long> verFut = cctx.affinity().affinityReadyFuture(topVer);
+ InternalFuture<Long> verFut = cctx.affinity().affinityReadyFuture(topVer);
assertEquals((Long)topVer, verFut.get());
assertEquals((Long)topVer, cctx.topologyVersionFuture().get());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiUpdateLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
index 60ebe1a..f07f43f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultiUpdateLockSelfTest.java
@@ -107,7 +107,7 @@ public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest {
long topVer = cache.beginMultiUpdate();
- IgniteFuture<?> startFut;
+ InternalFuture<?> startFut;
try {
assertEquals(3, topVer);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
index a57799b..b9cd1db 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
@@ -261,7 +261,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
final int THREADS = 5;
final int ITERATIONS_PER_THREAD = iterations();
- IgniteFuture<Long> putFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+ InternalFuture<Long> putFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
for (int i = 0; i < ITERATIONS_PER_THREAD; i++) {
if (i % 1000 == 0)
@@ -276,7 +276,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<Long> getFut;
+ InternalFuture<Long> getFut;
try {
getFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index 91f45c1..4d5bab2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -106,7 +106,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
int oldSize = cache1.size();
- IgniteFuture fut = multithreadedAsync(
+ InternalFuture fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
startLatch.await();
@@ -177,10 +177,10 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
* @param ignite1 Grid 1.
* @param ignite2 Grid 2.
* @param oldSize Old size, stable size should be .
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
private void sleepUntilCashesEqualize(final Ignite ignite1, final Ignite ignite2, final int oldSize)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
info("Sleeping...");
assertTrue(GridTestUtils.waitForCondition(new PA() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 7998316..0fa4709 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
@@ -8,7 +8,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -72,7 +71,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
* Result future queue (restrict the queue size
* to 50 in order to prevent in-memory data grid from over loading).
*/
- private final BlockingQueue<ComputeTaskFuture<?>> resQueue = new LinkedBlockingQueue<>(50);
+ private final BlockingQueue<InternalComputeTaskFuture<?>> resQueue = new LinkedBlockingQueue<>(50);
/** Test failover SPI. */
private MasterFailoverSpi failoverSpi = new MasterFailoverSpi((IgnitePredicate)workerNodesFilter);
@@ -238,13 +237,13 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
CACHE_NAME),
dataChunk);
- ComputeTaskFuture<Void> fut = comp.future();
+ InternalComputeTaskFuture<Void> fut = comp.future();
resQueue.put(fut); // Blocks if queue is full.
- fut.listenAsync(new CI1<IgniteFuture<Void>>() {
- @Override public void apply(IgniteFuture<Void> f) {
- ComputeTaskFuture<?> taskFut = (ComputeTaskFuture<?>)f;
+ fut.listenAsync(new CI1<InternalFuture<Void>>() {
+ @Override public void apply(InternalFuture<Void> f) {
+ InternalComputeTaskFuture<?> taskFut = (InternalComputeTaskFuture<?>)f;
try {
taskFut.get(); //if something went wrong - we'll get exception here
@@ -410,13 +409,13 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
comp.execute(new GridCachePutAllTask(nodeId, CACHE_NAME), data);
- ComputeTaskFuture<Void> fut = comp.future();
+ InternalComputeTaskFuture<Void> fut = comp.future();
resQueue.put(fut); // Blocks if queue is full.
- fut.listenAsync(new CI1<IgniteFuture<Void>>() {
- @Override public void apply(IgniteFuture<Void> f) {
- ComputeTaskFuture<?> taskFut = (ComputeTaskFuture<?>)f;
+ fut.listenAsync(new CI1<InternalFuture<Void>>() {
+ @Override public void apply(InternalFuture<Void> f) {
+ InternalComputeTaskFuture<?> taskFut = (InternalComputeTaskFuture<?>)f;
try {
taskFut.get(); //if something went wrong - we'll get exception here
@@ -461,13 +460,13 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
for (Map.Entry<UUID, Collection<Integer>> entry : dataChunks.entrySet()) {
comp.execute(new GridCachePutAllTask(entry.getKey(), CACHE_NAME), entry.getValue());
- ComputeTaskFuture<Void> fut = comp.future();
+ InternalComputeTaskFuture<Void> fut = comp.future();
resQueue.put(fut); // Blocks if queue is full.
- fut.listenAsync(new CI1<IgniteFuture<Void>>() {
- @Override public void apply(IgniteFuture<Void> f) {
- ComputeTaskFuture<?> taskFut = (ComputeTaskFuture<?>)f;
+ fut.listenAsync(new CI1<InternalFuture<Void>>() {
+ @Override public void apply(InternalFuture<Void> f) {
+ InternalComputeTaskFuture<?> taskFut = (InternalComputeTaskFuture<?>)f;
try {
taskFut.get(); //if something went wrong - we'll get exception here
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
index 80c4747..41bf196 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
@@ -382,7 +382,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest {
refs.add(new WeakReference<Object>(cacheContext(cache)));
- Collection<IgniteFuture<?>> futs = new ArrayList<>(1000);
+ Collection<InternalFuture<?>> futs = new ArrayList<>(1000);
for (int i = 0; i < 1000; i++) {
TestValue val = new TestValue(i);
@@ -392,7 +392,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest {
futs.add(cache.putxAsync(i, val));
}
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get();
}
finally {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
index ed6f067..d7d5aaa 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java
@@ -129,7 +129,7 @@ public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstract
GridCache<Integer, String> cache1 = ignite1.cache(null);
GridCache<Integer, String> cache3 = ignite3.cache(null);
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Thread.sleep(1000);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 3402297..c6c8d97 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
@@ -129,7 +129,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
assertEquals(atomic ? ATOMIC : TRANSACTIONAL, cache.configuration().getAtomicityMode());
assertEquals(replicated ? REPLICATED : PARTITIONED, cache.configuration().getCacheMode());
- Collection<IgniteFuture<?>> putFuts = new ArrayList<>();
+ Collection<InternalFuture<?>> putFuts = new ArrayList<>();
for (int j = 0; j < PUT_THREADS; j++) {
final int key = j;
@@ -166,7 +166,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
stopGrid(0);
- for (IgniteFuture<?> fut : putFuts) {
+ for (InternalFuture<?> fut : putFuts) {
try {
fut.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapPreloadSelfTest.java
index af82c3e..3c43a02 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -141,7 +141,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
/** @throws Exception If failed. */
private void checkSwapMultithreaded() throws Exception {
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = null;
+ InternalFuture<?> fut = null;
try {
startGrid(0);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerLoadTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerLoadTest.java
index 371ad91..00c786a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManagerLoadTest.java
@@ -34,7 +34,7 @@ public class GridCacheTtlManagerLoadTest extends GridCacheTtlManagerSelfTest {
try {
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
GridCache<Object,Object> cache = g.cache(null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 1e2811f..f179055 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
@@ -10,7 +10,6 @@
package org.gridgain.grid.kernal.processors.cache;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.testframework.*;
import org.jetbrains.annotations.*;
@@ -210,7 +209,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
cache.put(key, 0L);
- List<IgniteFuture<Collection<Long>>> futs = new ArrayList<>(THREADS);
+ List<InternalFuture<Collection<Long>>> futs = new ArrayList<>(THREADS);
for (int i = 0; i < THREADS; i++) {
futs.add(GridTestUtils.runAsync(new Callable<Collection<Long>>() {
@@ -243,7 +242,7 @@ public abstract class GridCacheTxMultiThreadedAbstractTest extends GridCacheTxAb
List<Collection<Long>> cols = new ArrayList<>(THREADS);
- for (IgniteFuture<Collection<Long>> fut : futs) {
+ for (InternalFuture<Collection<Long>> fut : futs) {
Collection<Long> col = fut.get();
assertEquals(ITERATIONS, col.size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheVariableTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheVariableTopologySelfTest.java
index 33a145f..0a41157 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheVariableTopologySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheVariableTopologySelfTest.java
@@ -107,7 +107,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest {
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CAX() {
/** */
private int cnt;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
index 3cc93bd..2303cc3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
@@ -91,7 +91,7 @@ public abstract class GridCacheWriteBehindStoreAbstractSelfTest extends GridComm
final AtomicInteger operations = new AtomicInteger();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings({"NullableProblems"})
@Override public void run() {
// Initialize key set for this thread.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
index 0c91822..a5cb28a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
@@ -256,7 +256,7 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb
final GridCache<Integer, String> cache = cache();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings({"NullableProblems"})
@Override public void run() {
// Initialize key set for this thread.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java
index 274a8ff..366a467 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java
@@ -163,9 +163,9 @@ public class GridCacheWriteBehindStorePartitionedMultiNodeSelfTest extends GridC
}
/**
- * @throws GridInterruptedException If sleep was interrupted.
+ * @throws InternalInterruptedException If sleep was interrupted.
*/
- private void checkWrites() throws GridInterruptedException {
+ private void checkWrites() throws InternalInterruptedException {
U.sleep(WRITE_BEHIND_FLUSH_FREQ * 2);
Collection<Integer> allKeys = new ArrayList<>(100);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
index 0e84d80..564300c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
@@ -138,7 +138,7 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
final AtomicInteger actualPutCnt = new AtomicInteger();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings({"NullableProblems"})
@Override public void run() {
try {
@@ -198,7 +198,7 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
try {
final AtomicBoolean running = new AtomicBoolean(true);
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings({"NullableProblems"})
@Override public void run() {
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index 5c82786..50755c6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -114,7 +114,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicLong s = cache().dataStructures().atomicLong(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -164,7 +164,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicLong s = cache().dataStructures().atomicLong(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -243,7 +243,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicReference<Integer> s = cache().dataStructures().atomicReference(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -292,7 +292,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicReference<Integer> s = cache().dataStructures().atomicReference(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -378,7 +378,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicStamped<Integer, Integer> s = cache().dataStructures().atomicStamped(STRUCTURE_NAME, 1, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -441,7 +441,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicStamped<Integer, Integer> s = cache().dataStructures().atomicStamped(STRUCTURE_NAME, 1, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -536,7 +536,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
GridCacheCountDownLatch s = cache().dataStructures().countDownLatch(STRUCTURE_NAME, Integer.MAX_VALUE,
false, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -591,7 +591,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
GridCacheCountDownLatch s = cache().dataStructures()
.countDownLatch(STRUCTURE_NAME, Integer.MAX_VALUE, false, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -676,7 +676,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
s.put(1);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -726,7 +726,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
s.put(1);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
@@ -801,7 +801,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicSequence s = cache().dataStructures().atomicSequence(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
String name = UUID.randomUUID().toString();
@@ -852,7 +852,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
final AtomicInteger idx = new AtomicInteger(gridCount());
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
int id = idx.getAndIncrement();
@@ -903,7 +903,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Gr
try {
GridCacheAtomicSequence s = cache().dataStructures().atomicSequence(STRUCTURE_NAME, 1, true);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@Override public void apply() {
try {
for (int i = 0; i < TOP_CHANGE_CNT; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
index 7145c51..60df229 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
@@ -159,7 +159,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut = startNodeKiller(stop, new AtomicInteger(), killIdxs);
+ InternalFuture<?> fut = startNodeKiller(stop, new AtomicInteger(), killIdxs);
final int ITEMS = (atomicityMode() == ATOMIC) ? 10_000 : 3000;
@@ -265,7 +265,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
final AtomicInteger stopCnt = new AtomicInteger();
- IgniteFuture<?> fut = startNodeKiller(stop, stopCnt, killIdxs);
+ InternalFuture<?> fut = startNodeKiller(stop, stopCnt, killIdxs);
int err = 0;
@@ -318,7 +318,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
* @param killIdxs Indexes of nodes to kill.
* @return Future completing when thread finishes.
*/
- private IgniteFuture<?> startNodeKiller(final AtomicBoolean stop, final AtomicInteger killCnt,
+ private InternalFuture<?> startNodeKiller(final AtomicBoolean stop, final AtomicInteger killCnt,
final List<Integer> killIdxs) {
return GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchSelfTest.java
index 166d107..f95c6b3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheCountDownLatchSelfTest.java
@@ -144,7 +144,7 @@ public class GridCacheCountDownLatchSelfTest extends GridCommonAbstractTest impl
assert latch.count() == 2;
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
GridCacheCountDownLatch latch = grid(0).cache("local").dataStructures()
@@ -211,7 +211,7 @@ public class GridCacheCountDownLatchSelfTest extends GridCommonAbstractTest impl
@Nullable @Override public Object call() throws Exception {
// Test latch in multiple threads on each node.
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
GridCacheCountDownLatch latch = ignite.cache(cacheName).dataStructures()
@@ -238,7 +238,7 @@ public class GridCacheCountDownLatchSelfTest extends GridCommonAbstractTest impl
}
});
- IgniteFuture<Object> fut = comp.future();
+ InternalFuture<Object> fut = comp.future();
Thread.sleep(3000);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index e66ac39..5812b8e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -200,7 +200,7 @@ public class GridCacheQueueCleanupSelfTest extends GridCacheAbstractSelfTest {
* @param queueName Queue name.
* @return Future completing when thread finishes.
*/
- private IgniteFuture<?> startAddPollThread(final Ignite ignite, final AtomicBoolean stop, final String queueName) {
+ private InternalFuture<?> startAddPollThread(final Ignite ignite, final AtomicBoolean stop, final String queueName) {
return GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
GridCacheQueue<Integer> queue = ignite.cache(null).dataStructures().queue(queueName, 0, false, true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
index 04b4f98..6907318 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
@@ -82,9 +82,9 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends GridCommo
comp.run(putJob);
- IgniteFuture<?> fut = comp.future();
+ InternalFuture<?> fut = comp.future();
- Collection<IgniteFuture<?>> futs = new ArrayList<>(GRID_CNT - 1);
+ Collection<InternalFuture<?>> futs = new ArrayList<>(GRID_CNT - 1);
Collection<TakeJob> jobs = new ArrayList<>(GRID_CNT - 1);
@@ -127,7 +127,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends GridCommo
info(">>> Joined node polled " + polled);
- for (IgniteFuture<?> f : futs)
+ for (InternalFuture<?> f : futs)
f.cancel();
putJob.stop(true);
@@ -237,18 +237,18 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends GridCommo
/**
* Awaits for a given count of items to be taken.
*
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- private void awaitItems() throws GridInterruptedException {
+ private void awaitItems() throws InternalInterruptedException {
U.await(takeLatch);
}
/**
* Awaits for a given count of items to be taken.
*
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- private void awaitDone() throws GridInterruptedException {
+ private void awaitDone() throws InternalInterruptedException {
U.await(doneLatch);
}
@@ -273,7 +273,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends GridCommo
}
}
catch (IgniteException e) {
- if (e.getCause() instanceof GridInterruptedException || e.getCause() instanceof InterruptedException)
+ if (e.getCause() instanceof InternalInterruptedException || e.getCause() instanceof InterruptedException)
log.info("Cancelling job due to interruption: " + e.getMessage());
else
fail("Unexpected error: " + e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
index acca39c..66f24d9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.datastructures.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -170,7 +169,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
final Ignite g = startGrid(GRID_CNT + 1);
- IgniteFuture<Object> fut1 = GridTestUtils.runAsync(new Callable<Object>() {
+ InternalFuture<Object> fut1 = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
info(">>> Executing put callable [node=" + g.cluster().localNode().id() +
", thread=" + Thread.currentThread().getName() + ", aff=" +
@@ -201,7 +200,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
final Ignite g1 = startGrid(GRID_CNT + 2);
- IgniteFuture<Object> fut2 = GridTestUtils.runAsync(new Callable<Object>() {
+ InternalFuture<Object> fut2 = GridTestUtils.runAsync(new Callable<Object>() {
@SuppressWarnings("BusyWait")
@Override public Object call() throws Exception {
try {
@@ -355,7 +354,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
info("Queue name: " + queueName + ", collocated: " + collocated);
try {
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
final int THREADS_PER_NODE = 3;
final int ITEMS_PER_THREAD = 1000;
@@ -377,7 +376,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
}, THREADS_PER_NODE, "testPutMultiNode"));
}
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get();
GridCache cache = grid(0).cache(null);
@@ -420,8 +419,8 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
info("Queue name: " + queueName + ", collocated: " + collocated);
try {
- Collection<IgniteFuture> putFuts = new ArrayList<>();
- Collection<IgniteFuture> pollFuts = new ArrayList<>();
+ Collection<InternalFuture> putFuts = new ArrayList<>();
+ Collection<InternalFuture> pollFuts = new ArrayList<>();
final int PUT_THREADS_PER_NODE = 3;
final int POLL_THREADS_PER_NODE = 2;
@@ -472,12 +471,12 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends GridCommon
}
}
- for (IgniteFuture fut : putFuts)
+ for (InternalFuture fut : putFuts)
fut.get();
stopPoll.set(true);
- for (IgniteFuture fut : pollFuts)
+ for (InternalFuture fut : pollFuts)
fut.get();
GridCache cache = grid(0).cache(null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index 9dcd07c..2c8329e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -660,7 +660,7 @@ public abstract class GridCacheSetAbstractSelfTest extends GridCacheAbstractSelf
assertNotNull(set0);
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
final int THREADS_PER_NODE = 5;
final int KEY_RANGE = 10_000;
@@ -715,7 +715,7 @@ public abstract class GridCacheSetAbstractSelfTest extends GridCacheAbstractSelf
}, THREADS_PER_NODE, "testSetMultithreaded"));
}
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get();
}
@@ -767,7 +767,7 @@ public abstract class GridCacheSetAbstractSelfTest extends GridCacheAbstractSelf
final AtomicInteger val = new AtomicInteger(10_000);
- IgniteFuture<?> fut;
+ InternalFuture<?> fut;
try {
fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
index 6052220..db1cb5f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
@@ -99,7 +99,7 @@ public class GridCacheSetFailoverAbstractSelfTest extends GridCacheAbstractSelfT
AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> killFut = startNodeKiller(stop);
+ InternalFuture<?> killFut = startNodeKiller(stop);
long stopTime = System.currentTimeMillis() + TEST_DURATION;
@@ -205,7 +205,7 @@ public class GridCacheSetFailoverAbstractSelfTest extends GridCacheAbstractSelfT
* @param stop Stop flag.
* @return Future completing when thread finishes.
*/
- private IgniteFuture<?> startNodeKiller(final AtomicBoolean stop) {
+ private InternalFuture<?> startNodeKiller(final AtomicBoolean stop) {
return GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
ThreadLocalRandom rnd = ThreadLocalRandom.current();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
index ab255fd..e6fab4b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
@@ -78,7 +78,7 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends GridCommon
public void testQueueCreation() throws Exception {
final AtomicInteger idx = new AtomicInteger();
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
Ignite ignite = startGrid(idx.getAndIncrement());
@@ -130,7 +130,7 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends GridCommon
final CountDownLatch latch = new CountDownLatch(threadCnt);
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
Ignite ignite = startGrid(idx.getAndIncrement());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
index 05f65df..abfae02 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
@@ -13,7 +13,6 @@ 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.affinity.*;
import org.gridgain.grid.cache.datastructures.*;
@@ -93,7 +92,7 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends GridCommonAbstra
final CountDownLatch latch1 = new CountDownLatch(1);
//final CountDownLatch latch2 = new CountDownLatch(1);
- IgniteFuture<?> fut1 = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> fut1 = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws IgniteCheckedException {
Ignite ignite = grid(0);
@@ -133,7 +132,7 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends GridCommonAbstra
//latch2.countDown();
- IgniteFuture<?> fut2 = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> fut2 = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws IgniteCheckedException {
Ignite ignite = grid(GRID_CNT);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
index cabe4db..e5a83ba 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -113,7 +112,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
Ignite ignite = grid(0);
- Collection<IgniteFuture<?>> futs = new LinkedList<>();
+ Collection<InternalFuture<?>> futs = new LinkedList<>();
IgniteCompute comp = ignite.compute().enableAsync();
@@ -150,7 +149,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
futs.add(comp.future());
}
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get(); // Wait for completion.
for (int i = 0; i < GRID_CNT; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
index 74525c1..bf6c2cb 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.kernal.*;
@@ -114,7 +113,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
commSpi.skipNearRequest = true;
- IgniteFuture<Object> fut = cache.putAsync(key, 1);
+ InternalFuture<Object> fut = cache.putAsync(key, 1);
Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
@@ -148,7 +147,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
commSpi.skipNearResponse = true;
- IgniteFuture<Object> fut = cache.putAsync(key, 1);
+ InternalFuture<Object> fut = cache.putAsync(key, 1);
Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
@@ -182,7 +181,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
commSpi.skipDhtRequest = true;
- IgniteFuture<Object> fut = cache.putAsync(key, 1);
+ InternalFuture<Object> fut = cache.putAsync(key, 1);
Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
@@ -217,7 +216,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
commSpi.skipDhtResponse = true;
- IgniteFuture<Object> fut = cache.putAsync(key, 1);
+ InternalFuture<Object> fut = cache.putAsync(key, 1);
Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
index 53c6ff0..d326c1b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
@@ -13,7 +13,6 @@ 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.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -174,7 +173,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
ignite2.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
ignite3.events().localListen(lsnr, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED);
- IgniteFuture<String> f1 = cache1.getAsync("async1");
+ InternalFuture<String> f1 = cache1.getAsync("async1");
assert f1.get() == null;
@@ -191,8 +190,8 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
assert latch.await(5, SECONDS);
- IgniteFuture<String> f2 = cache2.getAsync("async1");
- IgniteFuture<String> f3 = cache3.getAsync("async1");
+ InternalFuture<String> f2 = cache2.getAsync("async1");
+ InternalFuture<String> f3 = cache3.getAsync("async1");
String v2 = f2.get();
String v3 = f3.get();
[09/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java
index 797e31a..df0200b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java
@@ -486,9 +486,9 @@ public abstract class GridCacheQueryFutureAdapter<K, V, R> extends GridFutureAda
/**
* Loads all left pages.
*
- * @throws GridInterruptedException If thread is interrupted.
+ * @throws InternalInterruptedException If thread is interrupted.
*/
- protected abstract void loadAllPages() throws GridInterruptedException;
+ protected abstract void loadAllPages() throws InternalInterruptedException;
/**
* Clears future.
@@ -528,7 +528,7 @@ public abstract class GridCacheQueryFutureAdapter<K, V, R> extends GridFutureAda
try {
cancelQuery();
- onDone(new IgniteFutureTimeoutException("Query timed out."));
+ onDone(new InternalFutureTimeoutException("Query timed out."));
}
catch (IgniteCheckedException e) {
onDone(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
index 25c0668..47c039d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
@@ -92,8 +92,8 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
for (Map.Entry<Long, GridFutureAdapter<QueryResult<K, V>>> entry : futs.entrySet()) {
final Object recipient = recipient(nodeId, entry.getKey());
- entry.getValue().listenAsync(new CIX1<IgniteFuture<QueryResult<K, V>>>() {
- @Override public void applyx(IgniteFuture<QueryResult<K, V>> f) throws IgniteCheckedException {
+ entry.getValue().listenAsync(new CIX1<InternalFuture<QueryResult<K, V>>>() {
+ @Override public void applyx(InternalFuture<QueryResult<K, V>> f) throws IgniteCheckedException {
f.get().closeIfNotShared(recipient);
}
});
@@ -106,8 +106,8 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
for (Map.Entry<Long, GridFutureAdapter<FieldsResult>> entry : fieldsFuts.entrySet()) {
final Object recipient = recipient(nodeId, entry.getKey());
- entry.getValue().listenAsync(new CIX1<IgniteFuture<FieldsResult>>() {
- @Override public void applyx(IgniteFuture<FieldsResult> f)
+ entry.getValue().listenAsync(new CIX1<InternalFuture<FieldsResult>>() {
+ @Override public void applyx(InternalFuture<FieldsResult> f)
throws IgniteCheckedException {
f.get().closeIfNotShared(recipient);
}
@@ -178,7 +178,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
* @param valType Value type.
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildIndexes(Class<?> valType) {
+ public InternalFuture<?> rebuildIndexes(Class<?> valType) {
return rebuildIndexes(valType.getName());
}
@@ -188,7 +188,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
* @param typeName Value type name.
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildIndexes(String typeName) {
+ public InternalFuture<?> rebuildIndexes(String typeName) {
if (!enterBusy())
throw new IllegalStateException("Failed to rebuild indexes (grid is stopping).");
@@ -205,7 +205,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
*
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildAllIndexes() {
+ public InternalFuture<?> rebuildAllIndexes() {
if (!enterBusy())
throw new IllegalStateException("Failed to rebuild indexes (grid is stopping).");
@@ -1472,7 +1472,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
Map<Long, GridFutureAdapter<QueryResult<K, V>>> futs = qryIters.get(sndId);
if (futs != null) {
- IgniteFuture<QueryResult<K, V>> fut;
+ InternalFuture<QueryResult<K, V>> fut;
synchronized (futs) {
fut = futs.remove(reqId);
@@ -1598,7 +1598,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
Map<Long, GridFutureAdapter<FieldsResult>> futs = fieldsQryRes.get(sndId);
if (futs != null) {
- IgniteFuture<FieldsResult> fut;
+ InternalFuture<FieldsResult> fut;
synchronized (futs) {
fut = futs.remove(reqId);
@@ -1692,14 +1692,14 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
Collection<Collection<CacheSqlMetadata>> res = new ArrayList<>(nodes.size() + 1);
- IgniteFuture<Collection<Collection<CacheSqlMetadata>>> rmtFut = null;
+ InternalFuture<Collection<Collection<CacheSqlMetadata>>> rmtFut = null;
// Get metadata from remote nodes.
if (!nodes.isEmpty())
rmtFut = cctx.closures().callAsyncNoFailover(BROADCAST, F.asSet(job), nodes, true);
// Get local metadata.
- IgniteFuture<Collection<CacheSqlMetadata>> locFut = cctx.closures().callLocalSafe(job, true);
+ InternalFuture<Collection<CacheSqlMetadata>> locFut = cctx.closures().callLocalSafe(job, true);
if (rmtFut != null)
res.addAll(rmtFut.get());
@@ -2601,7 +2601,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
throw new UnsupportedOperationException();
}
@@ -2643,7 +2643,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
return new GridFinishedFuture<V>(cctx.kernalContext(), getValue());
}
@@ -2658,7 +2658,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> setAsync(V val, IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException();
}
@@ -2668,7 +2668,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Override public InternalFuture<V> setIfAbsentAsync(V val) {
throw new UnsupportedOperationException();
}
@@ -2678,7 +2678,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<Boolean> setxAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException();
}
@@ -2688,7 +2688,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
throw new UnsupportedOperationException();
}
@@ -2698,7 +2698,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
throw new UnsupportedOperationException();
}
@@ -2708,7 +2708,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Override public InternalFuture<V> replaceAsync(V val) {
throw new UnsupportedOperationException();
}
@@ -2718,7 +2718,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(V val) {
throw new UnsupportedOperationException();
}
@@ -2728,7 +2728,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
throw new UnsupportedOperationException();
}
@@ -2738,7 +2738,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> removeAsync(IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException();
}
@@ -2748,7 +2748,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException();
}
@@ -2758,7 +2758,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Override public InternalFuture<Boolean> removeAsync(V val) {
throw new UnsupportedOperationException();
}
@@ -2783,7 +2783,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
throw new UnsupportedOperationException();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
index 66060e0..177fe66 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
@@ -21,5 +21,5 @@ public interface GridCacheQueryMetadataAware {
/**
* @return Future to retrieve metadata.
*/
- public IgniteFuture<List<GridQueryFieldMetadata>> metadata();
+ public InternalFuture<List<GridQueryFieldMetadata>> metadata();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
index 75453ee..548c1ba 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
@@ -231,7 +231,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
assert impl != null;
ctx.denyOnFlag(LOCAL);
@@ -249,7 +249,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -331,7 +331,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> setAsync(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -349,7 +349,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Override public InternalFuture<V> setIfAbsentAsync(V val) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -368,7 +368,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxAsync(V val,
+ @Override public InternalFuture<Boolean> setxAsync(V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
assert impl != null;
@@ -387,7 +387,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -401,7 +401,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
ctx.denyOnFlag(READ);
return new GridFinishedFuture<>(ctx.kernalContext(), false);
@@ -417,7 +417,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Override public InternalFuture<V> replaceAsync(V val) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -435,7 +435,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(V val) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -453,7 +453,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -472,7 +472,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<V> removeAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -490,7 +490,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<Boolean> removexAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -508,7 +508,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Override public InternalFuture<Boolean> removeAsync(V val) {
assert impl != null;
ctx.denyOnFlag(READ);
@@ -553,7 +553,7 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
assert impl != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockDeltaSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockDeltaSnapshot.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockDeltaSnapshot.java
index 77aa057..a60922b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockDeltaSnapshot.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockDeltaSnapshot.java
@@ -86,9 +86,9 @@ public class GridClockDeltaSnapshot {
* Awaits either until snapshot is ready or timeout elapses.
*
* @param timeout Timeout to wait.
- * @throws GridInterruptedException If wait was interrupted.
+ * @throws InternalInterruptedException If wait was interrupted.
*/
- public synchronized void awaitReady(long timeout) throws GridInterruptedException {
+ public synchronized void awaitReady(long timeout) throws InternalInterruptedException {
long start = System.currentTimeMillis();
try {
@@ -104,7 +104,7 @@ public class GridClockDeltaSnapshot {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockServer.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockServer.java
index 60ef4c7..3d2a970 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockServer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockServer.java
@@ -167,7 +167,7 @@ public class GridClockServer {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
DatagramPacket packet = new DatagramPacket(new byte[GridClockMessage.PACKET_SIZE],
GridClockMessage.PACKET_SIZE);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockSyncProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockSyncProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockSyncProcessor.java
index 31b1e14..f3fedf3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockSyncProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/clock/GridClockSyncProcessor.java
@@ -332,7 +332,7 @@ public class GridClockSyncProcessor extends GridProcessorAdapter {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!isCancelled()) {
GridDiscoveryTopologySnapshot top = lastSnapshot;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
index f19327e..ad1c0d8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
@@ -114,7 +114,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Task execution future.
*/
- public IgniteFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs,
+ public InternalFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs,
@Nullable Collection<ClusterNode> nodes) {
return runAsync(mode, jobs, nodes, false);
}
@@ -126,7 +126,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param sys If {@code true}, then system pool will be used.
* @return Task execution future.
*/
- public IgniteFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs,
+ public InternalFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs,
@Nullable Collection<ClusterNode> nodes, boolean sys) {
assert mode != null;
@@ -154,7 +154,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Task execution future.
*/
- public IgniteFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job,
+ public InternalFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job,
@Nullable Collection<ClusterNode> nodes) {
return runAsync(mode, job, nodes, false);
}
@@ -166,7 +166,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param sys If {@code true}, then system pool will be used.
* @return Task execution future.
*/
- public IgniteFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job,
+ public InternalFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job,
@Nullable Collection<ClusterNode> nodes, boolean sys) {
assert mode != null;
@@ -294,7 +294,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R2> Type.
* @return Reduced result.
*/
- public <R1, R2> IgniteFuture<R2> forkjoinAsync(GridClosureCallMode mode,
+ public <R1, R2> InternalFuture<R2> forkjoinAsync(GridClosureCallMode mode,
@Nullable Collection<? extends Callable<R1>> jobs,
@Nullable IgniteReducer<R1, R2> rdc, @Nullable Collection<ClusterNode> nodes) {
assert mode != null;
@@ -324,7 +324,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<Collection<R>> callAsync(
+ public <R> InternalFuture<Collection<R>> callAsync(
GridClosureCallMode mode,
@Nullable Collection<? extends Callable<R>> jobs,
@Nullable Collection<ClusterNode> nodes) {
@@ -339,7 +339,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<Collection<R>> callAsync(GridClosureCallMode mode,
+ public <R> InternalFuture<Collection<R>> callAsync(GridClosureCallMode mode,
@Nullable Collection<? extends Callable<R>> jobs, @Nullable Collection<ClusterNode> nodes,
boolean sys) {
assert mode != null;
@@ -370,7 +370,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<R> callAsync(GridClosureCallMode mode,
+ public <R> InternalFuture<R> callAsync(GridClosureCallMode mode,
@Nullable Callable<R> job, @Nullable Collection<ClusterNode> nodes) {
return callAsync(mode, job, nodes, false);
}
@@ -382,7 +382,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Job future.
*/
- public <R> IgniteFuture<R> affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job,
+ public <R> InternalFuture<R> affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -412,7 +412,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Job future.
*/
- public IgniteFuture<?> affinityRun(@Nullable String cacheName, Object affKey, Runnable job,
+ public InternalFuture<?> affinityRun(@Nullable String cacheName, Object affKey, Runnable job,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -443,7 +443,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<R> callAsyncNoFailover(GridClosureCallMode mode, @Nullable Callable<R> job,
+ public <R> InternalFuture<R> callAsyncNoFailover(GridClosureCallMode mode, @Nullable Callable<R> job,
@Nullable Collection<ClusterNode> nodes, boolean sys) {
assert mode != null;
@@ -474,7 +474,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<Collection<R>> callAsyncNoFailover(GridClosureCallMode mode,
+ public <R> InternalFuture<Collection<R>> callAsyncNoFailover(GridClosureCallMode mode,
@Nullable Collection<? extends Callable<R>> jobs, @Nullable Collection<ClusterNode> nodes,
boolean sys) {
assert mode != null;
@@ -506,7 +506,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
- public <R> IgniteFuture<R> callAsync(GridClosureCallMode mode,
+ public <R> InternalFuture<R> callAsync(GridClosureCallMode mode,
@Nullable Callable<R> job, @Nullable Collection<ClusterNode> nodes, boolean sys) {
assert mode != null;
@@ -534,7 +534,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Grid future for execution result.
*/
- public <T, R> IgniteFuture<R> callAsync(IgniteClosure<T, R> job, @Nullable T arg,
+ public <T, R> InternalFuture<R> callAsync(IgniteClosure<T, R> job, @Nullable T arg,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -557,7 +557,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Grid future for execution result.
*/
- public <T, R> IgniteFuture<Collection<R>> broadcast(IgniteClosure<T, R> job, @Nullable T arg,
+ public <T, R> InternalFuture<Collection<R>> broadcast(IgniteClosure<T, R> job, @Nullable T arg,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -580,7 +580,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Grid future for execution result.
*/
- public <T, R> IgniteFuture<Collection<R>> broadcastNoFailover(IgniteClosure<T, R> job, @Nullable T arg,
+ public <T, R> InternalFuture<Collection<R>> broadcastNoFailover(IgniteClosure<T, R> job, @Nullable T arg,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -604,7 +604,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Grid future for execution result.
*/
- public <T, R> IgniteFuture<Collection<R>> callAsync(IgniteClosure<T, R> job, @Nullable Collection<? extends T> args,
+ public <T, R> InternalFuture<Collection<R>> callAsync(IgniteClosure<T, R> job, @Nullable Collection<? extends T> args,
@Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -628,7 +628,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param nodes Grid nodes.
* @return Grid future for execution result.
*/
- public <T, R1, R2> IgniteFuture<R2> callAsync(IgniteClosure<T, R1> job,
+ public <T, R1, R2> InternalFuture<R2> callAsync(IgniteClosure<T, R1> job,
Collection<? extends T> args, IgniteReducer<R1, R2> rdc, @Nullable Collection<ClusterNode> nodes) {
enterBusy();
@@ -695,7 +695,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @return Future.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
- private IgniteFuture<?> runLocal(@Nullable final Runnable c, boolean sys) throws IgniteCheckedException {
+ private InternalFuture<?> runLocal(@Nullable final Runnable c, boolean sys) throws IgniteCheckedException {
return runLocal(c, sys ? GridClosurePolicy.SYSTEM_POOL : GridClosurePolicy.PUBLIC_POOL);
}
@@ -705,7 +705,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @return Future.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
- private IgniteFuture<?> runLocal(@Nullable final Runnable c, GridClosurePolicy plc) throws IgniteCheckedException {
+ private InternalFuture<?> runLocal(@Nullable final Runnable c, GridClosurePolicy plc) throws IgniteCheckedException {
if (c == null)
return new GridFinishedFuture(ctx);
@@ -770,7 +770,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param c Closure to execute.
* @return Future.
*/
- public IgniteFuture<?> runLocalSafe(Runnable c) {
+ public InternalFuture<?> runLocalSafe(Runnable c) {
return runLocalSafe(c, true);
}
@@ -782,7 +782,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param sys If {@code true}, then system pool will be used, otherwise public pool will be used.
* @return Future.
*/
- public IgniteFuture<?> runLocalSafe(Runnable c, boolean sys) {
+ public InternalFuture<?> runLocalSafe(Runnable c, boolean sys) {
return runLocalSafe(c, sys ? GridClosurePolicy.SYSTEM_POOL : GridClosurePolicy.PUBLIC_POOL);
}
@@ -794,7 +794,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param plc Policy to choose executor pool.
* @return Future.
*/
- public IgniteFuture<?> runLocalSafe(Runnable c, GridClosurePolicy plc) {
+ public InternalFuture<?> runLocalSafe(Runnable c, GridClosurePolicy plc) {
try {
return runLocal(c, plc);
}
@@ -831,7 +831,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @return Future.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
- private <R> IgniteFuture<R> callLocal(@Nullable final Callable<R> c, boolean sys) throws IgniteCheckedException {
+ private <R> InternalFuture<R> callLocal(@Nullable final Callable<R> c, boolean sys) throws IgniteCheckedException {
return callLocal(c, sys ? GridClosurePolicy.SYSTEM_POOL : GridClosurePolicy.PUBLIC_POOL);
}
@@ -842,7 +842,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @return Future.
* @throws IgniteCheckedException Thrown in case of any errors.
*/
- private <R> IgniteFuture<R> callLocal(@Nullable final Callable<R> c, GridClosurePolicy plc) throws IgniteCheckedException {
+ private <R> InternalFuture<R> callLocal(@Nullable final Callable<R> c, GridClosurePolicy plc) throws IgniteCheckedException {
if (c == null)
return new GridFinishedFuture<>(ctx);
@@ -905,7 +905,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param c Closure to execute.
* @return Future.
*/
- public <R> IgniteFuture<R> callLocalSafe(Callable<R> c) {
+ public <R> InternalFuture<R> callLocalSafe(Callable<R> c) {
return callLocalSafe(c, true);
}
@@ -917,7 +917,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param sys If {@code true}, then system pool will be used, otherwise public pool will be used.
* @return Future.
*/
- public <R> IgniteFuture<R> callLocalSafe(Callable<R> c, boolean sys) {
+ public <R> InternalFuture<R> callLocalSafe(Callable<R> c, boolean sys) {
return callLocalSafe(c, sys ? GridClosurePolicy.SYSTEM_POOL : GridClosurePolicy.PUBLIC_POOL);
}
@@ -929,7 +929,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param plc Policy to choose executor pool.
* @return Future.
*/
- public <R> IgniteFuture<R> callLocalSafe(Callable<R> c, GridClosurePolicy plc) {
+ public <R> InternalFuture<R> callLocalSafe(Callable<R> c, GridClosurePolicy plc) {
try {
return callLocal(c, plc);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/continuous/GridContinuousProcessor.java
index 14d89f3..4198cf8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/continuous/GridContinuousProcessor.java
@@ -343,7 +343,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
* @return Future.
*/
@SuppressWarnings("TooBroadScope")
- public IgniteFuture<UUID> startRoutine(GridContinuousHandler hnd, int bufSize, long interval,
+ public InternalFuture<UUID> startRoutine(GridContinuousHandler hnd, int bufSize, long interval,
boolean autoUnsubscribe, @Nullable IgnitePredicate<ClusterNode> prjPred) {
assert hnd != null;
assert bufSize > 0;
@@ -529,7 +529,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
* @param routineId Consume ID.
* @return Future.
*/
- public IgniteFuture<?> stopRoutine(UUID routineId) {
+ public InternalFuture<?> stopRoutine(UUID routineId) {
assert routineId != null;
boolean doStop = false;
@@ -905,7 +905,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
try {
U.sleep(interval0);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
break;
}
@@ -1058,7 +1058,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
break;
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw e;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoadUpdateJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoadUpdateJob.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoadUpdateJob.java
index 8b01cb3..93982b5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoadUpdateJob.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoadUpdateJob.java
@@ -73,7 +73,7 @@ class GridDataLoadUpdateJob<K, V> implements GridPlainCallable<Object> {
GridCacheAdapter<Object, Object> cache = ctx.cache().internalCache(cacheName);
- IgniteFuture<?> f = cache.context().preloader().startFuture();
+ InternalFuture<?> f = cache.context().preloader().startFuture();
if (!f.isDone())
f.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessor.java
index 10f0487..8645899 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessor.java
@@ -73,7 +73,7 @@ public class GridDataLoaderProcessor<K, V> extends GridProcessorAdapter {
return;
flusher = new IgniteThread(new GridWorker(ctx.gridName(), "grid-data-loader-flusher", log) {
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!isCancelled()) {
IgniteDataLoaderImpl<K, V> ldr = flushQ.take();
@@ -120,7 +120,7 @@ public class GridDataLoaderProcessor<K, V> extends GridProcessorAdapter {
try {
ldr.close(cancel);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
U.warn(log, "Interrupted while waiting for completion of the data loader: " + ldr, e);
}
catch (IgniteCheckedException e) {
@@ -146,8 +146,8 @@ public class GridDataLoaderProcessor<K, V> extends GridProcessorAdapter {
ldrs.add(ldr);
- ldr.future().listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ ldr.future().listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
boolean b = ldrs.remove(ldr);
assert b : "Loader has not been added to set: " + ldr;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/IgniteDataLoaderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/IgniteDataLoaderImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/IgniteDataLoaderImpl.java
index e6ce07e..ce01c22 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/IgniteDataLoaderImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dataload/IgniteDataLoaderImpl.java
@@ -108,12 +108,12 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/** Active futures of this data loader. */
@GridToStringInclude
- private final Collection<IgniteFuture<?>> activeFuts = new GridConcurrentHashSet<>();
+ private final Collection<InternalFuture<?>> activeFuts = new GridConcurrentHashSet<>();
/** Closure to remove from active futures. */
@GridToStringExclude
- private final IgniteInClosure<IgniteFuture<?>> rmvActiveFut = new IgniteInClosure<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ private final IgniteInClosure<InternalFuture<?>> rmvActiveFut = new IgniteInClosure<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
boolean rmv = activeFuts.remove(t);
assert rmv;
@@ -248,7 +248,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> future() {
+ @Override public InternalFuture<?> future() {
return fut;
}
@@ -337,14 +337,14 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> addData(Map<K, V> entries) throws IllegalStateException {
+ @Override public InternalFuture<?> addData(Map<K, V> entries) throws IllegalStateException {
A.notNull(entries, "entries");
return addData(entries.entrySet());
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> addData(Collection<? extends Map.Entry<K, V>> entries) {
+ @Override public InternalFuture<?> addData(Collection<? extends Map.Entry<K, V>> entries) {
A.notEmpty(entries, "entries");
enterBusy();
@@ -374,21 +374,21 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> addData(Map.Entry<K, V> entry) throws IgniteCheckedException, IllegalStateException {
+ @Override public InternalFuture<?> addData(Map.Entry<K, V> entry) throws IgniteCheckedException, IllegalStateException {
A.notNull(entry, "entry");
return addData(F.asList(entry));
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> addData(K key, V val) throws IgniteCheckedException, IllegalStateException {
+ @Override public InternalFuture<?> addData(K key, V val) throws IgniteCheckedException, IllegalStateException {
A.notNull(key, "key");
return addData(new Entry0<>(key, val));
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeData(K key) throws IgniteCheckedException, IllegalStateException {
+ @Override public InternalFuture<?> removeData(K key) throws IgniteCheckedException, IllegalStateException {
return addData(key, null);
}
@@ -468,8 +468,8 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
final Collection<Map.Entry<K, V>> entriesForNode = e.getValue();
- IgniteInClosure<IgniteFuture<?>> lsnr = new IgniteInClosure<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ IgniteInClosure<InternalFuture<?>> lsnr = new IgniteInClosure<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
try {
t.get();
@@ -498,7 +498,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
try {
f = buf.update(entriesForNode, lsnr);
}
- catch (GridInterruptedException e1) {
+ catch (InternalInterruptedException e1) {
resFut.onDone(e1);
return;
@@ -523,11 +523,11 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
private void doFlush() throws IgniteCheckedException {
lastFlushTime = U.currentTimeMillis();
- List<IgniteFuture> activeFuts0 = null;
+ List<InternalFuture> activeFuts0 = null;
int doneCnt = 0;
- for (IgniteFuture<?> f : activeFuts) {
+ for (InternalFuture<?> f : activeFuts) {
if (!f.isDone()) {
if (activeFuts0 == null)
activeFuts0 = new ArrayList<>((int)(activeFuts.size() * 1.2));
@@ -545,10 +545,10 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
return;
while (true) {
- Queue<IgniteFuture<?>> q = null;
+ Queue<InternalFuture<?>> q = null;
for (Buffer buf : bufMappings.values()) {
- IgniteFuture<?> flushFut = buf.flush();
+ InternalFuture<?> flushFut = buf.flush();
if (flushFut != null) {
if (q == null)
@@ -563,7 +563,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
boolean err = false;
- for (IgniteFuture fut = q.poll(); fut != null; fut = q.poll()) {
+ for (InternalFuture fut = q.poll(); fut != null; fut = q.poll()) {
try {
fut.get();
}
@@ -583,7 +583,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
doneCnt = 0;
for (int i = 0; i < activeFuts0.size(); i++) {
- IgniteFuture f = activeFuts0.get(i);
+ InternalFuture f = activeFuts0.get(i);
if (f == null)
doneCnt++;
@@ -623,7 +623,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
* Does not wait for result and does not fail on errors assuming that this method
* should be called periodically.
*/
- @Override public void tryFlush() throws GridInterruptedException {
+ @Override public void tryFlush() throws InternalInterruptedException {
if (!busyLock.enterBusy())
return;
@@ -720,7 +720,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
private final ClusterNode node;
/** Active futures. */
- private final Collection<IgniteFuture<Object>> locFuts;
+ private final Collection<InternalFuture<Object>> locFuts;
/** Buffered entries. */
private List<Map.Entry<K, V>> entries;
@@ -743,8 +743,8 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/** Closure to signal on task finish. */
@GridToStringExclude
- private final IgniteInClosure<IgniteFuture<Object>> signalC = new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ private final IgniteInClosure<InternalFuture<Object>> signalC = new IgniteInClosure<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
signalTaskFinished(t);
}
};
@@ -773,11 +773,11 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/**
* @param newEntries Infos.
* @param lsnr Listener for the operation future.
- * @throws GridInterruptedException If failed.
+ * @throws InternalInterruptedException If failed.
* @return Future for operation.
*/
@Nullable GridFutureAdapter<?> update(Iterable<Map.Entry<K, V>> newEntries,
- IgniteInClosure<IgniteFuture<?>> lsnr) throws GridInterruptedException {
+ IgniteInClosure<InternalFuture<?>> lsnr) throws InternalInterruptedException {
List<Map.Entry<K, V>> entries0 = null;
GridFutureAdapter<Object> curFut0;
@@ -818,10 +818,9 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/**
* @return Future if any submitted.
*
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
*/
- @Nullable
- IgniteFuture<?> flush() throws GridInterruptedException {
+ @Nullable InternalFuture<?> flush() throws InternalInterruptedException {
List<Map.Entry<K, V>> entries0 = null;
GridFutureAdapter<Object> curFut0 = null;
@@ -842,14 +841,14 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
// Create compound future for this flush.
GridCompoundFuture<Object, Object> res = null;
- for (IgniteFuture<Object> f : locFuts) {
+ for (InternalFuture<Object> f : locFuts) {
if (res == null)
res = new GridCompoundFuture<>(ctx);
res.add(f);
}
- for (IgniteFuture<Object> f : reqs.values()) {
+ for (InternalFuture<Object> f : reqs.values()) {
if (res == null)
res = new GridCompoundFuture<>(ctx);
@@ -865,16 +864,16 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/**
* Increments active tasks count.
*
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
*/
- private void incrementActiveTasks() throws GridInterruptedException {
+ private void incrementActiveTasks() throws InternalInterruptedException {
U.acquire(sem);
}
/**
* @param f Future that finished.
*/
- private void signalTaskFinished(IgniteFuture<Object> f) {
+ private void signalTaskFinished(InternalFuture<Object> f) {
assert f != null;
sem.release();
@@ -883,17 +882,17 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
/**
* @param entries Entries to submit.
* @param curFut Current future.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
private void submit(final Collection<Map.Entry<K, V>> entries, final GridFutureAdapter<Object> curFut)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
assert entries != null;
assert !entries.isEmpty();
assert curFut != null;
incrementActiveTasks();
- IgniteFuture<Object> fut;
+ InternalFuture<Object> fut;
if (isLocNode) {
fut = ctx.closure().callLocalSafe(
@@ -901,8 +900,8 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
locFuts.add(fut);
- fut.listenAsync(new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
try {
boolean rmv = locFuts.remove(t);
@@ -1090,7 +1089,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
void cancelAll() {
IgniteCheckedException err = new IgniteCheckedException("Data loader has been cancelled: " + IgniteDataLoaderImpl.this);
- for (IgniteFuture<?> f : locFuts) {
+ for (InternalFuture<?> f : locFuts) {
try {
f.cancel();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dr/GridDrDataLoadCacheUpdater.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dr/GridDrDataLoadCacheUpdater.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dr/GridDrDataLoadCacheUpdater.java
index 3522cf8..8f7a423 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dr/GridDrDataLoadCacheUpdater.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/dr/GridDrDataLoadCacheUpdater.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.dr;
import org.apache.ignite.*;
import org.apache.ignite.dataload.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -42,7 +41,7 @@ public class GridDrDataLoadCacheUpdater<K, V> implements IgniteDataLoadCacheUpda
if (log.isDebugEnabled())
log.debug("Running DR put job [nodeId=" + ctx.localNodeId() + ", cacheName=" + cacheName + ']');
- IgniteFuture<?> f = cache.context().preloader().startFuture();
+ InternalFuture<?> f = cache.context().preloader().startFuture();
if (!f.isDone())
f.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessorAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessorAdapter.java
index ab942f0..0711c70 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessorAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessorAdapter.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.email;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.*;
@@ -61,7 +60,7 @@ public abstract class GridEmailProcessorAdapter extends GridProcessorAdapter {
* @param html HTML format flag.
* @return Future for scheduled email.
*/
- public abstract IgniteFuture<Boolean> schedule(String subj, String body, boolean html);
+ public abstract InternalFuture<Boolean> schedule(String subj, String body, boolean html);
/**
* Schedules sending of given email. If SMTP is disabled - this method is no-op. Emails will be send
@@ -74,5 +73,5 @@ public abstract class GridEmailProcessorAdapter extends GridProcessorAdapter {
* @param addrs Addresses.
* @return Future for scheduled email.
*/
- public abstract IgniteFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs);
+ public abstract InternalFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridNoopEmailProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridNoopEmailProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridNoopEmailProcessor.java
index 5aacb7d..ce4c58b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridNoopEmailProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/email/GridNoopEmailProcessor.java
@@ -37,12 +37,12 @@ public class GridNoopEmailProcessor extends GridEmailProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> schedule(String subj, String body, boolean html) {
+ @Override public InternalFuture<Boolean> schedule(String subj, String body, boolean html) {
return new GridFinishedFuture<>(ctx, true);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs) {
+ @Override public InternalFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs) {
return new GridFinishedFuture<>(ctx, true);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAsyncImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAsyncImpl.java
index e22c0b7..9ff20d3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAsyncImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAsyncImpl.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.fs.mapreduce.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.jetbrains.annotations.*;
import java.net.*;
@@ -128,7 +127,7 @@ public class GridGgfsAsyncImpl extends IgniteAsyncSupportAdapter implements Grid
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
+ @Override public InternalFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
return ggfs.awaitDeletesAsync();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManager.java
index a42f530..2f3fe7b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManager.java
@@ -62,7 +62,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
private GridCache<Object, Object> dataCache;
/** */
- private IgniteFuture<?> dataCacheStartFut;
+ private InternalFuture<?> dataCacheStartFut;
/** Local GGFS metrics. */
private GridGgfsLocalMetrics metrics;
@@ -101,7 +101,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
private long trashPurgeTimeout;
/** On-going remote reads futures. */
- private final ConcurrentHashMap8<GridGgfsBlockKey, IgniteFuture<byte[]>> rmtReadFuts =
+ private final ConcurrentHashMap8<GridGgfsBlockKey, InternalFuture<byte[]>> rmtReadFuts =
new ConcurrentHashMap8<>();
/** Executor service for puts in dual mode */
@@ -229,7 +229,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
// Always wait thread exit.
U.join(delWorker);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
log.warning("Got interrupter while waiting for delete worker to stop (will continue stopping).", e);
}
@@ -370,7 +370,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @return Requested data block or {@code null} if nothing found.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public IgniteFuture<byte[]> dataBlock(final GridGgfsFileInfo fileInfo, final IgniteFsPath path,
+ @Nullable public InternalFuture<byte[]> dataBlock(final GridGgfsFileInfo fileInfo, final IgniteFsPath path,
final long blockIdx, @Nullable final IgniteFsReader secReader)
throws IgniteCheckedException {
//assert validTxState(any); // Allow this method call for any transaction state.
@@ -391,17 +391,17 @@ public class GridGgfsDataManager extends GridGgfsManager {
", blockIdx=" + blockIdx + ']');
}
- IgniteFuture<byte[]> fut = dataCachePrj.getAsync(key);
+ InternalFuture<byte[]> fut = dataCachePrj.getAsync(key);
if (secReader != null) {
- fut = fut.chain(new CX1<IgniteFuture<byte[]>, byte[]>() {
- @Override public byte[] applyx(IgniteFuture<byte[]> fut) throws IgniteCheckedException {
+ fut = fut.chain(new CX1<InternalFuture<byte[]>, byte[]>() {
+ @Override public byte[] applyx(InternalFuture<byte[]> fut) throws IgniteCheckedException {
byte[] res = fut.get();
if (res == null) {
GridFutureAdapter<byte[]> rmtReadFut = new GridFutureAdapter<>(ggfsCtx.kernalContext());
- IgniteFuture<byte[]> oldRmtReadFut = rmtReadFuts.putIfAbsent(key, rmtReadFut);
+ InternalFuture<byte[]> oldRmtReadFut = rmtReadFuts.putIfAbsent(key, rmtReadFut);
if (oldRmtReadFut == null) {
try {
@@ -482,7 +482,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @param fileInfo File info of file opened to write.
* @return Future that will be completed when all ack messages are received or when write failed.
*/
- public IgniteFuture<Boolean> writeStart(GridGgfsFileInfo fileInfo) {
+ public InternalFuture<Boolean> writeStart(GridGgfsFileInfo fileInfo) {
WriteCompletionFuture fut = new WriteCompletionFuture(ggfsCtx.kernalContext(), fileInfo.id());
WriteCompletionFuture oldFut = pendingWrites.putIfAbsent(fileInfo.id(), fut);
@@ -585,7 +585,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @param fileInfo File details to remove data for.
* @return Delete future that will be completed when file is actually erased.
*/
- public IgniteFuture<Object> delete(GridGgfsFileInfo fileInfo) {
+ public InternalFuture<Object> delete(GridGgfsFileInfo fileInfo) {
//assert validTxState(any); // Allow this method call for any transaction state.
if (!fileInfo.isFile()) {
@@ -1039,8 +1039,8 @@ public class GridGgfsDataManager extends GridGgfsManager {
else {
callGgfsLocalSafe(new GridPlainCallable<Object>() {
@Override @Nullable public Object call() throws Exception {
- storeBlocksAsync(blocks).listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut) {
+ storeBlocksAsync(blocks).listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut) {
try {
fut.get();
@@ -1074,7 +1074,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
try {
ggfs.awaitDeletesAsync().get(trashPurgeTimeout);
}
- catch (IgniteFutureTimeoutException ignore) {
+ catch (InternalFutureTimeoutException ignore) {
// Ignore.
}
@@ -1238,7 +1238,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @return Future that will be completed after put is done.
*/
@SuppressWarnings("unchecked")
- private IgniteFuture<?> storeBlocksAsync(Map<GridGgfsBlockKey, byte[]> blocks) {
+ private InternalFuture<?> storeBlocksAsync(Map<GridGgfsBlockKey, byte[]> blocks) {
assert !blocks.isEmpty();
if (dataCachePrj.ggfsDataSpaceUsed() >= dataCachePrj.ggfsDataSpaceMax()) {
@@ -1246,7 +1246,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
try {
ggfs.awaitDeletesAsync().get(trashPurgeTimeout);
}
- catch (IgniteFutureTimeoutException ignore) {
+ catch (InternalFutureTimeoutException ignore) {
// Ignore.
}
@@ -1272,8 +1272,8 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @param blocksMsg Write request message.
*/
private void processBlocksMessage(final UUID nodeId, final GridGgfsBlocksMessage blocksMsg) {
- storeBlocksAsync(blocksMsg.blocks()).listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut) {
+ storeBlocksAsync(blocksMsg.blocks()).listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut) {
IgniteCheckedException err = null;
try {
@@ -1672,7 +1672,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
* @param info File info to delete.
* @return Future which completes when entry is actually removed.
*/
- private IgniteFuture<Object> deleteAsync(GridGgfsFileInfo info) {
+ private InternalFuture<Object> deleteAsync(GridGgfsFileInfo info) {
GridFutureAdapter<Object> fut = new GridFutureAdapter<>(ggfsCtx.kernalContext());
delReqs.offer(F.t(fut, info));
@@ -1681,7 +1681,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
while (!isCancelled()) {
IgniteBiTuple<GridFutureAdapter<Object>, GridGgfsFileInfo> req = delReqs.take();
@@ -1712,7 +1712,7 @@ public class GridGgfsDataManager extends GridGgfsManager {
block));
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// Ignore interruption during shutdown.
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDeleteWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDeleteWorker.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDeleteWorker.java
index 21214b7..9d06b9e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDeleteWorker.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDeleteWorker.java
@@ -171,7 +171,7 @@ public class GridGgfsDeleteWorker extends GridGgfsThread {
else
break;
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// Ignore this exception while stopping.
}
catch (IgniteCheckedException e) {
@@ -296,7 +296,7 @@ public class GridGgfsDeleteWorker extends GridGgfsThread {
try {
fut.get();
}
- catch (IgniteFutureCancelledException ignore) {
+ catch (InternalFutureCancelledException ignore) {
// This future can be cancelled only due to GGFS shutdown.
cancelled = true;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsEx.java
index 2e78702..cdf7bbf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsEx.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.ggfs;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.jetbrains.annotations.*;
import java.net.*;
@@ -93,7 +92,7 @@ public interface GridGgfsEx extends IgniteFs {
* @return Future which will be completed when all entries existed in trash by the time of invocation are removed.
* @throws IgniteCheckedException If failed.
*/
- public IgniteFuture<?> awaitDeletesAsync() throws IgniteCheckedException;
+ public InternalFuture<?> awaitDeletesAsync() throws IgniteCheckedException;
/**
* Gets client file system log directory.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileWorkerBatch.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileWorkerBatch.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileWorkerBatch.java
index a0a82fc..a97e47f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileWorkerBatch.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileWorkerBatch.java
@@ -159,7 +159,7 @@ public class GridGgfsFileWorkerBatch {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
IgniteCheckedException err0 = err;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerManager.java
index 5295f80..91fb098 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerManager.java
@@ -384,7 +384,7 @@ public class GridGgfsFragmentizerManager extends GridGgfsManager {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
// Wait for all previous fragmentizer tasks to complete.
syncStart();
@@ -402,7 +402,7 @@ public class GridGgfsFragmentizerManager extends GridGgfsManager {
}
}
catch (IgniteCheckedException | IgniteException e) {
- if (!X.hasCause(e, InterruptedException.class) && !X.hasCause(e, GridInterruptedException.class))
+ if (!X.hasCause(e, InterruptedException.class) && !X.hasCause(e, InternalInterruptedException.class))
LT.warn(log, e, "Failed to get fragmentizer file info (will retry).");
else {
if (log.isDebugEnabled())
@@ -718,7 +718,7 @@ public class GridGgfsFragmentizerManager extends GridGgfsManager {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!isCancelled()) {
IgniteBiTuple<UUID, GridGgfsCommunicationMessage> req = msgs.take();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsImpl.java
index 44e110f..2bcfbd9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsImpl.java
@@ -17,7 +17,6 @@ import org.apache.ignite.fs.*;
import org.apache.ignite.fs.mapreduce.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.eviction.*;
import org.gridgain.grid.cache.eviction.ggfs.*;
@@ -1543,7 +1542,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
*
* @return Future.
*/
- IgniteFuture<?> formatAsync() throws IgniteCheckedException {
+ InternalFuture<?> formatAsync() throws IgniteCheckedException {
IgniteUuid id = meta.softDelete(null, null, ROOT_ID);
if (id == null)
@@ -1569,7 +1568,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
+ @Override public InternalFuture<?> awaitDeletesAsync() throws IgniteCheckedException {
Collection<IgniteUuid> ids = meta.pendingDeletes();
if (!ids.isEmpty()) {
@@ -1581,7 +1580,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
for (IgniteUuid id : ids) {
GridFutureAdapter<Object> fut = new GridFutureAdapter<>(ggfsCtx.kernalContext());
- IgniteFuture<Object> oldFut = delFuts.putIfAbsent(id, fut);
+ InternalFuture<Object> oldFut = delFuts.putIfAbsent(id, fut);
if (oldFut != null)
resFut.add(oldFut);
@@ -1701,7 +1700,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
* @param arg Optional task argument.
* @return Execution future.
*/
- <T, R> IgniteFuture<R> executeAsync(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr,
+ <T, R> InternalFuture<R> executeAsync(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr,
Collection<IgniteFsPath> paths, @Nullable T arg) {
return executeAsync(task, rslvr, paths, true, cfg.getMaximumTaskRangeLength(), arg);
}
@@ -1720,7 +1719,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
* @param arg Optional task argument.
* @return Execution future.
*/
- <T, R> IgniteFuture<R> executeAsync(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr,
+ <T, R> InternalFuture<R> executeAsync(IgniteFsTask<T, R> task, @Nullable IgniteFsRecordResolver rslvr,
Collection<IgniteFsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg) {
return ggfsCtx.kernalContext().task().execute(task, new IgniteFsTaskArgsImpl<>(cfg.getName(), paths, rslvr,
skipNonExistentFiles, maxRangeLen, arg));
@@ -1735,7 +1734,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
* @param arg Optional task argument.
* @return Execution future.
*/
- <T, R> IgniteFuture<R> executeAsync(Class<? extends IgniteFsTask<T, R>> taskCls,
+ <T, R> InternalFuture<R> executeAsync(Class<? extends IgniteFsTask<T, R>> taskCls,
@Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, @Nullable T arg) {
return executeAsync(taskCls, rslvr, paths, true, cfg.getMaximumTaskRangeLength(), arg);
}
@@ -1753,7 +1752,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
* @param arg Optional task argument.
* @return Execution future.
*/
- <T, R> IgniteFuture<R> executeAsync(Class<? extends IgniteFsTask<T, R>> taskCls,
+ <T, R> InternalFuture<R> executeAsync(Class<? extends IgniteFsTask<T, R>> taskCls,
@Nullable IgniteFsRecordResolver rslvr, Collection<IgniteFsPath> paths, boolean skipNonExistentFiles,
long maxRangeLen, @Nullable T arg) {
return ggfsCtx.kernalContext().task().execute((Class<IgniteFsTask<T, R>>)taskCls,
@@ -1828,7 +1827,7 @@ public final class GridGgfsImpl implements GridGgfsEx {
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> future() {
+ @Override public <R> InternalFuture<R> future() {
throw new IllegalStateException("Asynchronous mode is not enabled.");
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsInputStreamImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsInputStreamImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsInputStreamImpl.java
index d34c4c8..809f938 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsInputStreamImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsInputStreamImpl.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.ggfs;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
@@ -52,13 +51,13 @@ public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter {
private long pos;
/** Local cache. */
- private final Map<Long, IgniteFuture<byte[]>> locCache;
+ private final Map<Long, InternalFuture<byte[]>> locCache;
/** Maximum local cache size. */
private final int maxLocCacheSize;
/** Pending data read futures which were evicted from the local cache before completion. */
- private final Set<IgniteFuture<byte[]>> pendingFuts;
+ private final Set<InternalFuture<byte[]>> pendingFuts;
/** Pending futures lock. */
private final Lock pendingFutsLock = new ReentrantLock();
@@ -273,7 +272,7 @@ public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter {
secReader.close();
// Ensuring local cache futures completion.
- for (IgniteFuture<byte[]> fut : locCache.values()) {
+ for (InternalFuture<byte[]> fut : locCache.values()) {
try {
fut.get();
}
@@ -420,7 +419,7 @@ public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter {
private byte[] block(long blockIdx) throws IOException, IgniteCheckedException {
assert blockIdx >= 0;
- IgniteFuture<byte[]> bytesFut = locCache.get(blockIdx);
+ InternalFuture<byte[]> bytesFut = locCache.get(blockIdx);
if (bytesFut == null) {
if (closed)
@@ -475,18 +474,18 @@ public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter {
* @param idx Block index.
* @param fut Future.
*/
- private void addLocalCacheFuture(long idx, IgniteFuture<byte[]> fut) {
+ private void addLocalCacheFuture(long idx, InternalFuture<byte[]> fut) {
assert Thread.holdsLock(this);
if (!locCache.containsKey(idx)) {
if (locCache.size() == maxLocCacheSize) {
- final IgniteFuture<byte[]> evictFut = locCache.remove(locCache.keySet().iterator().next());
+ final InternalFuture<byte[]> evictFut = locCache.remove(locCache.keySet().iterator().next());
if (!evictFut.isDone()) {
pendingFuts.add(evictFut);
- evictFut.listenAsync(new IgniteInClosure<IgniteFuture<byte[]>>() {
- @Override public void apply(IgniteFuture<byte[]> t) {
+ evictFut.listenAsync(new IgniteInClosure<InternalFuture<byte[]>>() {
+ @Override public void apply(InternalFuture<byte[]> t) {
pendingFuts.remove(evictFut);
pendingFutsLock.lock();
@@ -514,7 +513,7 @@ public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter {
* @return Requested data block or {@code null} if nothing found.
* @throws IgniteCheckedException If failed.
*/
- @Nullable protected IgniteFuture<byte[]> dataBlock(GridGgfsFileInfo fileInfo, long blockIdx) throws IgniteCheckedException {
+ @Nullable protected InternalFuture<byte[]> dataBlock(GridGgfsFileInfo fileInfo, long blockIdx) throws IgniteCheckedException {
return data.dataBlock(fileInfo, path, blockIdx, secReader);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsIpcHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsIpcHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsIpcHandler.java
index 3b8c72b..eac3934 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsIpcHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsIpcHandler.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.ggfs;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.ggfs.common.*;
import org.gridgain.grid.kernal.processors.closure.*;
@@ -97,7 +96,7 @@ class GridGgfsIpcHandler implements GridGgfsServerHandler {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridGgfsMessage> handleAsync(final GridGgfsClientSession ses,
+ @Override public InternalFuture<GridGgfsMessage> handleAsync(final GridGgfsClientSession ses,
final GridGgfsMessage msg, DataInput in) {
if (!mgmt)
GridLicenseUseRegistry.onUsage(HADOOP, getClass());
@@ -109,7 +108,7 @@ class GridGgfsIpcHandler implements GridGgfsServerHandler {
final GridGgfsIpcCommand cmd = msg.command();
- IgniteFuture<GridGgfsMessage> fut;
+ InternalFuture<GridGgfsMessage> fut;
switch (cmd) {
// Execute not-blocking command synchronously in worker thread.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManager.java
index 7ea2c03..cc13c89 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManager.java
@@ -46,7 +46,7 @@ public class GridGgfsMetaManager extends GridGgfsManager {
private GridCache<Object, Object> metaCache;
/** */
- private IgniteFuture<?> metaCacheStartFut;
+ private InternalFuture<?> metaCacheStartFut;
/** File ID to file info projection. */
private GridCacheProjectionEx<IgniteUuid, GridGgfsFileInfo> id2InfoPrj;
@@ -127,7 +127,7 @@ public class GridGgfsMetaManager extends GridGgfsManager {
try {
U.join(delWorker0);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
}
@@ -1663,12 +1663,12 @@ public class GridGgfsMetaManager extends GridGgfsManager {
id2InfoPrj.transform(parentInfo.id(),
new UpdateListing(path.name(), new GridGgfsListingEntry(newInfo), false));
- IgniteFuture<?> delFut = ggfsCtx.data().delete(oldInfo);
+ InternalFuture<?> delFut = ggfsCtx.data().delete(oldInfo);
// Record PURGE event if needed.
if (evts.isRecordable(EVT_GGFS_FILE_PURGED)) {
- delFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ delFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
try {
t.get(); // Ensure delete succeeded.
[08/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServer.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServer.java
index ac5b3f3..c8dc7ec 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServer.java
@@ -220,7 +220,7 @@ public class GridGgfsServer {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
GridGgfsDataInputStream dis = new GridGgfsDataInputStream(endpoint.inputStream());
@@ -249,7 +249,7 @@ public class GridGgfsServer {
GridGgfsMessage msg = marsh.unmarshall(cmd, hdr, dis);
- IgniteFuture<GridGgfsMessage> fut = hnd.handleAsync(ses, msg, dis);
+ InternalFuture<GridGgfsMessage> fut = hnd.handleAsync(ses, msg, dis);
// If fut is null, no response is required.
if (fut != null) {
@@ -280,8 +280,8 @@ public class GridGgfsServer {
}
}
else {
- fut.listenAsync(new CIX1<IgniteFuture<GridGgfsMessage>>() {
- @Override public void applyx(IgniteFuture<GridGgfsMessage> fut) {
+ fut.listenAsync(new CIX1<InternalFuture<GridGgfsMessage>>() {
+ @Override public void applyx(InternalFuture<GridGgfsMessage> fut) {
GridGgfsMessage res;
try {
@@ -381,7 +381,7 @@ public class GridGgfsServer {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
while (!Thread.currentThread().isInterrupted()) {
GridIpcEndpoint client = srvEndpoint.accept();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerHandler.java
index 5927d01..433a611 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerHandler.java
@@ -30,7 +30,7 @@ public interface GridGgfsServerHandler {
* @return Future that will be completed when response is ready or {@code null} if no
* response is required.
*/
- @Nullable public IgniteFuture<GridGgfsMessage> handleAsync(GridGgfsClientSession ses,
+ @Nullable public InternalFuture<GridGgfsMessage> handleAsync(GridGgfsClientSession ses,
GridGgfsMessage msg, DataInput in);
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/IgniteFsOutputStreamImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/IgniteFsOutputStreamImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/IgniteFsOutputStreamImpl.java
index 04ab237..7d124c7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/IgniteFsOutputStreamImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/IgniteFsOutputStreamImpl.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.ggfs;
import org.apache.ignite.*;
import org.apache.ignite.fs.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.processors.task.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.grid.util.future.*;
@@ -61,7 +60,7 @@ class IgniteFsOutputStreamImpl extends IgniteFsOutputStreamAdapter {
private int remainderDataLen;
/** Write completion future. */
- private final IgniteFuture<Boolean> writeCompletionFut;
+ private final InternalFuture<Boolean> writeCompletionFut;
/** GGFS mode. */
private final IgniteFsMode mode;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopNoopProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopNoopProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopNoopProcessor.java
index 6cc26ca..edc2f40 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopNoopProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopNoopProcessor.java
@@ -42,7 +42,7 @@ public class GridHadoopNoopProcessor extends GridHadoopProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
+ @Override public InternalFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
return new GridFinishedFutureEx<>(new IgniteCheckedException("Hadoop is not available."));
}
@@ -57,7 +57,7 @@ public class GridHadoopNoopProcessor extends GridHadoopProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
+ @Override public InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessorAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessorAdapter.java
index a390081..370370a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessorAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessorAdapter.java
@@ -48,7 +48,7 @@ public abstract class GridHadoopProcessorAdapter extends GridProcessorAdapter {
* @param jobInfo Job info to submit.
* @return Execution future.
*/
- public abstract IgniteFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo);
+ public abstract InternalFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo);
/**
* Gets Hadoop job execution status.
@@ -75,7 +75,7 @@ public abstract class GridHadoopProcessorAdapter extends GridProcessorAdapter {
* @return Job finish future or {@code null}.
* @throws IgniteCheckedException If failed.
*/
- public abstract IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException;
+ public abstract InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException;
/**
* Kills job.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/job/GridJobWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/job/GridJobWorker.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/job/GridJobWorker.java
index 9d100e3..0ff772a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/job/GridJobWorker.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/job/GridJobWorker.java
@@ -482,7 +482,7 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
}
}
catch (IgniteCheckedException e) {
- if (sysStopping && e.hasCause(GridInterruptedException.class, InterruptedException.class)) {
+ if (sysStopping && e.hasCause(InternalInterruptedException.class, InterruptedException.class)) {
ex = handleThrowable(e);
assert ex != null;
@@ -553,7 +553,7 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
ex = new ComputeUserUndeclaredException(msg, e);
}
- else if (sysStopping && X.hasCause(e, InterruptedException.class, GridInterruptedException.class)) {
+ else if (sysStopping && X.hasCause(e, InterruptedException.class, InternalInterruptedException.class)) {
msg = "Job got interrupted due to system stop (will attempt failover).";
ex = new ComputeExecutionRejectedException(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
index 6bc0235..0b746bb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
@@ -160,7 +160,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @param valTypeName Value type name.
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- public IgniteFuture<?> rebuildIndexes(@Nullable final String space, String valTypeName) {
+ public InternalFuture<?> rebuildIndexes(@Nullable final String space, String valTypeName) {
if (!busyLock.enterBusy())
throw new IllegalStateException("Failed to rebuild indexes (grid is stopping).");
@@ -177,7 +177,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @param desc Type descriptor.
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
- private IgniteFuture<?> rebuildIndexes(@Nullable final String space, @Nullable final TypeDescriptor desc) {
+ private InternalFuture<?> rebuildIndexes(@Nullable final String space, @Nullable final TypeDescriptor desc) {
if (idx == null)
return new GridFinishedFuture<>(ctx, new IgniteCheckedException("Indexing is disabled."));
@@ -217,7 +217,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @return Future that will be completed when rebuilding of all indexes is finished.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<?> rebuildAllIndexes() {
+ public InternalFuture<?> rebuildAllIndexes() {
if (!busyLock.enterBusy())
throw new IllegalStateException("Failed to get space size (grid is stopping).");
@@ -225,7 +225,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
GridCompoundFuture<?, ?> fut = new GridCompoundFuture<Object, Object>(ctx);
for (Map.Entry<TypeId, TypeDescriptor> e : types.entrySet())
- fut.add((IgniteFuture)rebuildIndexes(e.getKey().space, e.getValue()));
+ fut.add((InternalFuture)rebuildIndexes(e.getKey().space, e.getValue()));
fut.markInitialized();
@@ -1296,9 +1296,9 @@ public class GridQueryProcessor extends GridProcessorAdapter {
/**
* @return Waits for initialization.
- * @throws GridInterruptedException If thread is interrupted.
+ * @throws InternalInterruptedException If thread is interrupted.
*/
- boolean await() throws GridInterruptedException {
+ boolean await() throws InternalInterruptedException {
return initializer.await();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessor.java
index ae20c07..d32f595 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessor.java
@@ -71,7 +71,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
return handleAsync(req).get();
}
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
return handleAsync0(req);
}
};
@@ -80,7 +80,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
* @param req Request.
* @return Future.
*/
- private IgniteFuture<GridRestResponse> handleAsync0(final GridRestRequest req) {
+ private InternalFuture<GridRestResponse> handleAsync0(final GridRestRequest req) {
if (!busyLock.tryReadLock())
return new GridFinishedFuture<>(ctx,
new IgniteCheckedException("Failed to handle request (received request while stopping grid)."));
@@ -93,10 +93,10 @@ public class GridRestProcessor extends GridProcessorAdapter {
GridWorker w = new GridWorker(ctx.gridName(), "rest-proc-worker", log) {
@Override protected void body() {
try {
- IgniteFuture<GridRestResponse> res = handleRequest(req);
+ InternalFuture<GridRestResponse> res = handleRequest(req);
- res.listenAsync(new IgniteInClosure<IgniteFuture<GridRestResponse>>() {
- @Override public void apply(IgniteFuture<GridRestResponse> f) {
+ res.listenAsync(new IgniteInClosure<InternalFuture<GridRestResponse>>() {
+ @Override public void apply(InternalFuture<GridRestResponse> f) {
try {
fut.onDone(f.get());
}
@@ -142,7 +142,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
* @param req Request.
* @return Future.
*/
- private IgniteFuture<GridRestResponse> handleRequest(final GridRestRequest req) {
+ private InternalFuture<GridRestResponse> handleRequest(final GridRestRequest req) {
if (startLatch.getCount() > 0) {
try {
startLatch.await();
@@ -187,7 +187,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
GridRestCommandHandler hnd = handlers.get(req.command());
- IgniteFuture<GridRestResponse> res = hnd == null ? null : hnd.handleAsync(req);
+ InternalFuture<GridRestResponse> res = hnd == null ? null : hnd.handleAsync(req);
if (res == null)
return new GridFinishedFuture<>(ctx,
@@ -195,8 +195,8 @@ public class GridRestProcessor extends GridProcessorAdapter {
final GridSecurityContext subjCtx0 = subjCtx;
- return res.chain(new C1<IgniteFuture<GridRestResponse>, GridRestResponse>() {
- @Override public GridRestResponse apply(IgniteFuture<GridRestResponse> f) {
+ return res.chain(new C1<InternalFuture<GridRestResponse>, GridRestResponse>() {
+ @Override public GridRestResponse apply(InternalFuture<GridRestResponse> f) {
GridRestResponse res;
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProtocolHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProtocolHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProtocolHandler.java
index e05a6b8..504fa08 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProtocolHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/GridRestProtocolHandler.java
@@ -28,5 +28,5 @@ public interface GridRestProtocolHandler {
* @param req Request.
* @return Future.
*/
- public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req);
+ public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/GridRestCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/GridRestCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/GridRestCommandHandler.java
index 8614e7e..0a24495 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/GridRestCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/GridRestCommandHandler.java
@@ -28,5 +28,5 @@ public interface GridRestCommandHandler {
* @param req Request.
* @return Future.
*/
- public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req);
+ public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index 1bab28a..312eef3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.datastructures.*;
import org.gridgain.grid.kernal.*;
@@ -117,7 +116,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(final GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(final GridRestRequest req) {
assert req instanceof GridRestCacheRequest : "Invalid command for topology handler: " + req;
assert SUPPORTED_COMMANDS.contains(req.command());
@@ -143,7 +142,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
final Long ttl = req0.ttl();
- IgniteFuture<GridRestResponse> fut;
+ InternalFuture<GridRestResponse> fut;
switch (cmd) {
case CACHE_GET: {
@@ -327,7 +326,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* @return Operation result in future.
* @throws IgniteCheckedException If failed
*/
- private IgniteFuture<GridRestResponse> executeCommand(
+ private InternalFuture<GridRestResponse> executeCommand(
@Nullable UUID destId,
UUID clientId,
final String cacheName,
@@ -372,7 +371,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* @return Operation result in future.
* @throws IgniteCheckedException If failed
*/
- private IgniteFuture<GridRestResponse> executeCommand(
+ private InternalFuture<GridRestResponse> executeCommand(
@Nullable UUID destId,
UUID clientId,
final String cacheName,
@@ -407,7 +406,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* @return Future of operation result.
* @throws IgniteCheckedException In case of error.
*/
- private static IgniteFuture<?> incrementOrDecrement(GridCacheProjection<Object, Object> cache, String key,
+ private static InternalFuture<?> incrementOrDecrement(GridCacheProjection<Object, Object> cache, String key,
GridRestCacheRequest req, final boolean decr) throws IgniteCheckedException {
assert cache != null;
assert key != null;
@@ -441,7 +440,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* @return Future of operation result.
* @throws IgniteCheckedException In case of any exception.
*/
- private static IgniteFuture<?> appendOrPrepend(
+ private static InternalFuture<?> appendOrPrepend(
final GridKernalContext ctx,
final GridCacheProjection<Object, Object> cache,
final Object key, GridRestCacheRequest req, final boolean prepend) throws IgniteCheckedException {
@@ -545,10 +544,10 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* @param key Affinity key for previous operation.
* @return Rest response.
*/
- private static IgniteClosure<IgniteFuture<?>, GridRestResponse> resultWrapper(
+ private static IgniteClosure<InternalFuture<?>, GridRestResponse> resultWrapper(
final GridCacheProjection<Object, Object> c, @Nullable final Object key) {
- return new CX1<IgniteFuture<?>, GridRestResponse>() {
- @Override public GridRestResponse applyx(IgniteFuture<?> f) throws IgniteCheckedException {
+ return new CX1<InternalFuture<?>, GridRestResponse>() {
+ @Override public GridRestResponse applyx(InternalFuture<?> f) throws IgniteCheckedException {
GridCacheRestResponse resp = new GridCacheRestResponse();
resp.setResponse(f.get());
@@ -607,7 +606,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
/**
* Fixed result closure.
*/
- private static final class FixedResult extends CX1<IgniteFuture<?>, Object> {
+ private static final class FixedResult extends CX1<InternalFuture<?>, Object> {
/** */
private static final long serialVersionUID = 0L;
@@ -622,7 +621,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public Object applyx(IgniteFuture<?> f) throws IgniteCheckedException {
+ @Override public Object applyx(InternalFuture<?> f) throws IgniteCheckedException {
f.get();
return res;
@@ -633,7 +632,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* Type alias.
*/
private abstract static class CacheCommand
- extends IgniteClosure2X<GridCacheProjection<Object, Object>, GridKernalContext, IgniteFuture<?>> {
+ extends IgniteClosure2X<GridCacheProjection<Object, Object>, GridKernalContext, InternalFuture<?>> {
/** */
private static final long serialVersionUID = 0L;
@@ -644,7 +643,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
* Type alias.
*/
private abstract static class CacheProjectionCommand
- extends IgniteClosure2X<GridCacheProjection<Object, Object>, GridKernalContext, IgniteFuture<?>> {
+ extends IgniteClosure2X<GridCacheProjection<Object, Object>, GridKernalContext, InternalFuture<?>> {
/** */
private static final long serialVersionUID = 0L;
@@ -778,7 +777,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return c.getAsync(key);
}
}
@@ -799,7 +798,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return c.getAllAsync(keys);
}
}
@@ -820,7 +819,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return c.putAllAsync(map).chain(new FixedResult(true));
}
}
@@ -841,7 +840,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return c.removexAsync(key);
}
}
@@ -862,7 +861,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return (F.isEmpty(keys) ? c.removeAllAsync() : c.removeAllAsync(keys))
.chain(new FixedResult(true));
}
@@ -894,7 +893,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
return exp == null && val == null ? c.removexAsync(key) :
exp == null ? c.putxIfAbsentAsync(key, val) :
val == null ? c.removeAsync(key, exp) :
@@ -928,7 +927,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
if (ttl != null) {
GridCacheEntry<Object, Object> entry = c.entry(key);
@@ -971,7 +970,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
GridCacheEntry<Object, Object> entry = c.entry(key);
if (entry != null) {
@@ -1011,7 +1010,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
GridCacheEntry<Object, Object> entry = c.entry(key);
if (entry != null) {
@@ -1046,7 +1045,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
throws IgniteCheckedException {
return incrementOrDecrement(c, (String)key, req, false);
}
@@ -1073,7 +1072,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) throws IgniteCheckedException {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) throws IgniteCheckedException {
return incrementOrDecrement(c, (String)key, req, true);
}
}
@@ -1099,7 +1098,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
throws IgniteCheckedException {
return appendOrPrepend(ctx, c, key, req, false);
}
@@ -1126,7 +1125,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx)
throws IgniteCheckedException {
return appendOrPrepend(ctx, c, key, req, true);
}
@@ -1138,7 +1137,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public IgniteFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
+ @Override public InternalFuture<?> applyx(GridCacheProjection<Object, Object> c, GridKernalContext ctx) {
GridCacheMetrics metrics = c.cache().metrics();
assert metrics != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
index 3303b41..f15691e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.query.*;
import org.gridgain.grid.kernal.*;
@@ -62,7 +61,7 @@ public class GridCacheQueryCommandHandler extends GridRestCommandHandlerAdapter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
assert req instanceof GridRestCacheQueryRequest;
assert SUPPORTED_COMMANDS.contains(req.command());
@@ -107,7 +106,7 @@ public class GridCacheQueryCommandHandler extends GridRestCommandHandlerAdapter
* @param c Closure to execute.
* @return Execution future.
*/
- private IgniteFuture<GridRestResponse> execute(UUID destId, String cacheName, Callable<GridRestResponse> c) {
+ private InternalFuture<GridRestResponse> execute(UUID destId, String cacheName, Callable<GridRestResponse> c) {
boolean locExec = destId == null || destId.equals(ctx.localNodeId()) || replicatedCacheAvailable(cacheName);
if (locExec)
@@ -136,16 +135,16 @@ public class GridCacheQueryCommandHandler extends GridRestCommandHandlerAdapter
* @param c Closure to execute.
* @return Execution future.
*/
- private IgniteFuture<GridRestResponse> broadcast(String cacheName, Callable<Object> c) {
+ private InternalFuture<GridRestResponse> broadcast(String cacheName, Callable<Object> c) {
IgniteCompute comp = ctx.grid().compute(ctx.grid().forCache(cacheName)).withNoFailover().enableAsync();
try {
comp.broadcast(c);
- IgniteFuture<Collection<Object>> fut = comp.future();
+ InternalFuture<Collection<Object>> fut = comp.future();
- return fut.chain(new C1<IgniteFuture<Collection<Object>>, GridRestResponse>() {
- @Override public GridRestResponse apply(IgniteFuture<Collection<Object>> fut) {
+ return fut.chain(new C1<InternalFuture<Collection<Object>>, GridRestResponse>() {
+ @Override public GridRestResponse apply(InternalFuture<Collection<Object>> fut) {
try {
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/log/GridLogCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/log/GridLogCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/log/GridLogCommandHandler.java
index e8ecf93..470f66d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/log/GridLogCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/log/GridLogCommandHandler.java
@@ -74,7 +74,7 @@ public class GridLogCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
assert req instanceof GridRestLogRequest : "Invalid command for topology handler: " + req;
assert SUPPORTED_COMMANDS.contains(req.command());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
index 8e547b1..c763589 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.rest.handlers.metadata;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.portables.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.rest.*;
import org.gridgain.grid.kernal.processors.rest.client.message.*;
@@ -48,7 +47,7 @@ public class GridPortableMetadataHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
assert SUPPORTED_COMMANDS.contains(req.command()) : req.command();
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskCommandHandler.java
index 77cf114..02dd6c1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskCommandHandler.java
@@ -16,7 +16,6 @@ import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.portables.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.managers.communication.*;
import org.gridgain.grid.kernal.managers.eventstorage.*;
@@ -121,7 +120,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
try {
return handleAsyncUnsafe(req);
}
@@ -141,7 +140,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
* @return Future.
* @throws IgniteCheckedException On any handling exception.
*/
- private IgniteFuture<GridRestResponse> handleAsyncUnsafe(final GridRestRequest req) throws IgniteCheckedException {
+ private InternalFuture<GridRestResponse> handleAsyncUnsafe(final GridRestRequest req) throws IgniteCheckedException {
assert req instanceof GridRestTaskRequest : "Invalid command for topology handler: " + req;
assert SUPPORTED_COMMANDS.contains(req.command());
@@ -178,7 +177,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
final UUID clientId = req.clientId();
- final ComputeTaskFuture<Object> taskFut;
+ final InternalComputeTaskFuture<Object> taskFut;
if (locExec) {
ClusterGroup prj = ctx.grid().forSubjectId(clientId);
@@ -219,8 +218,8 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
fut.onDone(res);
}
- taskFut.listenAsync(new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> f) {
+ taskFut.listenAsync(new IgniteInClosure<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> f) {
try {
TaskDescriptor desc;
@@ -240,9 +239,9 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
}
if (async && locExec) {
- assert taskFut instanceof ComputeTaskFuture;
+ assert taskFut instanceof InternalComputeTaskFuture;
- IgniteUuid tid = ((ComputeTaskFuture)taskFut).getTaskSession().getId();
+ IgniteUuid tid = ((InternalComputeTaskFuture)taskFut).getTaskSession().getId();
taskDescs.put(tid, desc);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/top/GridTopologyCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/top/GridTopologyCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/top/GridTopologyCommandHandler.java
index 4116368..7efaa34 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/top/GridTopologyCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/top/GridTopologyCommandHandler.java
@@ -51,7 +51,7 @@ public class GridTopologyCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
assert req instanceof GridRestTopologyRequest : "Invalid command for topology handler: " + req;
assert SUPPORTED_COMMANDS.contains(req.command());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/version/GridVersionCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/version/GridVersionCommandHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/version/GridVersionCommandHandler.java
index 864f772..014379e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/version/GridVersionCommandHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/version/GridVersionCommandHandler.java
@@ -42,7 +42,7 @@ public class GridVersionCommandHandler extends GridRestCommandHandlerAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+ @Override public InternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
assert req != null;
assert SUPPORTED_COMMANDS.contains(req.command());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
index 7b28af5..8e29ceb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.jdk.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.rest.*;
import org.gridgain.grid.kernal.processors.rest.handlers.cache.*;
@@ -113,20 +112,20 @@ public class GridTcpMemcachedNioListener extends GridNioServerListenerAdapter<Gr
return;
}
- IgniteFuture<GridRestResponse> lastFut = ses.removeMeta(LAST_FUT.ordinal());
+ InternalFuture<GridRestResponse> lastFut = ses.removeMeta(LAST_FUT.ordinal());
if (lastFut != null && lastFut.isDone())
lastFut = null;
- IgniteFuture<GridRestResponse> f;
+ InternalFuture<GridRestResponse> f;
if (lastFut == null)
f = handleRequest0(ses, req, cmd);
else {
f = new GridEmbeddedFuture<>(
lastFut,
- new C2<GridRestResponse, Exception, IgniteFuture<GridRestResponse>>() {
- @Override public IgniteFuture<GridRestResponse> apply(GridRestResponse res, Exception e) {
+ new C2<GridRestResponse, Exception, InternalFuture<GridRestResponse>>() {
+ @Override public InternalFuture<GridRestResponse> apply(GridRestResponse res, Exception e) {
return handleRequest0(ses, req, cmd);
}
},
@@ -143,7 +142,7 @@ public class GridTcpMemcachedNioListener extends GridNioServerListenerAdapter<Gr
* @param cmd Command.
* @return Future or {@code null} if processed immediately.
*/
- @Nullable private IgniteFuture<GridRestResponse> handleRequest0(
+ @Nullable private InternalFuture<GridRestResponse> handleRequest0(
final GridNioSession ses,
final GridMemcachedMessage req,
final GridTuple3<GridRestCommand, Boolean, Boolean> cmd
@@ -158,10 +157,10 @@ public class GridTcpMemcachedNioListener extends GridNioServerListenerAdapter<Gr
return null;
}
- IgniteFuture<GridRestResponse> f = hnd.handleAsync(createRestRequest(req, cmd.get1()));
+ InternalFuture<GridRestResponse> f = hnd.handleAsync(createRestRequest(req, cmd.get1()));
- f.listenAsync(new CIX1<IgniteFuture<GridRestResponse>>() {
- @Override public void applyx(IgniteFuture<GridRestResponse> f) throws IgniteCheckedException {
+ f.listenAsync(new CIX1<InternalFuture<GridRestResponse>>() {
+ @Override public void applyx(InternalFuture<GridRestResponse> f) throws IgniteCheckedException {
GridRestResponse restRes = f.get();
// Handle 'Stat' command (special case because several packets are included in response).
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestNioListener.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
index f80ab41..a4c85d2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.rest.protocols.tcp;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.gridgain.client.marshaller.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.rest.*;
import org.gridgain.grid.kernal.processors.rest.client.message.*;
@@ -170,8 +169,8 @@ public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridCli
final GridRestRequest req = createRestRequest(ses, msg);
if (req != null)
- hnd.handleAsync(req).listenAsync(new CI1<IgniteFuture<GridRestResponse>>() {
- @Override public void apply(IgniteFuture<GridRestResponse> fut) {
+ hnd.handleAsync(req).listenAsync(new CI1<InternalFuture<GridRestResponse>>() {
+ @Override public void apply(InternalFuture<GridRestResponse> fut) {
GridClientResponse res = new GridClientResponse();
res.requestId(msg.requestId());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java
index 46ecf48..6bceeb3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java
@@ -139,13 +139,13 @@ public class GridServiceProcessor extends GridProcessorAdapter {
ManagedServiceConfiguration[] cfgs = ctx.config().getServiceConfiguration();
if (cfgs != null) {
- Collection<IgniteFuture<?>> futs = new ArrayList<>();
+ Collection<InternalFuture<?>> futs = new ArrayList<>();
for (ManagedServiceConfiguration c : ctx.config().getServiceConfiguration())
futs.add(deploy(c));
// Await for services to deploy.
- for (IgniteFuture<?> f : futs)
+ for (InternalFuture<?> f : futs)
f.get();
}
@@ -254,7 +254,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param svc Service.
* @return Future.
*/
- public IgniteFuture<?> deployNodeSingleton(ClusterGroup prj, String name, ManagedService svc) {
+ public InternalFuture<?> deployNodeSingleton(ClusterGroup prj, String name, ManagedService svc) {
return deployMultiple(prj, name, svc, 0, 1);
}
@@ -263,7 +263,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param svc Service.
* @return Future.
*/
- public IgniteFuture<?> deployClusterSingleton(ClusterGroup prj, String name, ManagedService svc) {
+ public InternalFuture<?> deployClusterSingleton(ClusterGroup prj, String name, ManagedService svc) {
return deployMultiple(prj, name, svc, 1, 1);
}
@@ -274,7 +274,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param maxPerNodeCnt Max per-node count.
* @return Future.
*/
- public IgniteFuture<?> deployMultiple(ClusterGroup prj, String name, ManagedService svc, int totalCnt,
+ public InternalFuture<?> deployMultiple(ClusterGroup prj, String name, ManagedService svc, int totalCnt,
int maxPerNodeCnt) {
ManagedServiceConfiguration cfg = new ManagedServiceConfiguration();
@@ -294,7 +294,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param affKey Affinity key.
* @return Future.
*/
- public IgniteFuture<?> deployKeyAffinitySingleton(String name, ManagedService svc, String cacheName, Object affKey) {
+ public InternalFuture<?> deployKeyAffinitySingleton(String name, ManagedService svc, String cacheName, Object affKey) {
A.notNull(affKey, "affKey");
ManagedServiceConfiguration cfg = new ManagedServiceConfiguration();
@@ -313,7 +313,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param cfg Service configuration.
* @return Future for deployment.
*/
- public IgniteFuture<?> deploy(ManagedServiceConfiguration cfg) {
+ public InternalFuture<?> deploy(ManagedServiceConfiguration cfg) {
A.notNull(cfg, "cfg");
validate(cfg);
@@ -404,7 +404,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @param name Service name.
* @return Future.
*/
- public IgniteFuture<?> cancel(String name) {
+ public InternalFuture<?> cancel(String name) {
while (true) {
try {
GridFutureAdapter<?> fut = new GridFutureAdapter<>(ctx);
@@ -442,8 +442,8 @@ public class GridServiceProcessor extends GridProcessorAdapter {
* @return Future.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<?> cancelAll() {
- Collection<IgniteFuture<?>> futs = new ArrayList<>();
+ public InternalFuture<?> cancelAll() {
+ Collection<InternalFuture<?>> futs = new ArrayList<>();
for (GridCacheEntry<Object, Object> e : cache.entrySetx()) {
if (!(e.getKey() instanceof GridServiceDeploymentKey))
@@ -807,14 +807,14 @@ public class GridServiceProcessor extends GridProcessorAdapter {
try {
cp.execute(svcCtx);
}
- catch (InterruptedException | GridInterruptedException ignore) {
+ catch (InterruptedException | InternalInterruptedException ignore) {
if (log.isDebugEnabled())
log.debug("Service thread was interrupted [name=" + svcCtx.name() + ", execId=" +
svcCtx.executionId() + ']');
}
catch (IgniteException e) {
if (e.hasCause(InterruptedException.class) ||
- e.hasCause(GridInterruptedException.class)) {
+ e.hasCause(InternalInterruptedException.class)) {
if (log.isDebugEnabled())
log.debug("Service thread was interrupted [name=" + svcCtx.name() +
", execId=" + svcCtx.executionId() + ']');
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
index c18a154..5baa608 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
@@ -352,7 +352,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
execFut.get();
}
catch (IgniteCheckedException e) {
- if (!e.hasCause(GridInterruptedException.class))
+ if (!e.hasCause(InternalInterruptedException.class))
U.warn(log, "Failed to wait for batch execution future completion (will ignore) " +
"[execFut=" + execFut + ", e=" + e + ']');
}
@@ -562,7 +562,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
* @param stageName Stage name.
* @param evts Events.
* @return Future.
- * @throws GridInterruptedException If failed.
+ * @throws InternalInterruptedException If failed.
*/
private GridStreamerStageExecutionFuture addEvents0(
@Nullable IgniteUuid execId,
@@ -572,7 +572,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
@Nullable Collection<UUID> execNodeIds,
String stageName,
Collection<?> evts
- ) throws GridInterruptedException {
+ ) throws InternalInterruptedException {
assert !F.isEmpty(evts);
assert !F.isEmpty(stageName);
@@ -603,7 +603,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -744,8 +744,8 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
execSvc.submit(worker);
- batchFut.listenAsync(new CI1<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ batchFut.listenAsync(new CI1<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
BatchExecutionFuture fut = (BatchExecutionFuture)t;
if (log.isDebugEnabled())
@@ -888,7 +888,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
addEvents0(null, fut.failoverAttemptCount() + 1, 0, null, Collections.singleton(ctx.localNodeId()),
fut.stageName(), fut.events());
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
e.printStackTrace();
assert false : "Failover submit should never attempt to acquire semaphore: " + fut + ']';
@@ -1270,7 +1270,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
long start = U.currentTimeMillis();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
index d05d5ba..c338947 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
@@ -271,7 +271,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
* @param <T> Task argument type.
* @param <R> Task return value type.
*/
- public <T, R> ComputeTaskFuture<R> execute(Class<? extends ComputeTask<T, R>> taskCls, @Nullable T arg) {
+ public <T, R> InternalComputeTaskFuture<R> execute(Class<? extends ComputeTask<T, R>> taskCls, @Nullable T arg) {
assert taskCls != null;
lock.readLock();
@@ -294,7 +294,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
* @param <T> Task argument type.
* @param <R> Task return value type.
*/
- public <T, R> ComputeTaskFuture<R> execute(ComputeTask<T, R> task, @Nullable T arg) {
+ public <T, R> InternalComputeTaskFuture<R> execute(ComputeTask<T, R> task, @Nullable T arg) {
return execute(task, arg, false);
}
@@ -306,7 +306,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
* @param <T> Task argument type.
* @param <R> Task return value type.
*/
- public <T, R> ComputeTaskFuture<R> execute(ComputeTask<T, R> task, @Nullable T arg, boolean sys) {
+ public <T, R> InternalComputeTaskFuture<R> execute(ComputeTask<T, R> task, @Nullable T arg, boolean sys) {
lock.readLock();
try {
@@ -342,7 +342,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
* @param <T> Task argument type.
* @param <R> Task return value type.
*/
- public <T, R> ComputeTaskFuture<R> execute(String taskName, @Nullable T arg) {
+ public <T, R> InternalComputeTaskFuture<R> execute(String taskName, @Nullable T arg) {
assert taskName != null;
lock.readLock();
@@ -368,7 +368,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
* @return Task future.
*/
@SuppressWarnings("unchecked")
- private <T, R> ComputeTaskFuture<R> startTask(
+ private <T, R> InternalComputeTaskFuture<R> startTask(
@Nullable String taskName,
@Nullable Class<?> taskCls,
@Nullable ComputeTask<T, R> task,
@@ -608,23 +608,23 @@ public class GridTaskProcessor extends GridProcessorAdapter {
/**
* @param sesId Task's session id.
- * @return A {@link org.apache.ignite.compute.ComputeTaskFuture} instance or {@code null} if no such task found.
+ * @return A {@link InternalComputeTaskFuture} instance or {@code null} if no such task found.
*/
- @Nullable public <R> ComputeTaskFuture<R> taskFuture(IgniteUuid sesId) {
+ @Nullable public <R> InternalComputeTaskFuture<R> taskFuture(IgniteUuid sesId) {
GridTaskWorker<?, ?> taskWorker = tasks.get(sesId);
- return taskWorker != null ? (ComputeTaskFuture<R>)taskWorker.getTaskFuture() : null;
+ return taskWorker != null ? (InternalComputeTaskFuture<R>)taskWorker.getTaskFuture() : null;
}
/**
* @return Active task futures.
*/
@SuppressWarnings("unchecked")
- public <R> Map<IgniteUuid, ComputeTaskFuture<R>> taskFutures() {
- Map<IgniteUuid, ComputeTaskFuture<R>> res = U.newHashMap(tasks.size());
+ public <R> Map<IgniteUuid, InternalComputeTaskFuture<R>> taskFutures() {
+ Map<IgniteUuid, InternalComputeTaskFuture<R>> res = U.newHashMap(tasks.size());
for (GridTaskWorker taskWorker : tasks.values()) {
- ComputeTaskFuture<R> fut = taskWorker.getTaskFuture();
+ InternalComputeTaskFuture<R> fut = taskWorker.getTaskFuture();
res.put(fut.getTaskSession().getId(), fut);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/visor/cache/VisorCachePreloadTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/cache/VisorCachePreloadTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/cache/VisorCachePreloadTask.java
index d9bcd72..7dab4aa 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/cache/VisorCachePreloadTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/cache/VisorCachePreloadTask.java
@@ -48,14 +48,14 @@ public class VisorCachePreloadTask extends VisorOneNodeTask<Set<String>, Void> {
/** {@inheritDoc} */
@Override protected Void run(Set<String> cacheNames) throws IgniteCheckedException {
- Collection<IgniteFuture<?>> futs = new ArrayList<>();
+ Collection<InternalFuture<?>> futs = new ArrayList<>();
for(GridCache c : g.cachesx()) {
if (cacheNames.contains(c.name()))
futs.add(c.forceRepartition());
}
- for (IgniteFuture f: futs)
+ for (InternalFuture f: futs)
f.get();
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/visor/compute/VisorComputeCancelSessionsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/compute/VisorComputeCancelSessionsTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/compute/VisorComputeCancelSessionsTask.java
index faeddeb..49f93ce 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/compute/VisorComputeCancelSessionsTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/compute/VisorComputeCancelSessionsTask.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.visor.compute;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.processors.task.*;
import org.gridgain.grid.kernal.visor.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -61,10 +60,10 @@ public class VisorComputeCancelSessionsTask extends VisorMultiNodeTask<Map<UUID,
if (sesIds != null && !sesIds.isEmpty()) {
IgniteCompute compute = g.compute(g.forLocal());
- Map<IgniteUuid, ComputeTaskFuture<Object>> futs = compute.activeTaskFutures();
+ Map<IgniteUuid, InternalComputeTaskFuture<Object>> futs = compute.activeTaskFutures();
for (IgniteUuid sesId : sesIds) {
- ComputeTaskFuture<Object> fut = futs.get(sesId);
+ InternalComputeTaskFuture<Object> fut = futs.get(sesId);
if (fut != null)
fut.cancel();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/GridAtomicInitializer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridAtomicInitializer.java b/modules/core/src/main/java/org/gridgain/grid/util/GridAtomicInitializer.java
index 6814ce2..0d60148 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/GridAtomicInitializer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/GridAtomicInitializer.java
@@ -85,9 +85,9 @@ public class GridAtomicInitializer<T> {
* Await for completion.
*
* @return {@code true} If initialization was completed successfully.
- * @throws GridInterruptedException If thread was interrupted.
+ * @throws InternalInterruptedException If thread was interrupted.
*/
- public boolean await() throws GridInterruptedException {
+ public boolean await() throws InternalInterruptedException {
if (!finished) {
synchronized (mux) {
while (!finished)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
index 803badd..d5648af 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
@@ -5602,17 +5602,17 @@ public abstract class GridUtils {
* Converts {@link InterruptedException} to {@link IgniteCheckedException}.
*
* @param mux Mux to wait on.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
@SuppressWarnings({"WaitNotInLoop", "WaitWhileNotSynced"})
- public static void wait(Object mux) throws GridInterruptedException {
+ public static void wait(Object mux) throws InternalInterruptedException {
try {
mux.wait();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6822,16 +6822,16 @@ public abstract class GridUtils {
* Awaits for condition.
*
* @param cond Condition to await for.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}
*/
- public static void await(Condition cond) throws GridInterruptedException {
+ public static void await(Condition cond) throws InternalInterruptedException {
try {
cond.await();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6842,16 +6842,16 @@ public abstract class GridUtils {
* @param time The maximum time to wait,
* @param unit The unit of the {@code time} argument.
* @return {@code false} if the waiting time detectably elapsed before return from the method, else {@code true}
- * @throws GridInterruptedException Wrapped {@link InterruptedException}
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}
*/
- public static boolean await(Condition cond, long time, TimeUnit unit) throws GridInterruptedException {
+ public static boolean await(Condition cond, long time, TimeUnit unit) throws InternalInterruptedException {
try {
return cond.await(time, unit);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6859,9 +6859,9 @@ public abstract class GridUtils {
* Awaits for the latch.
*
* @param latch Latch to wait for.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
- public static void await(CountDownLatch latch) throws GridInterruptedException {
+ public static void await(CountDownLatch latch) throws InternalInterruptedException {
try {
if (latch.getCount() > 0)
latch.await();
@@ -6869,7 +6869,7 @@ public abstract class GridUtils {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6881,17 +6881,17 @@ public abstract class GridUtils {
* @param unit Time unit for timeout.
* @return {@code True} if the count reached zero and {@code false}
* if the waiting time elapsed before the count reached zero.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
public static boolean await(CountDownLatch latch, long timeout, TimeUnit unit)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
try {
return latch.await(timeout, unit);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6955,16 +6955,16 @@ public abstract class GridUtils {
* Sleeps for given number of milliseconds.
*
* @param ms Time to sleep.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
- public static void sleep(long ms) throws GridInterruptedException {
+ public static void sleep(long ms) throws InternalInterruptedException {
try {
Thread.sleep(ms);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -6972,9 +6972,9 @@ public abstract class GridUtils {
* Joins worker.
*
* @param w Worker.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
- public static void join(GridWorker w) throws GridInterruptedException {
+ public static void join(GridWorker w) throws InternalInterruptedException {
try {
if (w != null)
w.join();
@@ -6982,7 +6982,7 @@ public abstract class GridUtils {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -7003,7 +7003,7 @@ public abstract class GridUtils {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
catch (CancellationException e) {
throw new IgniteCheckedException(e);
@@ -7014,16 +7014,16 @@ public abstract class GridUtils {
* Joins thread.
*
* @param t Thread.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
- public static void join(Thread t) throws GridInterruptedException {
+ public static void join(Thread t) throws InternalInterruptedException {
try {
t.join();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -7031,16 +7031,16 @@ public abstract class GridUtils {
* Acquires a permit from provided semaphore.
*
* @param sem Semaphore.
- * @throws GridInterruptedException Wrapped {@link InterruptedException}.
+ * @throws InternalInterruptedException Wrapped {@link InterruptedException}.
*/
- public static void acquire(Semaphore sem) throws GridInterruptedException {
+ public static void acquire(Semaphore sem) throws InternalInterruptedException {
try {
sem.acquire();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -7219,10 +7219,10 @@ public abstract class GridUtils {
* @param f Future to listen to.
* @param log Logger.
*/
- public static void asyncLogError(IgniteFuture<?> f, final IgniteLogger log) {
+ public static void asyncLogError(InternalFuture<?> f, final IgniteLogger log) {
if (f != null)
- f.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ f.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
try {
f.get();
}
@@ -9027,4 +9027,45 @@ public abstract class GridUtils {
return list;
}
+
+ /**
+ * Propagates {@code throwable} as-is if it is an instance of {@link RuntimeException} or {@link Error}, or else as
+ * a last resort, wraps it in a {@code RuntimeException} then propagates.
+ * <p>
+ * This method always throws an exception. The {@code RuntimeException} return type is only for client code to make
+ * Java type system happy in case a return value is required by the enclosing method.
+ * @param throwable
+ * @return nothing will ever be returned; this return type is only for your convenience.
+ */
+ public static IgniteException wrap(Throwable throwable) {
+ if (throwable instanceof Error)
+ throw (Error)throwable;
+
+ if (throwable instanceof RuntimeException)
+ throw (RuntimeException)throwable;
+
+
+ throw new IgniteException(throwable);
+ }
+
+ /**
+ * Propagates {@code throwable} as-is if it is an instance of {@link RuntimeException} or {@link Error}, or else as
+ * a last resort, wraps it in a {@code RuntimeException} then propagates.
+ * <p>
+ * This method always throws an exception. The {@code RuntimeException} return type is only for client code to make
+ * Java type system happy in case a return value is required by the enclosing method.
+ * @param throwable
+ * @param msg Message for wrapping exception.
+ * @return nothing will ever be returned; this return type is only for your convenience.
+ */
+ public static IgniteException wrap(Throwable throwable, String msg) {
+ if (throwable instanceof Error)
+ throw (Error)throwable;
+
+ if (throwable instanceof RuntimeException)
+ throw (RuntimeException)throwable;
+
+
+ throw new IgniteException(msg, throwable);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundFuture.java
index bf89359..325f872 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundFuture.java
@@ -32,10 +32,10 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
private static final long serialVersionUID = 0L;
/** Futures. */
- private final ConcurrentLinkedDeque8<IgniteFuture<T>> futs = new ConcurrentLinkedDeque8<>();
+ private final ConcurrentLinkedDeque8<InternalFuture<T>> futs = new ConcurrentLinkedDeque8<>();
/** Pending futures. */
- private final Collection<IgniteFuture<T>> pending = new ConcurrentLinkedDeque8<>();
+ private final Collection<InternalFuture<T>> pending = new ConcurrentLinkedDeque8<>();
/** Listener call count. */
private final AtomicInteger lsnrCalls = new AtomicInteger();
@@ -89,7 +89,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
* @param futs Futures to add.
*/
public GridCompoundFuture(GridKernalContext ctx, @Nullable IgniteReducer<T, R> rdc,
- @Nullable Iterable<IgniteFuture<T>> futs) {
+ @Nullable Iterable<InternalFuture<T>> futs) {
super(ctx);
this.rdc = rdc;
@@ -100,7 +100,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
/** {@inheritDoc} */
@Override public boolean cancel() throws IgniteCheckedException {
if (onCancelled()) {
- for (IgniteFuture<T> fut : futs)
+ for (InternalFuture<T> fut : futs)
fut.cancel();
return true;
@@ -114,7 +114,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
*
* @return Collection of futures.
*/
- public Collection<IgniteFuture<T>> futures() {
+ public Collection<InternalFuture<T>> futures() {
return futs;
}
@@ -123,7 +123,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
*
* @return Pending futures.
*/
- public Collection<IgniteFuture<T>> pending() {
+ public Collection<InternalFuture<T>> pending() {
return pending;
}
@@ -158,7 +158,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
*
* @param fut Future to add.
*/
- public void add(IgniteFuture<T> fut) {
+ public void add(InternalFuture<T> fut) {
assert fut != null;
pending.add(fut);
@@ -180,7 +180,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
*
* @param futs Futures to add.
*/
- public void addAll(@Nullable IgniteFuture<T>... futs) {
+ public void addAll(@Nullable InternalFuture<T>... futs) {
addAll(F.asList(futs));
}
@@ -189,9 +189,9 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
*
* @param futs Futures to add.
*/
- public void addAll(@Nullable Iterable<IgniteFuture<T>> futs) {
+ public void addAll(@Nullable Iterable<InternalFuture<T>> futs) {
if (futs != null)
- for (IgniteFuture<T> fut : futs)
+ for (InternalFuture<T> fut : futs)
add(fut);
}
@@ -283,8 +283,8 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
"cancelled", isCancelled(),
"err", error(),
"futs",
- F.viewReadOnly(futs, new C1<IgniteFuture<T>, String>() {
- @Override public String apply(IgniteFuture<T> f) {
+ F.viewReadOnly(futs, new C1<InternalFuture<T>, String>() {
+ @Override public String apply(InternalFuture<T> f) {
return Boolean.toString(f.isDone());
}
})
@@ -294,12 +294,12 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
/**
* Listener for futures.
*/
- private class Listener implements IgniteInClosure<IgniteFuture<T>> {
+ private class Listener implements IgniteInClosure<InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public void apply(IgniteFuture<T> fut) {
+ @Override public void apply(InternalFuture<T> fut) {
pending.remove(fut);
try {
@@ -336,7 +336,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R> {
err.compareAndSet(null, e);
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
if (log.isDebugEnabled())
log.debug("Failed to execute compound future reducer [lsnr=" + this + ", e=" + e + ']');
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundIdentityFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundIdentityFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundIdentityFuture.java
index ce28737..51af9b2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundIdentityFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridCompoundIdentityFuture.java
@@ -49,7 +49,7 @@ public class GridCompoundIdentityFuture<T> extends GridCompoundFuture<T, T> {
* @param futs Futures to add.
*/
public GridCompoundIdentityFuture(GridKernalContext ctx, @Nullable IgniteReducer<T, T> rdc,
- @Nullable Iterable<IgniteFuture<T>> futs) {
+ @Nullable Iterable<InternalFuture<T>> futs) {
super(ctx, rdc, futs);
}
[07/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridEmbeddedFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridEmbeddedFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridEmbeddedFuture.java
index 346978c..610b0c8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridEmbeddedFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridEmbeddedFuture.java
@@ -28,7 +28,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
private static final long serialVersionUID = 0L;
/** Embedded future to wait for. */
- private IgniteFuture<B> embedded;
+ private InternalFuture<B> embedded;
/**
* Empty constructor required by {@link Externalizable}.
@@ -42,7 +42,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param embedded Embedded future.
* @param c Closure to execute upon completion of embedded future.
*/
- public GridEmbeddedFuture(GridKernalContext ctx, IgniteFuture<B> embedded, final IgniteBiClosure<B, Exception, A> c) {
+ public GridEmbeddedFuture(GridKernalContext ctx, InternalFuture<B> embedded, final IgniteBiClosure<B, Exception, A> c) {
super(ctx);
assert embedded != null;
@@ -52,7 +52,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
embedded.listenAsync(new AL1() {
@SuppressWarnings({"ErrorNotRethrown", "CatchGenericClass"})
- @Override public void applyx(IgniteFuture<B> embedded) {
+ @Override public void applyx(InternalFuture<B> embedded) {
try {
onDone(c.apply(embedded.get(), null));
}
@@ -76,7 +76,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param c Closure which runs upon completion of embedded closure and which returns another future.
* @param ctx Context.
*/
- public GridEmbeddedFuture(boolean syncNotify, IgniteFuture<B> embedded, IgniteBiClosure<B, Exception, IgniteFuture<A>> c,
+ public GridEmbeddedFuture(boolean syncNotify, InternalFuture<B> embedded, IgniteBiClosure<B, Exception, InternalFuture<A>> c,
GridKernalContext ctx) {
this(embedded, c, ctx);
@@ -90,7 +90,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param embedded Closure.
* @param c Closure which runs upon completion of embedded closure and which returns another future.
*/
- public GridEmbeddedFuture(IgniteFuture<B> embedded, final IgniteBiClosure<B, Exception, IgniteFuture<A>> c,
+ public GridEmbeddedFuture(InternalFuture<B> embedded, final IgniteBiClosure<B, Exception, InternalFuture<A>> c,
GridKernalContext ctx) {
super(ctx);
@@ -100,9 +100,9 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
this.embedded = embedded;
embedded.listenAsync(new AL1() {
- @Override public void applyx(IgniteFuture<B> embedded) {
+ @Override public void applyx(InternalFuture<B> embedded) {
try {
- IgniteFuture<A> next = c.apply(embedded.get(), null);
+ InternalFuture<A> next = c.apply(embedded.get(), null);
if (next == null) {
onDone();
@@ -111,7 +111,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
}
next.listenAsync(new AL2() {
- @Override public void applyx(IgniteFuture<A> next) {
+ @Override public void applyx(InternalFuture<A> next) {
try {
onDone(next.get());
}
@@ -156,8 +156,8 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param c1 Closure which runs upon completion of embedded future and which returns another future.
* @param c2 Closure will runs upon completion of future returned by {@code c1} closure.
*/
- public GridEmbeddedFuture(GridKernalContext ctx, IgniteFuture<B> embedded, final IgniteBiClosure<B, Exception,
- IgniteFuture<A>> c1, final IgniteBiClosure<A, Exception, A> c2) {
+ public GridEmbeddedFuture(GridKernalContext ctx, InternalFuture<B> embedded, final IgniteBiClosure<B, Exception,
+ InternalFuture<A>> c1, final IgniteBiClosure<A, Exception, A> c2) {
super(ctx);
assert embedded != null;
@@ -167,9 +167,9 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
this.embedded = embedded;
embedded.listenAsync(new AL1() {
- @Override public void applyx(IgniteFuture<B> embedded) {
+ @Override public void applyx(InternalFuture<B> embedded) {
try {
- IgniteFuture<A> next = c1.apply(embedded.get(), null);
+ InternalFuture<A> next = c1.apply(embedded.get(), null);
if (next == null) {
onDone();
@@ -178,7 +178,7 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
}
next.listenAsync(new AL2() {
- @Override public void applyx(IgniteFuture<A> next) {
+ @Override public void applyx(InternalFuture<A> next) {
try {
onDone(c2.apply(next.get(), null));
}
@@ -251,12 +251,12 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
/**
* Make sure that listener does not throw exceptions.
*/
- private abstract class AsyncListener1 implements IgniteInClosure<IgniteFuture<B>> {
+ private abstract class AsyncListener1 implements IgniteInClosure<InternalFuture<B>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public final void apply(IgniteFuture<B> f) {
+ @Override public final void apply(InternalFuture<B> f) {
try {
applyx(f);
}
@@ -277,18 +277,18 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param f Future.
* @throws Exception In case of error.
*/
- protected abstract void applyx(IgniteFuture<B> f) throws Exception;
+ protected abstract void applyx(InternalFuture<B> f) throws Exception;
}
/**
* Make sure that listener does not throw exceptions.
*/
- private abstract class AsyncListener2 implements IgniteInClosure<IgniteFuture<A>> {
+ private abstract class AsyncListener2 implements IgniteInClosure<InternalFuture<A>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public final void apply(IgniteFuture<A> f) {
+ @Override public final void apply(InternalFuture<A> f) {
try {
applyx(f);
}
@@ -309,6 +309,6 @@ public class GridEmbeddedFuture<A, B> extends GridFutureAdapter<A> {
* @param f Future.
* @throws Exception In case of error.
*/
- protected abstract void applyx(IgniteFuture<A> f) throws Exception;
+ protected abstract void applyx(InternalFuture<A> f) throws Exception;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFuture.java
index 5f98641..6cfbcc4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFuture.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.util.future;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
@@ -24,7 +23,7 @@ import static org.apache.ignite.IgniteSystemProperties.*;
/**
* Future that is completed at creation time.
*/
-public class GridFinishedFuture<T> implements IgniteFuture<T>, Externalizable {
+public class GridFinishedFuture<T> implements InternalFuture<T>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -159,7 +158,7 @@ public class GridFinishedFuture<T> implements IgniteFuture<T>, Externalizable {
}
/** {@inheritDoc} */
- @Override public void listenAsync(final IgniteInClosure<? super IgniteFuture<T>> lsnr) {
+ @Override public void listenAsync(final IgniteInClosure<? super InternalFuture<T>> lsnr) {
if (ctx == null)
throw new IllegalStateException("Cannot attach listener to deserialized future (context is null): " + this);
@@ -176,12 +175,12 @@ public class GridFinishedFuture<T> implements IgniteFuture<T>, Externalizable {
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<T>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<T>>... lsnr) {
// No-op.
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> chain(final IgniteClosure<? super IgniteFuture<T>, R> doneCb) {
+ @Override public <R> InternalFuture<R> chain(final IgniteClosure<? super InternalFuture<T>, R> doneCb) {
GridFutureAdapter<R> fut = new GridFutureAdapter<R>(ctx, syncNotify) {
@Override public String toString() {
return "ChainFuture[orig=" + GridFinishedFuture.this + ", doneCb=" + doneCb + ']';
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFutureEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFutureEx.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFutureEx.java
index 663cf87..3698fbc 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFutureEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFinishedFutureEx.java
@@ -23,7 +23,7 @@ import java.util.concurrent.*;
* {@link GridFinishedFuture} as it does not take context as a parameter and
* performs notifications in the same thread.
*/
-public class GridFinishedFutureEx<T> implements IgniteFuture<T>, Externalizable {
+public class GridFinishedFutureEx<T> implements InternalFuture<T>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -135,7 +135,7 @@ public class GridFinishedFutureEx<T> implements IgniteFuture<T>, Externalizable
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> chain(IgniteClosure<? super IgniteFuture<T>, R> doneCb) {
+ @Override public <R> InternalFuture<R> chain(IgniteClosure<? super InternalFuture<T>, R> doneCb) {
try {
return new GridFinishedFutureEx<>(doneCb.apply(this));
}
@@ -151,13 +151,13 @@ public class GridFinishedFutureEx<T> implements IgniteFuture<T>, Externalizable
/** {@inheritDoc} */
@SuppressWarnings({"unchecked"})
- @Override public void listenAsync(IgniteInClosure<? super IgniteFuture<T>> lsnr) {
+ @Override public void listenAsync(IgniteInClosure<? super InternalFuture<T>> lsnr) {
if (lsnr != null)
lsnr.apply(this);
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<T>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<T>>... lsnr) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapter.java
index 7d675a7..a0002cf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapter.java
@@ -28,7 +28,7 @@ import static org.apache.ignite.IgniteSystemProperties.*;
/**
* Future adapter.
*/
-public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements IgniteFuture<R>, Externalizable {
+public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements InternalFuture<R>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -70,7 +70,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
private boolean valid = true;
/** Asynchronous listeners. */
- private Collection<IgniteInClosure<? super IgniteFuture<R>>> lsnrs;
+ private Collection<IgniteInClosure<? super InternalFuture<R>>> lsnrs;
/** Context. */
protected GridKernalContext ctx;
@@ -194,7 +194,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
acquireSharedInterruptibly(0);
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
@@ -204,7 +204,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -227,7 +227,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException("Got interrupted while waiting for future to complete.", e);
+ throw new InternalInterruptedException("Got interrupted while waiting for future to complete.", e);
}
}
@@ -235,15 +235,15 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
* @param nanosTimeout Timeout (nanoseconds).
* @return Result.
* @throws InterruptedException If interrupted.
- * @throws org.apache.ignite.lang.IgniteFutureTimeoutException If timeout reached before computation completed.
+ * @throws InternalFutureTimeoutException If timeout reached before computation completed.
* @throws IgniteCheckedException If error occurred.
*/
@Nullable protected R get0(long nanosTimeout) throws InterruptedException, IgniteCheckedException {
if (endTime == 0 && !tryAcquireSharedNanos(0, nanosTimeout))
- throw new IgniteFutureTimeoutException("Timeout was reached before computation completed.");
+ throw new InternalFutureTimeoutException("Timeout was reached before computation completed.");
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
@@ -252,7 +252,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
}
/** {@inheritDoc} */
- @Override public void listenAsync(@Nullable final IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ @Override public void listenAsync(@Nullable final IgniteInClosure<? super InternalFuture<R>> lsnr) {
if (lsnr != null) {
checkValid();
@@ -291,7 +291,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>>... lsnr) {
synchronized (mux) {
if (lsnrs == null)
return;
@@ -300,10 +300,10 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
lsnrs.clear();
else {
// Iterate through the whole list, removing all occurrences, if any.
- for (Iterator<IgniteInClosure<? super IgniteFuture<R>>> it = lsnrs.iterator(); it.hasNext();) {
- IgniteInClosure<? super IgniteFuture<R>> l1 = it.next();
+ for (Iterator<IgniteInClosure<? super InternalFuture<R>>> it = lsnrs.iterator(); it.hasNext();) {
+ IgniteInClosure<? super InternalFuture<R>> l1 = it.next();
- for (IgniteInClosure<? super IgniteFuture<R>> l2 : lsnr)
+ for (IgniteInClosure<? super InternalFuture<R>> l2 : lsnr)
// Must be l1.equals(l2), not l2.equals(l1), because of the way listeners are added.
if (l1.equals(l2))
it.remove();
@@ -313,7 +313,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
}
/** {@inheritDoc} */
- @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ @Override public <T> InternalFuture<T> chain(final IgniteClosure<? super InternalFuture<R>, T> doneCb) {
return new ChainFuture<>(ctx, syncNotify, this, doneCb);
}
@@ -321,7 +321,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
* Notifies all registered listeners.
*/
private void notifyListeners() {
- final Collection<IgniteInClosure<? super IgniteFuture<R>>> lsnrs0;
+ final Collection<IgniteInClosure<? super InternalFuture<R>>> lsnrs0;
synchronized (mux) {
lsnrs0 = lsnrs;
@@ -335,7 +335,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
assert !lsnrs0.isEmpty();
if (concurNotify) {
- for (final IgniteInClosure<? super IgniteFuture<R>> lsnr : lsnrs0)
+ for (final IgniteInClosure<? super InternalFuture<R>> lsnr : lsnrs0)
ctx.closure().runLocalSafe(new GPR() {
@Override public void run() {
notifyListener(lsnr);
@@ -349,13 +349,13 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
@Override public void run() {
// Since concurrent notifications are off, we notify
// all listeners in one thread.
- for (IgniteInClosure<? super IgniteFuture<R>> lsnr : lsnrs0)
+ for (IgniteInClosure<? super InternalFuture<R>> lsnr : lsnrs0)
notifyListener(lsnr);
}
}, true);
}
else
- for (IgniteInClosure<? super IgniteFuture<R>> lsnr : lsnrs0)
+ for (IgniteInClosure<? super InternalFuture<R>> lsnr : lsnrs0)
notifyListener(lsnr);
}
}
@@ -365,7 +365,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
*
* @param lsnr Listener.
*/
- private void notifyListener(IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ private void notifyListener(IgniteInClosure<? super InternalFuture<R>> lsnr) {
assert lsnr != null;
try {
@@ -586,7 +586,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
private GridFutureAdapter<R> fut;
/** */
- private IgniteClosure<? super IgniteFuture<R>, T> doneCb;
+ private IgniteClosure<? super InternalFuture<R>, T> doneCb;
/**
*
@@ -602,7 +602,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
* @param doneCb Closure.
*/
ChainFuture(GridKernalContext ctx, boolean syncNotify,
- GridFutureAdapter<R> fut, IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ GridFutureAdapter<R> fut, IgniteClosure<? super InternalFuture<R>, T> doneCb) {
super(ctx, syncNotify);
this.fut = fut;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapterEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapterEx.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapterEx.java
index 84f9eb5..bdca744 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapterEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureAdapterEx.java
@@ -27,7 +27,7 @@ import java.util.concurrent.locks.*;
/**
* Future adapter without kernal context.
*/
-public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implements IgniteFuture<R>, Externalizable {
+public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implements InternalFuture<R>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -57,7 +57,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
private boolean valid = true;
/** Asynchronous listener. */
- private final ConcurrentLinkedDeque8<IgniteInClosure<? super IgniteFuture<R>>>
+ private final ConcurrentLinkedDeque8<IgniteInClosure<? super InternalFuture<R>>>
lsnrs = new ConcurrentLinkedDeque8<>();
/**
@@ -143,7 +143,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
acquireSharedInterruptibly(0);
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
@@ -153,7 +153,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -176,7 +176,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException("Got interrupted while waiting for future to complete.", e);
+ throw new InternalInterruptedException("Got interrupted while waiting for future to complete.", e);
}
}
@@ -184,15 +184,15 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
* @param nanosTimeout Timeout (nanoseconds).
* @return Result.
* @throws InterruptedException If interrupted.
- * @throws org.apache.ignite.lang.IgniteFutureTimeoutException If timeout reached before computation completed.
+ * @throws InternalFutureTimeoutException If timeout reached before computation completed.
* @throws IgniteCheckedException If error occurred.
*/
@Nullable protected R get0(long nanosTimeout) throws InterruptedException, IgniteCheckedException {
if (endTime == 0 && !tryAcquireSharedNanos(0, nanosTimeout))
- throw new IgniteFutureTimeoutException("Timeout was reached before computation completed.");
+ throw new InternalFutureTimeoutException("Timeout was reached before computation completed.");
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
@@ -202,21 +202,21 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "TooBroadScope"})
- @Override public void listenAsync(@Nullable final IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ @Override public void listenAsync(@Nullable final IgniteInClosure<? super InternalFuture<R>> lsnr) {
if (lsnr != null) {
checkValid();
boolean done;
- IgniteInClosure<? super IgniteFuture<R>> lsnr0 = lsnr;
+ IgniteInClosure<? super InternalFuture<R>> lsnr0 = lsnr;
done = isDone();
if (!done) {
- lsnr0 = new IgniteInClosure<IgniteFuture<R>>() {
+ lsnr0 = new IgniteInClosure<InternalFuture<R>>() {
private final AtomicBoolean called = new AtomicBoolean();
- @Override public void apply(IgniteFuture<R> t) {
+ @Override public void apply(InternalFuture<R> t) {
if (called.compareAndSet(false, true))
lsnr.apply(t);
}
@@ -241,15 +241,15 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
}
/** {@inheritDoc} */
- @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>>... lsnr) {
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super InternalFuture<R>>... lsnr) {
if (lsnr == null || lsnr.length == 0)
lsnrs.clear();
else {
// Iterate through the whole list, removing all occurrences, if any.
- for (Iterator<IgniteInClosure<? super IgniteFuture<R>>> it = lsnrs.iterator(); it.hasNext(); ) {
- IgniteInClosure<? super IgniteFuture<R>> l1 = it.next();
+ for (Iterator<IgniteInClosure<? super InternalFuture<R>>> it = lsnrs.iterator(); it.hasNext(); ) {
+ IgniteInClosure<? super InternalFuture<R>> l1 = it.next();
- for (IgniteInClosure<? super IgniteFuture<R>> l2 : lsnr)
+ for (IgniteInClosure<? super InternalFuture<R>> l2 : lsnr)
// Must be l1.equals(l2), not l2.equals(l1), because of the way listeners are added.
if (l1.equals(l2))
it.remove();
@@ -258,15 +258,15 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
}
/** {@inheritDoc} */
- @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ @Override public <T> InternalFuture<T> chain(final IgniteClosure<? super InternalFuture<R>, T> doneCb) {
final GridFutureAdapterEx<T> fut = new GridFutureAdapterEx<T>() {
@Override public String toString() {
return "ChainFuture[orig=" + GridFutureAdapterEx.this + ", doneCb=" + doneCb + ']';
}
};
- listenAsync(new IgniteInClosure<IgniteFuture<R>>() {
- @Override public void apply(IgniteFuture<R> t) {
+ listenAsync(new IgniteInClosure<InternalFuture<R>>() {
+ @Override public void apply(InternalFuture<R> t) {
try {
fut.onDone(doneCb.apply(t));
}
@@ -302,7 +302,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
if (lsnrs.isEmptyx())
return;
- for (IgniteInClosure<? super IgniteFuture<R>> lsnr : lsnrs)
+ for (IgniteInClosure<? super InternalFuture<R>> lsnr : lsnrs)
notifyListener(lsnr);
}
@@ -311,7 +311,7 @@ public class GridFutureAdapterEx<R> extends AbstractQueuedSynchronizer implement
*
* @param lsnr Listener.
*/
- private void notifyListener(IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ private void notifyListener(IgniteInClosure<? super InternalFuture<R>> lsnr) {
assert lsnr != null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureChainListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureChainListener.java b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureChainListener.java
index 478645c..19c06fe 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureChainListener.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/future/GridFutureChainListener.java
@@ -17,7 +17,7 @@ import org.gridgain.grid.util.lang.*;
/**
* Future listener to fill chained future with converted result of the source future.
*/
-public class GridFutureChainListener<T, R> implements IgniteInClosure<IgniteFuture<T>> {
+public class GridFutureChainListener<T, R> implements IgniteInClosure<InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
@@ -28,7 +28,7 @@ public class GridFutureChainListener<T, R> implements IgniteInClosure<IgniteFutu
private final GridFutureAdapter<R> fut;
/** Done callback. */
- private final IgniteClosure<? super IgniteFuture<T>, R> doneCb;
+ private final IgniteClosure<? super InternalFuture<T>, R> doneCb;
/**
* Constructs chain listener.
@@ -38,14 +38,14 @@ public class GridFutureChainListener<T, R> implements IgniteInClosure<IgniteFutu
* @param doneCb Done callback.
*/
public GridFutureChainListener(GridKernalContext ctx, GridFutureAdapter<R> fut,
- IgniteClosure<? super IgniteFuture<T>, R> doneCb) {
+ IgniteClosure<? super InternalFuture<T>, R> doneCb) {
this.ctx = ctx;
this.fut = fut;
this.doneCb = doneCb;
}
/** {@inheritDoc} */
- @Override public void apply(IgniteFuture<T> t) {
+ @Override public void apply(InternalFuture<T> t) {
try {
fut.onDone(doneCb.apply(t));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 97ffd0e..dc3f84d 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
@@ -313,7 +313,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
}
} // while
- throw new GridInterruptedException("Socket accept was interrupted.");
+ throw new InternalInterruptedException("Socket accept was interrupted.");
}
/**
@@ -424,7 +424,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
try {
U.join(gcWorker);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
U.warn(log, "Interrupted when stopping GC worker.", e);
}
finally {
@@ -495,7 +495,7 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
if (log.isDebugEnabled())
log.debug("GC worker started.");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 3b31ecf..f966818 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
@@ -492,15 +492,15 @@ public class GridFunc {
};
/** */
- private static final IgnitePredicate<IgniteFuture<?>> FINISHED_FUTURE = new IgnitePredicate<IgniteFuture<?>>() {
- @Override public boolean apply(IgniteFuture<?> f) {
+ private static final IgnitePredicate<InternalFuture<?>> FINISHED_FUTURE = new IgnitePredicate<InternalFuture<?>>() {
+ @Override public boolean apply(InternalFuture<?> f) {
return f.isDone();
}
};
/** */
- private static final IgnitePredicate<IgniteFuture<?>> UNFINISHED_FUTURE = new IgnitePredicate<IgniteFuture<?>>() {
- @Override public boolean apply(IgniteFuture<?> f) {
+ private static final IgnitePredicate<InternalFuture<?>> UNFINISHED_FUTURE = new IgnitePredicate<InternalFuture<?>>() {
+ @Override public boolean apply(InternalFuture<?> f) {
return !f.isDone();
}
};
@@ -2757,13 +2757,13 @@ public class GridFunc {
}
/**
- * Converts given object with interface {@link org.apache.ignite.lang.IgniteFuture} into an object implementing {@link Future}.
+ * Converts given object with interface {@link InternalFuture} into an object implementing {@link Future}.
*
* @param fut Future to convert.
* @param <T> Type of computation result.
* @return Instance implementing {@link Future}.
*/
- public static <T> Future<T> as(final IgniteFuture<T> fut) {
+ public static <T> Future<T> as(final InternalFuture<T> fut) {
A.notNull(fut, "fut");
return new GridSerializableFuture<T>() {
@@ -2792,10 +2792,10 @@ public class GridFunc {
try {
return fut.get();
}
- catch (IgniteFutureCancelledException ignore) {
+ catch (InternalFutureCancelledException ignore) {
throw new CancellationException("The computation was cancelled.");
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
throw new InterruptedException("The computation was interrupted.");
}
catch (IgniteCheckedException e) {
@@ -2808,13 +2808,13 @@ public class GridFunc {
try {
return fut.get(timeout, unit);
}
- catch (IgniteFutureCancelledException ignore) {
+ catch (InternalFutureCancelledException ignore) {
throw new CancellationException("The computation was cancelled.");
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
throw new InterruptedException("The computation was interrupted.");
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
throw new TimeoutException("The computation timed out: " + e.getMessage());
}
catch (IgniteCheckedException e) {
@@ -2825,14 +2825,14 @@ public class GridFunc {
}
/**
- * Gets closure that converts {@link org.apache.ignite.lang.IgniteFuture} to {@link Future}.
+ * Gets closure that converts {@link InternalFuture} to {@link Future}.
*
* @param <T> Type of future.
- * @return Closure that converts {@link org.apache.ignite.lang.IgniteFuture} to {@link Future}.
+ * @return Closure that converts {@link InternalFuture} to {@link Future}.
*/
- public static <T> IgniteClosure<IgniteFuture<T>, Future<T>> future() {
- return new C1<IgniteFuture<T>, Future<T>>() {
- @Override public Future<T> apply(IgniteFuture<T> fut) {
+ public static <T> IgniteClosure<InternalFuture<T>, Future<T>> future() {
+ return new C1<InternalFuture<T>, Future<T>>() {
+ @Override public Future<T> apply(InternalFuture<T> fut) {
return as(fut);
}
};
@@ -8579,7 +8579,7 @@ public class GridFunc {
* @param futs Futures. If none provided - this method is no-op.
* @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(@Nullable IgniteFuture<T>... futs) throws IgniteCheckedException {
+ public static <T> void awaitAll(@Nullable InternalFuture<T>... futs) throws IgniteCheckedException {
if (!isEmpty(futs))
awaitAll(asList(futs));
}
@@ -8590,7 +8590,7 @@ public class GridFunc {
* @param futs Futures. If none provided - this method is no-op.
* @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(@Nullable Collection<IgniteFuture<T>> futs) throws IgniteCheckedException {
+ public static <T> void awaitAll(@Nullable Collection<InternalFuture<T>> futs) throws IgniteCheckedException {
awaitAll(0, null, futs);
}
@@ -8601,7 +8601,7 @@ public class GridFunc {
* @param futs Futures. If none provided - this method is no-op.
* @throws IgniteCheckedException If any of the futures failed.
*/
- public static <T> void awaitAll(long timeout, @Nullable Collection<IgniteFuture<T>> futs) throws IgniteCheckedException {
+ public static <T> void awaitAll(long timeout, @Nullable Collection<InternalFuture<T>> futs) throws IgniteCheckedException {
awaitAll(timeout, null, futs);
}
@@ -8617,7 +8617,7 @@ public class GridFunc {
* @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 IgniteCheckedException {
+ @Nullable Collection<InternalFuture<T>> futs) throws IgniteCheckedException {
if (futs == null || futs.isEmpty())
return null;
@@ -8630,14 +8630,14 @@ public class GridFunc {
// Note that it is important to wait in the natural order of collection and
// not via listen method, because caller may actually add to this collection
// concurrently while this method is in progress.
- for (IgniteFuture<T> fut : futs) {
+ for (InternalFuture<T> fut : futs) {
T t;
if (timeout > 0) {
long left = end - U.currentTimeMillis();
if (left <= 0 && !fut.isDone())
- throw new IgniteFutureTimeoutException("Timed out waiting for all futures: " + futs);
+ throw new InternalFutureTimeoutException("Timed out waiting for all futures: " + futs);
if (fut.isDone() && left < 0)
left = 0;
@@ -8662,7 +8662,7 @@ public class GridFunc {
* @param <T> Type of computation result.
* @return Completed future.
*/
- public static <T> IgniteFuture<T> awaitOne(IgniteFuture<T>... futs) {
+ public static <T> InternalFuture<T> awaitOne(InternalFuture<T>... futs) {
return isEmpty(futs) ? new GridFinishedFutureEx<T>() : awaitOne(asList(futs));
}
@@ -8673,22 +8673,22 @@ public class GridFunc {
* @param <T> Type of computation result.
* @return Completed future.
*/
- public static <T> IgniteFuture<T> awaitOne(Iterable<IgniteFuture<T>> futs) {
+ public static <T> InternalFuture<T> awaitOne(Iterable<InternalFuture<T>> futs) {
if (F.isEmpty(futs))
return new GridFinishedFutureEx<>();
final CountDownLatch latch = new CountDownLatch(1);
- final AtomicReference<IgniteFuture<T>> t = new AtomicReference<>();
+ final AtomicReference<InternalFuture<T>> t = new AtomicReference<>();
- IgniteInClosure<IgniteFuture<T>> c = null;
+ IgniteInClosure<InternalFuture<T>> c = null;
- for (IgniteFuture<T> fut : futs) {
+ for (InternalFuture<T> fut : futs) {
if (fut != null) {
if (!fut.isDone()) {
if (c == null) {
- c = new CI1<IgniteFuture<T>>() {
- @Override public void apply(IgniteFuture<T> fut) {
+ c = new CI1<InternalFuture<T>>() {
+ @Override public void apply(InternalFuture<T> fut) {
if (t.compareAndSet(null, fut))
latch.countDown();
}
@@ -8720,7 +8720,7 @@ public class GridFunc {
if (interrupted)
Thread.currentThread().interrupt();
- IgniteFuture<T> f = t.get();
+ InternalFuture<T> f = t.get();
assert f != null;
@@ -8732,7 +8732,7 @@ public class GridFunc {
*
* @return Predicate for filtering finished futures.
*/
- public static IgnitePredicate<IgniteFuture<?>> finishedFutures() {
+ public static IgnitePredicate<InternalFuture<?>> finishedFutures() {
return FINISHED_FUTURE;
}
@@ -8741,7 +8741,7 @@ public class GridFunc {
*
* @return Predicate for filtering unfinished futures.
*/
- public static IgnitePredicate<IgniteFuture<?>> unfinishedFutures() {
+ public static IgnitePredicate<InternalFuture<?>> unfinishedFutures() {
return UNFINISHED_FUTURE;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 577d15d..e7c8fa9 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
@@ -10,6 +10,7 @@
package org.gridgain.grid.util.lang;
import org.apache.ignite.*;
+import org.apache.ignite.lang.*;
import java.util.concurrent.*;
@@ -32,7 +33,7 @@ public interface GridPlainFuture<R> {
* @param unit Timeout interval unit to wait future completes.
* @return Completed future result.
* @throws IgniteCheckedException In case of error.
- * @throws org.apache.ignite.lang.IgniteFutureTimeoutException If timed out before future finishes.
+ * @throws InternalFutureTimeoutException If timed out before future finishes.
*/
public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/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 9ff1f99..51c31ae 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
@@ -82,7 +82,7 @@ public class GridPlainFutureAdapter<R> implements GridPlainFuture<R> {
try {
if (doneLatch.getCount() > 0 && !doneLatch.await(timeout, unit))
- throw new IgniteFutureTimeoutException("Failed to get future result due to waiting timed out.");
+ throw new InternalFutureTimeoutException("Failed to get future result due to waiting timed out.");
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFuture.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFuture.java
index 19de132..e650eff 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFuture.java
@@ -18,7 +18,7 @@ import java.io.*;
import java.util.concurrent.*;
/**
- * Reduced variant of {@link org.apache.ignite.lang.IgniteFuture} interface. Removed asynchronous
+ * Reduced variant of {@link InternalFuture} interface. Removed asynchronous
* listen methods which require a valid grid kernal context.
* @param <R> Type of the result for the future.
*/
@@ -28,8 +28,8 @@ public interface GridNioFuture<R> {
* returns operation result.
*
* @return Operation result.
- * @throws GridInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
- * @throws IgniteFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
+ * @throws InternalInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
+ * @throws InternalFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
* @throws IgniteCheckedException If operation failed.
* @throws IOException If IOException occurred while performing operation.
*/
@@ -42,9 +42,9 @@ public interface GridNioFuture<R> {
*
* @param timeout The maximum time to wait in milliseconds.
* @return Operation result.
- * @throws GridInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
- * @throws IgniteFutureTimeoutException Subclass of {@link GridException} thrown if the wait was timed out.
- * @throws IgniteFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
+ * @throws InternalInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
+ * @throws InternalFutureTimeoutException Subclass of {@link GridException} thrown if the wait was timed out.
+ * @throws InternalFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
* @throws IgniteCheckedException If operation failed.
* @throws IOException If IOException occurred while performing operation.
*/
@@ -57,9 +57,9 @@ public interface GridNioFuture<R> {
* @param timeout The maximum time to wait.
* @param unit The time unit of the {@code timeout} argument.
* @return Operation result.
- * @throws GridInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
- * @throws IgniteFutureTimeoutException Subclass of {@link GridException} thrown if the wait was timed out.
- * @throws IgniteFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
+ * @throws InternalInterruptedException Subclass of {@link GridException} thrown if the wait was interrupted.
+ * @throws InternalFutureTimeoutException Subclass of {@link GridException} thrown if the wait was timed out.
+ * @throws InternalFutureCancelledException Subclass of {@link GridException} throws if operation was cancelled.
* @throws IgniteCheckedException If operation failed.
* @throws IOException If IOException occurred while performing operation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFutureImpl.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFutureImpl.java
index ee84796..29b8311 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFutureImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioFutureImpl.java
@@ -80,7 +80,7 @@ public class GridNioFutureImpl<R> extends AbstractQueuedSynchronizer implements
acquireSharedInterruptibly(0);
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
@@ -90,7 +90,7 @@ public class GridNioFutureImpl<R> extends AbstractQueuedSynchronizer implements
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -111,7 +111,7 @@ public class GridNioFutureImpl<R> extends AbstractQueuedSynchronizer implements
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException("Got interrupted while waiting for future to complete.", e);
+ throw new InternalInterruptedException("Got interrupted while waiting for future to complete.", e);
}
}
@@ -119,15 +119,15 @@ public class GridNioFutureImpl<R> extends AbstractQueuedSynchronizer implements
* @param nanosTimeout Timeout (nanoseconds).
* @return Result.
* @throws InterruptedException If interrupted.
- * @throws IgniteFutureTimeoutException If timeout reached before computation completed.
+ * @throws InternalFutureTimeoutException If timeout reached before computation completed.
* @throws IgniteCheckedException If error occurred.
*/
@Nullable protected R get0(long nanosTimeout) throws InterruptedException, IgniteCheckedException {
if (endTime == 0 && !tryAcquireSharedNanos(0, nanosTimeout))
- throw new IgniteFutureTimeoutException("Timeout was reached before computation completed.");
+ throw new InternalFutureTimeoutException("Timeout was reached before computation completed.");
if (getState() == CANCELLED)
- throw new IgniteFutureCancelledException("Future was cancelled: " + this);
+ throw new InternalFutureCancelledException("Future was cancelled: " + this);
if (err != null)
throw U.cast(err);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
index b0279ef..45d4b5b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
@@ -711,7 +711,7 @@ public class GridNioServer<T> {
try {
U.sleep(50);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IOException("Thread has been interrupted.", e);
}
}
@@ -935,7 +935,7 @@ public class GridNioServer<T> {
try {
U.sleep(50);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IOException("Thread has been interrupted.", e);
}
}
@@ -1069,7 +1069,7 @@ public class GridNioServer<T> {
try {
U.sleep(50);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IOException("Thread has been interrupted.", e);
}
}
@@ -1117,7 +1117,7 @@ public class GridNioServer<T> {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
boolean reset = false;
while (!closed) {
@@ -1577,7 +1577,7 @@ public class GridNioServer<T> {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
boolean reset = false;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/typedef/X.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/typedef/X.java b/modules/core/src/main/java/org/gridgain/grid/util/typedef/X.java
index 29c5622..16849b5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/typedef/X.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/typedef/X.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.util.typedef;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
@@ -814,11 +813,11 @@ public final class X {
* @param futs Futures to wait for.
* @throws IgniteCheckedException If any of the futures threw exception.
*/
- public static void waitAll(@Nullable Iterable<IgniteFuture<?>> futs) throws IgniteCheckedException {
+ public static void waitAll(@Nullable Iterable<InternalFuture<?>> futs) throws IgniteCheckedException {
if (F.isEmpty(futs))
return;
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/util/worker/GridWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/worker/GridWorker.java b/modules/core/src/main/java/org/gridgain/grid/util/worker/GridWorker.java
index 1775505..3d89864 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/worker/GridWorker.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/worker/GridWorker.java
@@ -136,7 +136,7 @@ public abstract class GridWorker implements Runnable {
body();
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
if (log.isDebugEnabled())
log.debug("Caught interrupted exception: " + e);
}
@@ -185,9 +185,9 @@ public abstract class GridWorker implements Runnable {
* The implementation should provide the execution body for this runnable.
*
* @throws InterruptedException Thrown in case of interruption.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- protected abstract void body() throws InterruptedException, GridInterruptedException;
+ protected abstract void body() throws InterruptedException, InternalInterruptedException;
/**
* Optional method that will be called after runnable is finished. Default
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java
index 351eac2..b25d432 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java
@@ -58,7 +58,7 @@ public class GridSharedFsCheckpointSpiMultiThreadedSelfTest extends
final AtomicBoolean fail = new AtomicBoolean();
- IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
try {
@@ -78,7 +78,7 @@ public class GridSharedFsCheckpointSpiMultiThreadedSelfTest extends
"writer-1"
);
- IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
try{
@@ -98,7 +98,7 @@ public class GridSharedFsCheckpointSpiMultiThreadedSelfTest extends
"writer-2"
);
- IgniteFuture fut3 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut3 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (writeFinished.get() < THREAD_CNT * 2) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/collision/GridTestCollisionTaskSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/GridTestCollisionTaskSession.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/GridTestCollisionTaskSession.java
index 7817c02..a4e9ddd 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/collision/GridTestCollisionTaskSession.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/GridTestCollisionTaskSession.java
@@ -189,7 +189,7 @@ public class GridTestCollisionTaskSession implements ComputeTaskSession {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> mapFuture() {
+ @Override public InternalFuture<?> mapFuture() {
assert false : "Not implemented";
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index 3684f5e..31fd843 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -100,7 +100,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testTask() throws Exception {
- ComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), Task.class, null);
+ InternalComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), Task.class, null);
testMessageSet(fut);
}
@@ -109,7 +109,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testTaskException() throws Exception {
- ComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), FailTask.class, null);
+ InternalComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), FailTask.class, null);
testMessageSet(fut);
}
@@ -118,7 +118,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
* @param fut Future to cancel.
* @throws Exception If failed.
*/
- private void testMessageSet(IgniteFuture<?> fut) throws Exception {
+ private void testMessageSet(InternalFuture<?> fut) throws Exception {
cancelLatch.await();
assertTrue(fut.cancel());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
index 8a28058..3314076 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java
@@ -166,7 +166,7 @@ public class GridTcpCommunicationSpiConcurrentConnectSelfTest<T extends Communic
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> loadFut = null;
+ InternalFuture<?> loadFut = null;
if (load) {
loadFut = GridTestUtils.runMultiThreadedAsync(new Callable<Long>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
index ff15986..0f1b46c 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanTest.java
@@ -157,7 +157,7 @@ public class GridTcpCommunicationSpiLanTest extends GridSpiAbstractTest<TcpCommu
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
while (cntr.getAndIncrement() < msgCnt) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
index 1889cd2..4ae5b5d 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java
@@ -165,7 +165,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
/** Randomizer. */
private Random rnd = new Random();
@@ -262,7 +262,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
final int interval = 50;
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
/** {@inheritDoc} */
@Override public void run() {
try {
@@ -301,7 +301,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
final AtomicBoolean run = new AtomicBoolean(true);
- IgniteFuture<?> fut2 = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
while (run.get() && !Thread.currentThread().isInterrupted()) {
@@ -310,7 +310,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
((TcpCommunicationSpi)spis.get(from.id())).onNodeLeft(to.id());
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
Thread.currentThread().interrupt();
}
}
@@ -361,7 +361,7 @@ public abstract class GridTcpCommunicationSpiMultithreadedSelfTest extends GridS
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
ClusterNode from = nodes.get(0);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
index fadac25..bb2d5b4 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
@@ -273,7 +273,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
ses1.pauseReads().get();
- IgniteFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
for (int i = 0; i < 5000; i++) {
spi0.sendMessage(node1, new GridTestMessage(node0.id(), msgId.incrementAndGet(), 0));
@@ -383,7 +383,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
ses1.pauseReads().get();
- IgniteFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
for (int i = 0; i < 5000; i++) {
spi0.sendMessage(node1, new GridTestMessage(node0.id(), msgId.incrementAndGet(), 0));
@@ -500,7 +500,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi>
ses1.pauseReads().get();
- IgniteFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<?> sndFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
for (int i = 0; i < 5000; i++) {
spi0.sendMessage(node1, new GridTestMessage(node0.id(), msgId.incrementAndGet(), 0));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpDiscoveryMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpDiscoveryMultiThreadedTest.java
index e791cd1..24331ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpDiscoveryMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpDiscoveryMultiThreadedTest.java
@@ -146,7 +146,7 @@ public class GridTcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
final AtomicInteger clientIdx = new AtomicInteger(GRID_CNT);
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
clientFlagPerThread.set(true);
@@ -169,7 +169,7 @@ public class GridTcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
for (int i = 0; i < GRID_CNT; i++)
srvIdx.add(i);
- IgniteFuture<?> fut2 = multithreadedAsync(
+ InternalFuture<?> fut2 = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
clientFlagPerThread.set(false);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java
index 566759e..4d0537e 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java
@@ -49,7 +49,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture<?> wFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> wFut = multithreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (!done.get()) {
long val = valCntr.incrementAndGet();
@@ -66,7 +66,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe
wLatch.await();
- IgniteFuture<?> rFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> rFut = multithreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (valCntr.get() < 1000) {
byte[] val = spi.read(null, key, context());
@@ -131,7 +131,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe
final AtomicBoolean fin = new AtomicBoolean();
- final IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ final InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/streamer/index/GridStreamerIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/streamer/index/GridStreamerIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/streamer/index/GridStreamerIndexSelfTest.java
index 2fdbe53..cf7f6c7 100644
--- a/modules/core/src/test/java/org/apache/ignite/streamer/index/GridStreamerIndexSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/streamer/index/GridStreamerIndexSelfTest.java
@@ -289,7 +289,7 @@ public class GridStreamerIndexSelfTest extends GridCommonAbstractTest {
win.start();
- IgniteFuture<Long> pollFut = null;
+ InternalFuture<Long> pollFut = null;
if (pollEvicted) {
// These threads poll evicted events from the window if it doesn't break
@@ -312,7 +312,7 @@ public class GridStreamerIndexSelfTest extends GridCommonAbstractTest {
U.sleep(50);
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
}
@@ -324,7 +324,7 @@ public class GridStreamerIndexSelfTest extends GridCommonAbstractTest {
// if it is still present in the window. In the tested index events are
// sorted by value and the value is a number of repeated events, so, this
// should be invariant.
- IgniteFuture<Long> fut1 = runMultiThreadedAsync(new CAX() {
+ InternalFuture<Long> fut1 = runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
final String evt = Thread.currentThread().getName();
int cntr = 1;
@@ -351,7 +351,7 @@ public class GridStreamerIndexSelfTest extends GridCommonAbstractTest {
}, threadCnt / 2, "test-multi");
// This thread generates a set of single non-repeating events from 0 to iters.
- IgniteFuture<Long> fut2 = runMultiThreadedAsync(new CAX() {
+ InternalFuture<Long> fut2 = runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
for (int i = 0; i < iters && !Thread.currentThread().isInterrupted(); i++)
win.enqueue(String.valueOf(i));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/apache/ignite/streamer/window/GridStreamerWindowSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/streamer/window/GridStreamerWindowSelfTest.java b/modules/core/src/test/java/org/apache/ignite/streamer/window/GridStreamerWindowSelfTest.java
index bb8fbc6..2e3794b 100644
--- a/modules/core/src/test/java/org/apache/ignite/streamer/window/GridStreamerWindowSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/streamer/window/GridStreamerWindowSelfTest.java
@@ -784,7 +784,7 @@ public class GridStreamerWindowSelfTest extends GridCommonAbstractTest {
final AtomicInteger added = new GridAtomicInteger();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/benchmarks/storevalbytes/GridCacheStoreValueBytesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/benchmarks/storevalbytes/GridCacheStoreValueBytesTest.java b/modules/core/src/test/java/org/gridgain/benchmarks/storevalbytes/GridCacheStoreValueBytesTest.java
index cbf6d61..ad843e0 100644
--- a/modules/core/src/test/java/org/gridgain/benchmarks/storevalbytes/GridCacheStoreValueBytesTest.java
+++ b/modules/core/src/test/java/org/gridgain/benchmarks/storevalbytes/GridCacheStoreValueBytesTest.java
@@ -193,8 +193,8 @@ public class GridCacheStoreValueBytesTest {
final Semaphore sem = new Semaphore(concurrentGetNum);
- final IgniteInClosure<IgniteFuture> lsnr = new CI1<IgniteFuture>() {
- @Override public void apply(IgniteFuture t) {
+ final IgniteInClosure<InternalFuture> lsnr = new CI1<InternalFuture>() {
+ @Override public void apply(InternalFuture t) {
sem.release();
}
};
@@ -223,7 +223,7 @@ public class GridCacheStoreValueBytesTest {
if (keys.size() == getKeyNum) {
sem.acquire();
- IgniteFuture<Map<Integer, String>> f = cache.getAllAsync(keys);
+ InternalFuture<Map<Integer, String>> f = cache.getAllAsync(keys);
f.listenAsync(lsnr);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/GridTestTaskSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/GridTestTaskSession.java b/modules/core/src/test/java/org/gridgain/grid/GridTestTaskSession.java
index 6765221..bbbb964 100644
--- a/modules/core/src/test/java/org/gridgain/grid/GridTestTaskSession.java
+++ b/modules/core/src/test/java/org/gridgain/grid/GridTestTaskSession.java
@@ -205,7 +205,7 @@ public class GridTestTaskSession implements ComputeTaskSession {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> mapFuture() {
+ @Override public InternalFuture<?> mapFuture() {
assert false : "Not implemented";
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
index f7d933a..e3dfa34 100644
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
@@ -40,7 +40,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
final AtomicBoolean finish = new AtomicBoolean();
- IgniteFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new IgniteCallable<Void>() {
+ InternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new IgniteCallable<Void>() {
@Override public Void call() throws Exception {
try {
ThreadLocalRandom rnd = ThreadLocalRandom.current();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
index 17d9f42..36b13dc 100644
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
@@ -101,7 +101,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr
* @throws Exception If failed.
*/
public void testMultithreadedPut() throws Exception {
- IgniteFuture<?> fut1 = runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut1 = runMultiThreadedAsync(new Callable<Object>() {
private final Random rnd = new Random();
@Override public Object call() throws Exception {
@@ -115,7 +115,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr
}
}, 4, "put");
- IgniteFuture<?> fut2 = runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut2 = runMultiThreadedAsync(new Callable<Object>() {
private final Random rnd = new Random();
@Override public Object call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
index c20926e..ba0ef37 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -58,7 +57,7 @@ public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest {
/**
* Cancelled task.
*/
- private static final class CancelledTask extends ComputeTaskAdapter<String, Void> {
+ private static final class CancelledTask extends ComputeTaskFutureAdapter<String, Void> {
/** */
@IgniteLocalNodeIdResource
private UUID locId;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelUnusedJobSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelUnusedJobSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelUnusedJobSelfTest.java
index e46813c..783c039 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelUnusedJobSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelUnusedJobSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -83,7 +82,7 @@ public class GridCancelUnusedJobSelfTest extends GridCommonAbstractTest {
ignite.compute().localDeployTask(GridCancelTestTask.class, U.detectClassLoader(GridCancelTestTask.class));
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridCancelTestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridCancelTestTask.class.getName(), null);
// Wait until jobs begin execution.
boolean await = startSignal.await(WAIT_TIME, TimeUnit.MILLISECONDS);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelledJobsMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelledJobsMetricsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelledJobsMetricsSelfTest.java
index afcf4ac..f10f8ef 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelledJobsMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelledJobsMetricsSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.collision.*;
import org.apache.ignite.spi.discovery.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -61,7 +60,7 @@ public class GridCancelledJobsMetricsSelfTest extends GridCommonAbstractTest {
public void testCancelledJobs() throws Exception {
final Ignite ignite = G.ignite(getTestGridName());
- Collection<ComputeTaskFuture<?>> futs = new ArrayList<>();
+ Collection<InternalComputeTaskFuture<?>> futs = new ArrayList<>();
IgniteCompute comp = ignite.compute().enableAsync();
@@ -80,7 +79,7 @@ public class GridCancelledJobsMetricsSelfTest extends GridCommonAbstractTest {
colSpi.externalCollision();
- for (ComputeTaskFuture<?> fut : futs) {
+ for (InternalComputeTaskFuture<?> fut : futs) {
try {
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/GridContinuousTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridContinuousTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridContinuousTaskSelfTest.java
index 15ca5ff..17da6d8 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridContinuousTaskSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridContinuousTaskSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -42,11 +41,11 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest {
comp.execute(TestJobsChainTask.class, true);
- ComputeTaskFuture<Integer> fut1 = comp.future();
+ InternalComputeTaskFuture<Integer> fut1 = comp.future();
comp.execute(TestJobsChainTask.class, false);
- ComputeTaskFuture<Integer> fut2 = comp.future();
+ InternalComputeTaskFuture<Integer> fut2 = comp.future();
assert fut1.get() == 55;
assert fut2.get() == 55;
@@ -72,11 +71,11 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest {
comp.execute(TestJobsChainTask.class, true);
- ComputeTaskFuture<Integer> fut1 = comp.future();
+ InternalComputeTaskFuture<Integer> fut1 = comp.future();
comp.execute(TestJobsChainTask.class, false);
- ComputeTaskFuture<Integer> fut2 = comp.future();
+ InternalComputeTaskFuture<Integer> fut2 = comp.future();
assert fut1.get() == 55;
assert fut2.get() == 55;
@@ -309,7 +308,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest {
/** */
@SuppressWarnings({"PublicInnerClass"})
- public static class SlowMapTestTask extends ComputeTaskAdapter<Object, Integer> {
+ public static class SlowMapTestTask extends ComputeTaskFutureAdapter<Object, Integer> {
/** */
@IgniteTaskContinuousMapperResource
private ComputeTaskContinuousMapper mapper;
[14/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
index 031641f..2f4d2f6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
@@ -813,7 +813,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
if (verCheckErr != null)
U.error(log, verCheckErr.getMessage());
- else if (X.hasCause(e, InterruptedException.class, GridInterruptedException.class))
+ else if (X.hasCause(e, InterruptedException.class, InternalInterruptedException.class))
U.warn(log, "Grid startup routine has been interrupted (will rollback).");
else
U.error(log, "Got exception while starting (will rollback startup routine).", e);
@@ -2490,7 +2490,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
try {
compute().undeployTask(taskName);
}
- catch (IgniteCheckedException e) {
+ catch (IgniteException e) {
throw U.jmException(e);
}
}
@@ -2501,7 +2501,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
try {
return compute().<String, String>execute(taskName, arg);
}
- catch (IgniteCheckedException e) {
+ catch (IgniteException e) {
throw U.jmException(e);
}
}
@@ -2526,7 +2526,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
* @see #isSmtpEnabled()
* @see org.apache.ignite.configuration.IgniteConfiguration#getAdminEmails()
*/
- @Override public IgniteFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html) {
+ @Override public InternalFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html) {
A.notNull(subj, "subj");
A.notNull(body, "body");
@@ -2618,7 +2618,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
* @throws IgniteCheckedException In case of error.
* @see {@link org.apache.ignite.IgniteCluster#startNodes(java.io.File, boolean, int, int)}.
*/
- IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, int timeout, int maxConn) throws IgniteCheckedException {
+ InternalFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, int timeout, int maxConn) throws IgniteCheckedException {
A.notNull(file, "file");
A.ensure(file.exists(), "file doesn't exist.");
A.ensure(file.isFile(), "file is a directory.");
@@ -2660,7 +2660,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
* @throws IgniteCheckedException In case of error.
* @see {@link org.apache.ignite.IgniteCluster#startNodes(java.util.Collection, java.util.Map, boolean, int, int)}.
*/
- IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(
+ InternalFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(
Collection<Map<String, Object>> hosts, @Nullable Map<String, Object> dflts, boolean restart, int timeout,
int maxConn) throws IgniteCheckedException {
A.notNull(hosts, "hosts");
@@ -2801,15 +2801,15 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe
if (call == null)
return false;
- IgniteFuture<GridTuple3<String, Boolean, String>> fut = ctx.closure().callLocalSafe(call, true);
+ InternalFuture<GridTuple3<String, Boolean, String>> fut = ctx.closure().callLocalSafe(call, true);
comp.add(fut);
if (cnt.decrementAndGet() == 0)
comp.markInitialized();
- fut.listenAsync(new CI1<IgniteFuture<GridTuple3<String, Boolean, String>>>() {
- @Override public void apply(IgniteFuture<GridTuple3<String, Boolean, String>> f) {
+ fut.listenAsync(new CI1<InternalFuture<GridTuple3<String, Boolean, String>>>() {
+ @Override public void apply(InternalFuture<GridTuple3<String, Boolean, String>> f) {
runNextNodeCallable(queue, comp, cnt);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java
index 77cb10e..e2509f5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java
@@ -23,7 +23,7 @@ import java.util.*;
* This class provide implementation for task future.
* @param <R> Type of the task result returning from {@link org.apache.ignite.compute.ComputeTask#reduce(List)} method.
*/
-public class GridTaskFutureImpl<R> extends GridFutureAdapter<R> implements ComputeTaskFuture<R> {
+public class GridTaskFutureImpl<R> extends GridFutureAdapter<R> implements InternalComputeTaskFuture<R> {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java
index 1466b76..58b0c3a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskSessionImpl.java
@@ -820,7 +820,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> mapFuture() {
+ @Override public InternalFuture<?> mapFuture() {
return mapFut;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteComputeImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteComputeImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteComputeImpl.java
index 7205e76..fc391b6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteComputeImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteComputeImpl.java
@@ -61,8 +61,9 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
this.ctx = ctx;
this.prj = prj;
this.subjId = subjId;
-
- asyncSup = new IgniteAsyncSupportAdapter(async);
+ if (true) {
+ asyncSup = new IgniteAsyncSupportAdapter(async);
+ }
}
/** {@inheritDoc} */
@@ -89,14 +90,14 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void affinityRun(@Nullable String cacheName, Object affKey, Runnable job) throws IgniteCheckedException {
+ @Override public void affinityRun(@Nullable String cacheName, Object affKey, Runnable job) throws IgniteException {
A.notNull(affKey, "affKey");
A.notNull(job, "job");
guard();
try {
- asyncSup.saveOrGet(ctx.closure().affinityRun(cacheName, affKey, job, prj.nodes()));
+ asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().affinityRun(cacheName, affKey, job, prj.nodes())));
}
finally {
unguard();
@@ -105,14 +106,14 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
/** {@inheritDoc} */
@Override public <R> R affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job)
- throws IgniteCheckedException {
+ throws IgniteException {
A.notNull(affKey, "affKey");
A.notNull(job, "job");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().affinityCall(cacheName, affKey, job, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().affinityCall(cacheName, affKey, job, prj.nodes())));
}
finally {
unguard();
@@ -120,7 +121,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <T, R> R execute(String taskName, @Nullable T arg) throws IgniteCheckedException {
+ @Override public <T, R> R execute(String taskName, @Nullable T arg) throws IgniteException {
A.notNull(taskName, "taskName");
guard();
@@ -129,7 +130,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
ctx.task().setThreadContextIfNotNull(TC_SUBGRID, prj.nodes());
ctx.task().setThreadContextIfNotNull(TC_SUBJ_ID, subjId);
- return (R)asyncSup.saveOrGet(ctx.task().execute(taskName, arg));
+ return (R)asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.task().execute(taskName, arg)));
}
finally {
unguard();
@@ -138,7 +139,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
/** {@inheritDoc} */
@Override public <T, R> R execute(Class<? extends ComputeTask<T, R>> taskCls,
- @Nullable T arg) throws IgniteCheckedException {
+ @Nullable T arg) throws IgniteException {
A.notNull(taskCls, "taskCls");
guard();
@@ -147,7 +148,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
ctx.task().setThreadContextIfNotNull(TC_SUBGRID, prj.nodes());
ctx.task().setThreadContextIfNotNull(TC_SUBJ_ID, subjId);
- return asyncSup.saveOrGet(ctx.task().execute(taskCls, arg));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.task().execute(taskCls, arg)));
}
finally {
unguard();
@@ -155,7 +156,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <T, R> R execute(ComputeTask<T, R> task, @Nullable T arg) throws IgniteCheckedException {
+ @Override public <T, R> R execute(ComputeTask<T, R> task, @Nullable T arg) throws IgniteException {
A.notNull(task, "task");
guard();
@@ -164,7 +165,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
ctx.task().setThreadContextIfNotNull(TC_SUBGRID, prj.nodes());
ctx.task().setThreadContextIfNotNull(TC_SUBJ_ID, subjId);
- return asyncSup.saveOrGet(ctx.task().execute(task, arg));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.task().execute(task, arg)));
}
finally {
unguard();
@@ -172,13 +173,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void broadcast(Runnable job) throws IgniteCheckedException {
+ @Override public void broadcast(Runnable job) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- asyncSup.saveOrGet(ctx.closure().runAsync(BROADCAST, job, prj.nodes()));
+ asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().runAsync(BROADCAST, job, prj.nodes())));
}
finally {
unguard();
@@ -186,13 +187,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R> Collection<R> broadcast(Callable<R> job) throws IgniteCheckedException {
+ @Override public <R> Collection<R> broadcast(Callable<R> job) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(BROADCAST, Arrays.asList(job), prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(BROADCAST, Arrays.asList(job), prj.nodes())));
}
finally {
unguard();
@@ -200,13 +201,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R, T> Collection<R> broadcast(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteCheckedException {
+ @Override public <R, T> Collection<R> broadcast(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().broadcast(job, arg, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().broadcast(job, arg, prj.nodes())));
}
finally {
unguard();
@@ -214,13 +215,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void run(Runnable job) throws IgniteCheckedException {
+ @Override public void run(Runnable job) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- asyncSup.saveOrGet(ctx.closure().runAsync(BALANCE, job, prj.nodes()));
+ asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().runAsync(BALANCE, job, prj.nodes())));
}
finally {
unguard();
@@ -228,13 +229,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void run(Collection<? extends Runnable> jobs) throws IgniteCheckedException {
+ @Override public void run(Collection<? extends Runnable> jobs) throws IgniteException {
A.notEmpty(jobs, "jobs");
guard();
try {
- asyncSup.saveOrGet(ctx.closure().runAsync(BALANCE, jobs, prj.nodes()));
+ asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().runAsync(BALANCE, jobs, prj.nodes())));
}
finally {
unguard();
@@ -242,13 +243,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R, T> R apply(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteCheckedException {
+ @Override public <R, T> R apply(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(job, arg, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(job, arg, prj.nodes())));
}
finally {
unguard();
@@ -256,13 +257,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R> R call(Callable<R> job) throws IgniteCheckedException {
+ @Override public <R> R call(Callable<R> job) throws IgniteException {
A.notNull(job, "job");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(BALANCE, job, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(BALANCE, job, prj.nodes())));
}
finally {
unguard();
@@ -270,13 +271,13 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R> Collection<R> call(Collection<? extends Callable<R>> jobs) throws IgniteCheckedException {
+ @Override public <R> Collection<R> call(Collection<? extends Callable<R>> jobs) throws IgniteException {
A.notEmpty(jobs, "jobs");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(BALANCE, jobs, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(BALANCE, jobs, prj.nodes())));
}
finally {
unguard();
@@ -285,14 +286,14 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
/** {@inheritDoc} */
@Override public <T, R> Collection<R> apply(final IgniteClosure<T, R> job,
- @Nullable Collection<? extends T> args) throws IgniteCheckedException {
+ @Nullable Collection<? extends T> args) throws IgniteException {
A.notNull(job, "job");
A.notNull(args, "args");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(job, args, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(job, args, prj.nodes())));
}
finally {
unguard();
@@ -301,14 +302,14 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
/** {@inheritDoc} */
@Override public <R1, R2> R2 call(Collection<? extends Callable<R1>> jobs, IgniteReducer<R1, R2> rdc)
- throws IgniteCheckedException {
+ throws IgniteException {
A.notEmpty(jobs, "jobs");
A.notNull(rdc, "rdc");
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().forkjoinAsync(BALANCE, jobs, rdc, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().forkjoinAsync(BALANCE, jobs, rdc, prj.nodes())));
}
finally {
unguard();
@@ -317,7 +318,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
/** {@inheritDoc} */
@Override public <R1, R2, T> R2 apply(IgniteClosure<T, R1> job, Collection<? extends T> args,
- IgniteReducer<R1, R2> rdc) throws IgniteCheckedException {
+ IgniteReducer<R1, R2> rdc) throws IgniteException {
A.notNull(job, "job");
A.notNull(rdc, "rdc");
A.notNull(args, "args");
@@ -325,7 +326,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
guard();
try {
- return asyncSup.saveOrGet(ctx.closure().callAsync(job, args, rdc, prj.nodes()));
+ return asyncSup.saveOrGet(new IgniteFutureAdapter<>(ctx.closure().callAsync(job, args, rdc, prj.nodes())));
}
finally {
unguard();
@@ -333,7 +334,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R> Map<IgniteUuid, ComputeTaskFuture<R>> activeTaskFutures() {
+ @Override public <R> Map<IgniteUuid, InternalComputeTaskFuture<R>> activeTaskFutures() {
guard();
try {
@@ -391,7 +392,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void localDeployTask(Class<? extends ComputeTask> taskCls, ClassLoader clsLdr) throws IgniteCheckedException {
+ @Override public void localDeployTask(Class<? extends ComputeTask> taskCls, ClassLoader clsLdr) throws IgniteException {
A.notNull(taskCls, "taskCls", clsLdr, "clsLdr");
guard();
@@ -402,6 +403,9 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
if (dep == null)
throw new GridDeploymentException("Failed to deploy task (was task (re|un)deployed?): " + taskCls);
}
+ catch (IgniteCheckedException e) {
+ throw U.wrap(e);
+ }
finally {
unguard();
}
@@ -420,7 +424,7 @@ public class IgniteComputeImpl implements IgniteCompute, Externalizable {
}
/** {@inheritDoc} */
- @Override public void undeployTask(String taskName) throws IgniteCheckedException {
+ @Override public void undeployTask(String taskName) throws IgniteException {
A.notNull(taskName, "taskName");
guard();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteFutureAdapter.java
new file mode 100644
index 0000000..ddb2c88
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteFutureAdapter.java
@@ -0,0 +1,175 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.gridgain.grid.kernal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.lang.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ *
+ */
+public class IgniteFutureAdapter<R> implements IgniteFuture<R> {
+ /** */
+ protected final InternalFuture<R> delegate;
+
+ /** */
+ private volatile Map<IgniteInClosure<? super IgniteFuture<R>>, InClosureDelegate> listenersMap;
+
+ /**
+ * @param delegate Delegate.
+ */
+ public IgniteFutureAdapter(InternalFuture<R> delegate) {
+ this.delegate = delegate;
+ }
+
+ /** {@inheritDoc} */
+ @Override public R get() throws IgniteException {
+ try {
+ return delegate.get();
+ }
+ catch (IgniteCheckedException e) {
+ throw U.wrap(e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public R get(long timeout) throws IgniteException {
+ try {
+ return delegate.get(timeout);
+ }
+ catch (IgniteCheckedException e) {
+ throw U.wrap(e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public R get(long timeout, TimeUnit unit) throws IgniteException {
+ try {
+ return delegate.get(timeout, unit);
+ }
+ catch (IgniteCheckedException e) {
+ throw U.wrap(e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean cancel() throws IgniteException {
+ try {
+ return delegate.cancel();
+ }
+ catch (IgniteCheckedException e) {
+ throw U.wrap(e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isDone() {
+ return delegate.isDone();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isCancelled() {
+ return delegate.isCancelled();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long startTime() {
+ return delegate.startTime();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long duration() {
+ return delegate.duration();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void syncNotify(boolean syncNotify) {
+ delegate.syncNotify(syncNotify);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean syncNotify() {
+ return delegate.syncNotify();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void concurrentNotify(boolean concurNotify) {
+ delegate.concurrentNotify(concurNotify);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean concurrentNotify() {
+ return delegate.concurrentNotify();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void listenAsync(@Nullable final IgniteInClosure<? super IgniteFuture<R>> lsnr) {
+ Map<IgniteInClosure<? super IgniteFuture<R>>, InClosureDelegate> map = listenersMap;
+
+ if (map == null) {
+ synchronized (this) {
+ map = Collections.synchronizedMap(new HashMap<IgniteInClosure<? super IgniteFuture<R>>, InClosureDelegate>());
+
+ listenersMap = map;
+ }
+ }
+
+ InClosureDelegate closure = new InClosureDelegate((IgniteInClosure<IgniteFuture<R>>)lsnr);
+
+ map.put(lsnr, closure);
+
+ delegate.listenAsync(closure);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void stopListenAsync(@Nullable IgniteInClosure<? super IgniteFuture<R>>... lsnr) {
+ Map<IgniteInClosure<? super IgniteFuture<R>>, InClosureDelegate> map = listenersMap;
+
+ if (map == null)
+ return;
+
+ InClosureDelegate inClosureDelegate = map.remove(lsnr);
+
+ if (inClosureDelegate != null)
+ delegate.stopListenAsync(inClosureDelegate);
+ }
+
+ /** {@inheritDoc} */
+ @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<R>, T> doneCb) {
+ return new IgniteFutureAdapter<>(delegate.chain(new IgniteClosure<InternalFuture<R>, T>() {
+ @Override public T apply(InternalFuture<R> future) {
+ return doneCb.apply(IgniteFutureAdapter.this);
+ }
+ }));
+ }
+
+ /**
+ *
+ */
+ private class InClosureDelegate implements IgniteInClosure<InternalFuture<R>> {
+ /** */
+ private final IgniteInClosure<IgniteFuture<R>> userClosure;
+
+ public InClosureDelegate(IgniteInClosure<IgniteFuture<R>> userClosure) {
+ this.userClosure = userClosure;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void apply(InternalFuture<R> f) {
+ if (f == delegate)
+ userClosure.apply(IgniteFutureAdapter.this);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteSchedulerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteSchedulerImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteSchedulerImpl.java
index e713c21..8dbe31b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteSchedulerImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/IgniteSchedulerImpl.java
@@ -42,7 +42,7 @@ public class IgniteSchedulerImpl implements IgniteScheduler, Externalizable {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> runLocal(Runnable r) {
+ @Override public InternalFuture<?> runLocal(Runnable r) {
A.notNull(r, "r");
guard();
@@ -56,7 +56,7 @@ public class IgniteSchedulerImpl implements IgniteScheduler, Externalizable {
}
/** {@inheritDoc} */
- @Override public <R> IgniteFuture<R> callLocal(Callable<R> c) {
+ @Override public <R> InternalFuture<R> callLocal(Callable<R> c) {
A.notNull(c, "c");
guard();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/KernalFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/KernalFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/KernalFuture.java
new file mode 100644
index 0000000..b4f8497
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/KernalFuture.java
@@ -0,0 +1,16 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.gridgain.grid.kernal;
+
+/**
+ *
+ */
+public class KernalFuture<R> {
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java b/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
index 8be6cc1..823904c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.executor;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.future.*;
import org.gridgain.grid.util.lang.*;
@@ -81,7 +80,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
private boolean isBeingShutdown;
/** List of executing or scheduled for execution tasks. */
- private List<IgniteFuture<?>> futs = new ArrayList<>();
+ private List<InternalFuture<?>> futs = new ArrayList<>();
/** Rejected or completed tasks listener. */
private TaskTerminateListener lsnr = new TaskTerminateListener<>();
@@ -145,7 +144,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
/** {@inheritDoc} */
@Override public List<Runnable> shutdownNow() {
- List<IgniteFuture<?>> cpFuts;
+ List<InternalFuture<?>> cpFuts;
// Cancel all tasks.
synchronized (mux) {
@@ -154,7 +153,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
isBeingShutdown = true;
}
- for (IgniteFuture<?> task : cpFuts) {
+ for (InternalFuture<?> task : cpFuts) {
try {
task.cancel();
}
@@ -192,17 +191,17 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
if (end < 0)
end = Long.MAX_VALUE;
- List<IgniteFuture<?>> locTasks;
+ List<InternalFuture<?>> locTasks;
// Cancel all tasks.
synchronized (mux) {
locTasks = new ArrayList<>(futs);
}
- Iterator<IgniteFuture<?>> iter = locTasks.iterator();
+ Iterator<InternalFuture<?>> iter = locTasks.iterator();
while (iter.hasNext() && now < end) {
- IgniteFuture<?> fut = iter.next();
+ InternalFuture<?> fut = iter.next();
try {
fut.get(end - now);
@@ -255,8 +254,8 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
try {
comp.run(task);
- IgniteFuture<T> fut = comp.future().chain(new CX1<IgniteFuture<?>, T>() {
- @Override public T applyx(IgniteFuture<?> fut) throws IgniteCheckedException {
+ InternalFuture<T> fut = comp.future().chain(new CX1<InternalFuture<?>, T>() {
+ @Override public T applyx(InternalFuture<?> fut) throws IgniteCheckedException {
fut.get();
return res;
@@ -339,14 +338,14 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
checkShutdown();
- Collection<IgniteFuture<T>> taskFuts = new ArrayList<>();
+ Collection<InternalFuture<T>> taskFuts = new ArrayList<>();
assert comp.isAsync();
for (Callable<T> task : tasks) {
// Execute task without predefined timeout.
// GridFuture.cancel() will be called if timeout elapsed.
- IgniteFuture<T> fut;
+ InternalFuture<T> fut;
try {
comp.call(task);
@@ -365,7 +364,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
boolean isInterrupted = false;
- for (IgniteFuture<T> fut : taskFuts) {
+ for (InternalFuture<T> fut : taskFuts) {
if (!isInterrupted && now < end) {
try {
fut.get(end - now);
@@ -397,7 +396,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
List<Future<T>> futs = new ArrayList<>(taskFuts.size());
// Convert futures.
- for (IgniteFuture<T> fut : taskFuts) {
+ for (InternalFuture<T> fut : taskFuts) {
// Per executor service contract any task that was not completed
// should be cancelled upon return.
if (!fut.isDone())
@@ -414,7 +413,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
*
* @param fut Future to cancel.
*/
- private void cancelFuture(IgniteFuture<?> fut) {
+ private void cancelFuture(InternalFuture<?> fut) {
try {
fut.cancel();
}
@@ -479,13 +478,13 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
checkShutdown();
- Collection<IgniteFuture<T>> taskFuts = new ArrayList<>();
+ Collection<InternalFuture<T>> taskFuts = new ArrayList<>();
assert comp.isAsync();
for (Callable<T> cmd : tasks) {
// Execute task with predefined timeout.
- IgniteFuture<T> fut;
+ InternalFuture<T> fut;
try
{
@@ -508,7 +507,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
int errCnt = 0;
- for (IgniteFuture<T> fut : taskFuts) {
+ for (InternalFuture<T> fut : taskFuts) {
now = U.currentTimeMillis();
boolean cancel = false;
@@ -522,7 +521,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
// Cancel next tasks (avoid current task cancellation below in loop).
continue;
}
- catch (IgniteFutureTimeoutException ignored) {
+ catch (InternalFutureTimeoutException ignored) {
if (log.isDebugEnabled())
log.debug("Timeout occurred during getting task result: " + fut);
@@ -595,7 +594,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
* @return Future for command.
*/
@SuppressWarnings("unchecked")
- private <T> Future<T> addFuture(IgniteFuture<T> fut) {
+ private <T> Future<T> addFuture(InternalFuture<T> fut) {
synchronized (mux) {
if (!fut.isDone()) {
fut.listenAsync(lsnr);
@@ -610,12 +609,12 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
/**
* Listener to track tasks.
*/
- private class TaskTerminateListener<T> implements IgniteInClosure<IgniteFuture<T>> {
+ private class TaskTerminateListener<T> implements IgniteInClosure<InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public void apply(IgniteFuture<T> taskFut) {
+ @Override public void apply(InternalFuture<T> taskFut) {
synchronized (mux) {
futs.remove(taskFut);
}
@@ -623,20 +622,20 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
}
/**
- * Wrapper for {@link org.apache.ignite.lang.IgniteFuture}.
+ * Wrapper for {@link InternalFuture}.
* Used for compatibility {@link Future} interface.
* @param <T> The result type of the {@link Future} argument.
*/
private class TaskFutureWrapper<T> implements Future<T> {
/** */
- private final IgniteFuture<T> fut;
+ private final InternalFuture<T> fut;
/**
* Creates wrapper.
*
* @param fut Grid future.
*/
- TaskFutureWrapper(IgniteFuture<T> fut) {
+ TaskFutureWrapper(InternalFuture<T> fut) {
assert fut != null;
this.fut = fut;
@@ -702,7 +701,7 @@ public class GridExecutorService extends GridMetadataAwareAdapter implements Exe
return res;
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
TimeoutException e2 = new TimeoutException();
e2.initCause(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/ggfs/common/GridGgfsLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/ggfs/common/GridGgfsLogger.java b/modules/core/src/main/java/org/gridgain/grid/kernal/ggfs/common/GridGgfsLogger.java
index b9fcf3a..52b45c8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/ggfs/common/GridGgfsLogger.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/ggfs/common/GridGgfsLogger.java
@@ -436,7 +436,7 @@ public final class GridGgfsLogger {
try {
U.join(flushWorker);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
// No-op.
}
@@ -686,7 +686,7 @@ public final class GridGgfsLogger {
try {
U.await(flushCond, 1000L, TimeUnit.MILLISECONDS);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
t.interrupt();
break;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/discovery/GridDiscoveryManager.java
index 54994d1..0c20c44 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/discovery/GridDiscoveryManager.java
@@ -941,7 +941,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
* @param awaitVer Topology version to await.
* @return Future.
*/
- public IgniteFuture<Long> topologyFuture(final long awaitVer) {
+ public InternalFuture<Long> topologyFuture(final long awaitVer) {
long topVer = topologyVersion();
if (topVer >= awaitVer)
@@ -1585,7 +1585,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
}
/** {@inheritDoc} */
- @Override protected void body() throws GridInterruptedException {
+ @Override protected void body() throws InternalInterruptedException {
while (!isCancelled()) {
U.sleep(METRICS_UPDATE_FREQ);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/eventstorage/GridEventStorageManager.java
index 87da0a9..b0f6cc7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/eventstorage/GridEventStorageManager.java
@@ -654,7 +654,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
* @param types Event types to wait for.
* @return Event future.
*/
- public <T extends IgniteEvent> IgniteFuture<T> waitForEvent(@Nullable final IgnitePredicate<T> p,
+ public <T extends IgniteEvent> InternalFuture<T> waitForEvent(@Nullable final IgnitePredicate<T> p,
@Nullable int... types) {
final GridFutureAdapter<T> fut = new GridFutureAdapter<>(ctx);
@@ -753,7 +753,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
* @param timeout Maximum time to wait for result, if {@code 0}, then wait until result is received.
* @return Collection of events.
*/
- public <T extends IgniteEvent> IgniteFuture<List<T>> remoteEventsAsync(final IgnitePredicate<T> p,
+ public <T extends IgniteEvent> InternalFuture<List<T>> remoteEventsAsync(final IgnitePredicate<T> p,
final Collection<? extends ClusterNode> nodes, final long timeout) {
assert p != null;
assert nodes != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
index 926f717..4c1934e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.portables.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.cache.*;
@@ -205,7 +204,7 @@ public class GridAffinityAssignmentCache {
* @param topVer Topology version to await for.
* @return Future that will be completed after affinity for topology version {@code topVer} is calculated.
*/
- public IgniteFuture<Long> readyFuture(long topVer) {
+ public InternalFuture<Long> readyFuture(long topVer) {
GridAffinityAssignment aff = head.get();
if (aff.topologyVersion() >= topVer) {
@@ -339,7 +338,7 @@ public class GridAffinityAssignmentCache {
log.debug("Will wait for topology version [locNodeId=" + ctx.localNodeId() +
", topVer=" + topVer + ']');
- IgniteFuture<Long> fut = readyFuture(topVer);
+ InternalFuture<Long> fut = readyFuture(topVer);
if (fut != null)
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityProcessor.java
index 74a1a49..d5a3bc7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityProcessor.java
@@ -53,7 +53,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
private static final String NULL_NAME = U.id8(UUID.randomUUID());
/** Affinity map. */
- private final ConcurrentMap<AffinityAssignmentKey, IgniteFuture<AffinityInfo>> affMap = new ConcurrentHashMap8<>();
+ private final ConcurrentMap<AffinityAssignmentKey, InternalFuture<AffinityInfo>> affMap = new ConcurrentHashMap8<>();
/** Listener. */
private final GridLocalEventListener lsnr = new GridLocalEventListener() {
@@ -247,7 +247,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
private AffinityInfo affinityCache(@Nullable final String cacheName, long topVer) throws IgniteCheckedException {
AffinityAssignmentKey key = new AffinityAssignmentKey(cacheName, topVer);
- IgniteFuture<AffinityInfo> fut = affMap.get(key);
+ InternalFuture<AffinityInfo> fut = affMap.get(key);
if (fut != null)
return fut.get();
@@ -264,7 +264,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
new GridAffinityAssignment(topVer, cctx.affinity().assignments(topVer)),
cctx.portableEnabled());
- IgniteFuture<AffinityInfo> old = affMap.putIfAbsent(key, new GridFinishedFuture<>(ctx, info));
+ InternalFuture<AffinityInfo> old = affMap.putIfAbsent(key, new GridFinishedFuture<>(ctx, info));
if (old != null)
info = old.get();
@@ -285,7 +285,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
GridFutureAdapter<AffinityInfo> fut0 = new GridFutureAdapter<>();
- IgniteFuture<AffinityInfo> old = affMap.putIfAbsent(key, fut0);
+ InternalFuture<AffinityInfo> old = affMap.putIfAbsent(key, fut0);
if (old != null)
return old.get();
[03/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
index cafff4e..700f1fe 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
@@ -234,7 +234,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest {
new InvocationHandler() {
@Override public Object invoke(Object proxy, Method mtd, Object[] args) throws Throwable {
if (failMtd.equals(mtd.getName())) {
- IgniteFuture<Object> fut = new GridFinishedFuture<>(ctx,
+ InternalFuture<Object> fut = new GridFinishedFuture<>(ctx,
new IgniteCheckedException("Operation failed"));
fut.syncNotify(sync);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java
index 835bb26..72a1889 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.managed.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.affinity.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -139,11 +138,11 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs1.deployClusterSingleton(name, new DummyService());
- IgniteFuture<?> fut1 = svcs1.future();
+ InternalFuture<?> fut1 = svcs1.future();
svcs2.deployClusterSingleton(name, new DummyService());
- IgniteFuture<?> fut2 = svcs2.future();
+ InternalFuture<?> fut2 = svcs2.future();
info("Deployed service: " + name);
@@ -168,11 +167,11 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs1.deployClusterSingleton(name, new DummyService());
- IgniteFuture<?> fut1 = svcs1.future();
+ InternalFuture<?> fut1 = svcs1.future();
svcs2.deployNodeSingleton(name, new DummyService());
- IgniteFuture<?> fut2 = svcs2.future();
+ InternalFuture<?> fut2 = svcs2.future();
info("Deployed service: " + name);
@@ -252,7 +251,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs.deployNodeSingleton(name, new DummyService());
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -284,7 +283,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs.deployClusterSingleton(name, new DummyService());
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -318,7 +317,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs.deployKeyAffinitySingleton(name, new AffinityService(affKey),
CACHE_NAME, affKey);
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -345,7 +344,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs.deployMultiple(name, new DummyService(), nodeCount() * 2, 3);
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -379,7 +378,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs
svcs.deployMultiple(name, new DummyService(), cnt, 3);
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorMultiNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
index e682fc8..f0316d2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
@@ -40,7 +40,7 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA
svcs.deployClusterSingleton(name, new DummyService());
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -88,7 +88,7 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA
svcs.deployKeyAffinitySingleton(name, new AffinityService(affKey),
CACHE_NAME, affKey);
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
@@ -126,7 +126,7 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA
svcs.deployNodeSingleton(name, new DummyService());
- IgniteFuture<?> fut = svcs.future();
+ InternalFuture<?> fut = svcs.future();
info("Deployed service: " + name);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerFailoverSelfTest.java
index a9953ec..1e5b563 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerFailoverSelfTest.java
@@ -131,7 +131,7 @@ public class GridStreamerFailoverSelfTest extends GridCommonAbstractTest {
final AtomicBoolean done = new AtomicBoolean(false);
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java
index 11bcf55..c664246 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java
@@ -229,7 +229,7 @@ public class GridStreamerSelfTest extends GridCommonAbstractTest {
try {
U.sleep(1000);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessorSelfTest.java
index 429b1a7..b61ac11 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessorSelfTest.java
@@ -374,7 +374,7 @@ public class GridTimeoutProcessorSelfTest extends GridCommonAbstractTest {
public void testAddRemoveInterleaving() throws Exception {
final AtomicInteger callCnt = new AtomicInteger(0);
- IgniteFuture<?> rmv = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<?> rmv = GridTestUtils.runMultiThreadedAsync(new Runnable() {
/** {@inheritDoc} */
@SuppressWarnings("CallToThreadYield")
@Override public void run() {
@@ -432,7 +432,7 @@ public class GridTimeoutProcessorSelfTest extends GridCommonAbstractTest {
final CountDownLatch latch = new CountDownLatch(max * threads);
- IgniteFuture<?> called = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<?> called = GridTestUtils.runMultiThreadedAsync(new Runnable() {
/** {@inheritDoc} */
@SuppressWarnings("CallToThreadYield")
@Override public void run() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/lang/GridBasicPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridBasicPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridBasicPerformanceTest.java
index 11792c3..5a9e906 100644
--- a/modules/core/src/test/java/org/gridgain/grid/lang/GridBasicPerformanceTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridBasicPerformanceTest.java
@@ -814,7 +814,7 @@ public class GridBasicPerformanceTest {
final CountDownLatch latch1 = new CountDownLatch(1);
- IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
latch1.await();
@@ -847,7 +847,7 @@ public class GridBasicPerformanceTest {
final CountDownLatch latch2 = new CountDownLatch(1);
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@SuppressWarnings("StatementWithEmptyBody")
@Nullable @Override public Object call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java
index a285ef7..cab5c67 100644
--- a/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.cluster.*;
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.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -3181,7 +3180,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest {
new GridFutureAdapter<>(), new GridFutureAdapter<>(), new GridFutureAdapter<>()
};
- for (IgniteFuture fut : futs) {
+ for (InternalFuture fut : futs) {
assert !fut.isDone();
}
@@ -3202,7 +3201,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest {
F.<Object>awaitAll(futs);
- for (IgniteFuture fut : futs) {
+ for (InternalFuture fut : futs) {
assert fut.isDone();
}
}
@@ -3214,7 +3213,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest {
public void testAwaitOne() throws Exception {
final GridFutureAdapter<?>[] futs = {new GridFutureAdapter(), new GridFutureAdapter(), new GridFutureAdapter()};
- for (IgniteFuture fut : futs) {
+ for (InternalFuture fut : futs) {
assert !fut.isDone();
}
@@ -3231,16 +3230,16 @@ public class GridFuncSelfTest extends GridCommonAbstractTest {
}
}.start();
- IgniteFuture doneFut = F.awaitOne((IgniteFuture[])futs);
+ InternalFuture doneFut = F.awaitOne((InternalFuture[])futs);
assert doneFut.isDone();
- for (IgniteFuture fut : futs) {
+ for (InternalFuture fut : futs) {
assert doneFut == fut ? fut.isDone() : !fut.isDone();
}
// Check only NULLs.
- IgniteFuture<Object> fut = F.awaitOne(Arrays.asList((IgniteFuture<Object>)null, null, null));
+ InternalFuture<Object> fut = F.awaitOne(Arrays.asList((InternalFuture<Object>)null, null, null));
assert fut.isDone();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java
index 871a25a..7e99953 100644
--- a/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java
@@ -67,8 +67,8 @@ public class GridFutureListenPerformanceTest {
futs.add(fut);
for (int k = 1; k < rnd.nextInt(3); k++) {
- fut.listenAsync(new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
try {
t.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/loadtest/GridLoadTestStatistics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridLoadTestStatistics.java b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridLoadTestStatistics.java
index 7b5000e..56862ca 100644
--- a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridLoadTestStatistics.java
+++ b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridLoadTestStatistics.java
@@ -65,7 +65,7 @@ public class GridLoadTestStatistics {
* @return Task count.
*/
@SuppressWarnings("unchecked")
- public synchronized long onTaskCompleted(@Nullable ComputeTaskFuture<?> fut, int jobNum, long taskTime) {
+ public synchronized long onTaskCompleted(@Nullable InternalComputeTaskFuture<?> fut, int jobNum, long taskTime) {
taskCnt++;
jobCnt += jobNum;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java
index 4ab1cd4..3f27ae7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
import org.apache.log4j.*;
import org.apache.log4j.varia.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.testframework.*;
@@ -79,7 +78,7 @@ public final class GridSingleExecutionTest {
// Execute Hello World task.
comp.execute(!useSes ? TestTask.class : TestSessionTask.class, null);
- ComputeTaskFuture<Object> fut = comp.future();
+ InternalComputeTaskFuture<Object> fut = comp.future();
if (useSes) {
fut.getTaskSession().setAttribute("attr1", 1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java b/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java
index 4f3e036..8a5b1b6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java
@@ -139,7 +139,7 @@ public class GridFileSwapSpaceSpiMultithreadedLoadTest extends GridCommonAbstrac
}
});
- IgniteFuture<?> evictFut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<?> evictFut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
@Override public void run() {
try {
ThreadLocalRandom8 rnd = ThreadLocalRandom8.current();
@@ -201,7 +201,7 @@ public class GridFileSwapSpaceSpiMultithreadedLoadTest extends GridCommonAbstrac
}
});
- IgniteFuture<?> unswapFut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+ InternalFuture<?> unswapFut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
@Override public void run() {
try {
ThreadLocalRandom8 rnd = ThreadLocalRandom8.current();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java
index 26e9436..27e0b30 100644
--- a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java
@@ -20,7 +20,6 @@ import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.product.*;
import org.apache.ignite.streamer.*;
import org.apache.ignite.streamer.window.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.cache.datastructures.*;
@@ -612,7 +611,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
public void testScheduler() throws Exception {
IgniteScheduler scheduler = grid().scheduler();
- IgniteFuture<?> fut = scheduler.runLocal(new Runnable() {
+ InternalFuture<?> fut = scheduler.runLocal(new Runnable() {
@Override public void run() {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/messaging/GridMessagingSelfTest.java
index f7034b6..3574aea 100644
--- a/modules/core/src/test/java/org/gridgain/grid/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/messaging/GridMessagingSelfTest.java
@@ -1020,7 +1020,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
Assert.assertNull(id);
- IgniteFuture<UUID> fut = msg.future();
+ InternalFuture<UUID> fut = msg.future();
Assert.assertNotNull(fut);
@@ -1048,7 +1048,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
msg.stopRemoteListen(id);
- IgniteFuture<?> stopFut = msg.future();
+ InternalFuture<?> stopFut = msg.future();
Assert.assertNotNull(stopFut);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java
index b6c6a28..cf56830 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.p2p;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.failover.never.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.config.*;
@@ -82,12 +81,12 @@ abstract class GridAbstractMultinodeRedeployTest extends GridCommonAbstractTest
ignite1.compute().localDeployTask(loadTaskClass(), loadTaskClass().getClassLoader());
ignite2.compute().localDeployTask(loadTaskClass(), loadTaskClass().getClassLoader());
- ComputeTaskFuture<int[]> fut1 = executeAsync(ignite1.compute(), TASK_NAME, Arrays.<UUID>asList(
+ InternalComputeTaskFuture<int[]> fut1 = executeAsync(ignite1.compute(), TASK_NAME, Arrays.<UUID>asList(
ignite1.cluster().localNode().id(),
ignite2.cluster().localNode().id(),
ignite3.cluster().localNode().id()));
- ComputeTaskFuture<int[]> fut2 = executeAsync(ignite2.compute(), TASK_NAME, Arrays.<UUID>asList(
+ InternalComputeTaskFuture<int[]> fut2 = executeAsync(ignite2.compute(), TASK_NAME, Arrays.<UUID>asList(
ignite1.cluster().localNode().id(),
ignite2.cluster().localNode().id(),
ignite3.cluster().localNode().id()));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java
index ab7330f..978caa5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java
@@ -2,7 +2,6 @@ package org.gridgain.grid.p2p;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
/**
@@ -21,7 +20,7 @@ public final class GridP2PTestTaskExecutionTest extends GridCommonAbstractTest {
assert !g.cluster().forRemotes().nodes().isEmpty() : "Test requires at least 1 remote node.";
/* Execute GridP2PTestTask. */
- ComputeTaskFuture<Integer> fut = executeAsync(g.compute(), GridP2PTestTask.class, 1);
+ InternalComputeTaskFuture<Integer> fut = executeAsync(g.compute(), GridP2PTestTask.class, 1);
/* Wait for task completion. */
Integer res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java
index 859d690..2c635f8 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -125,7 +124,7 @@ public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstr
private void checkTask(int num) throws InterruptedException, IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java
index 56d1b49..d932e71 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -124,7 +123,7 @@ public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstract
private void checkTask(int num) throws InterruptedException, IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
boolean await = startSignal[num].await(WAIT_TIME, TimeUnit.MILLISECONDS);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java
index 3e7c8a8..52b583b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -124,7 +123,7 @@ public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstrac
private void checkTask(int num) throws InterruptedException, IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
index f98e038..0215142 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.checkpoint.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.junits.common.*;
@@ -106,7 +105,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb
try {
ignite.compute().localDeployTask(GridCheckpointTestTask.class, GridCheckpointTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), "GridCheckpointTestTask", null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), "GridCheckpointTestTask", null);
fut.getTaskSession().saveCheckpoint("future:session:key", "future:session:testval");
fut.getTaskSession().saveCheckpoint("future:global:key", "future:global:testval",
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java
index 9860c30..450b20f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.session;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -107,7 +106,7 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac
comp.execute(GridTaskSessionTestTask.class.getName(), num);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java
index a46e37b..d7700f2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.session;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -103,7 +102,7 @@ public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstra
private void checkTask(int num) throws InterruptedException, IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), num);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java
index 729f7ef..5c4e4e5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -105,7 +104,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT
private void checkTask(int num) throws IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), null);
int exp = SPLIT_COUNT - 1;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java
index 27906d0..52184dd 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -118,7 +117,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes
private void checkTask(int num) throws InterruptedException, IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java
index 9c780fb..029684b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -81,7 +80,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo
for (int i = 0; i < 1; i++) {
refreshInitialData();
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), null);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), null);
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java
index db09475..f04a980 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import java.io.*;
@@ -42,7 +41,7 @@ public class GridSessionSetJobAttribute2SelfTest extends GridCommonAbstractTest
ignite1.compute().localDeployTask(SessionTestTask.class, SessionTestTask.class.getClassLoader());
- ComputeTaskFuture<?> fut =
+ InternalComputeTaskFuture<?> fut =
executeAsync(ignite1.compute(), SessionTestTask.class.getName(), ignite2.cluster().localNode().id());
fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java
index e84d8f3..da26bf2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import java.io.*;
@@ -48,7 +47,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT
for (int i = 0; i < TESTS_COUNT; i++) {
comp.withTimeout(100000).execute(SessionTestTask.class.getName(), ignite2.cluster().localNode().id());
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
fut.getTaskSession().setAttribute(TEST_ATTR_KEY, SETS_ATTR_COUNT);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java
index 165cc9d..d67a274 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -106,7 +105,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest {
private void checkTask(int num) throws IgniteCheckedException {
Ignite ignite = G.ignite(getTestGridName());
- ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
+ InternalComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num);
Object res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java
index 7a9fe4b..0a9b4a4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -79,7 +78,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb
comp.execute(GridTaskSessionTestTask.class.getName(), null);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
assert fut != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java
index 56c9328..d758714 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.session;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -92,7 +91,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest
comp.execute(GridTaskSessionTestTask.class.getName(), num);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
Object res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java
index b97d2f6..23cd3f5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.session;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
import org.gridgain.testframework.junits.common.*;
@@ -92,7 +91,7 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT
comp.execute(GridTaskSessionTestTask.class.getName(), num);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
Object res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java
index e03e4b0..c4204c2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.gridgain.grid.util.typedef.*;
@@ -203,7 +202,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest {
comp.execute(TestSessionTask.class.getName(), type);
- ComputeTaskFuture<?> fut = comp.future();
+ InternalComputeTaskFuture<?> fut = comp.future();
fut.getTaskSession().mapFuture().get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedDequeMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedDequeMultiThreadedTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedDequeMultiThreadedTest.java
index 5845926..9595ad7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedDequeMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedDequeMultiThreadedTest.java
@@ -36,7 +36,7 @@ public class GridConcurrentLinkedDequeMultiThreadedTest extends GridCommonAbstra
final ConcurrentLinkedDeque8<Byte> queue = new ConcurrentLinkedDeque8<>();
// Poll thread.
- IgniteFuture<?> pollFut = multithreadedAsync(
+ InternalFuture<?> pollFut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
info("Thread started.");
@@ -61,7 +61,7 @@ public class GridConcurrentLinkedDequeMultiThreadedTest extends GridCommonAbstra
);
// Producer thread.
- IgniteFuture<?> prodFut = multithreadedAsync(
+ InternalFuture<?> prodFut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
info("Thread started.");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java
index 3b1c24e..67efbde 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java
@@ -261,7 +261,7 @@ public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommon
final ConcurrentHashMap<String, LinkedList<Integer>> res = new ConcurrentHashMap<>();
// Producer thread.
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
String thNm = Thread.currentThread().getName();
@@ -323,7 +323,7 @@ public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommon
long start = System.currentTimeMillis();
// Updater threads.
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Random rnd = new Random();
@@ -408,7 +408,7 @@ public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommon
long start = System.currentTimeMillis();
// Updater threads.
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Random rnd = new Random();
@@ -482,7 +482,7 @@ public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommon
long start = System.currentTimeMillis();
// Updater threads.
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/GridIndexFillTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridIndexFillTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridIndexFillTest.java
index d44285b..da48111 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/GridIndexFillTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/GridIndexFillTest.java
@@ -107,7 +107,7 @@ public class GridIndexFillTest extends GridCommonAbstractTest {
public void testSnaptreeParallelBuild() throws Exception {
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
ThreadLocalRandom rnd = ThreadLocalRandom.current();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java
index 7561fbe..fe0ba16 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java
@@ -45,7 +45,7 @@ public class GridSnapshotLockSelfTest extends GridCommonAbstractTest {
}
};
- IgniteFuture<?> fut1 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut1 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -73,7 +73,7 @@ public class GridSnapshotLockSelfTest extends GridCommonAbstractTest {
}
}, 15, "update");
- IgniteFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while(!stop.get()) {
T3<Long, Long, Long> t;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/GridSpinReadWriteLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridSpinReadWriteLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridSpinReadWriteLockSelfTest.java
index d19af29..fc5b461 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/GridSpinReadWriteLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/GridSpinReadWriteLockSelfTest.java
@@ -49,7 +49,7 @@ public class GridSpinReadWriteLockSelfTest extends GridCommonAbstractTest {
final CountDownLatch latch = new CountDownLatch(1);
- IgniteFuture<?> f = multithreadedAsync(
+ InternalFuture<?> f = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
assert !lock.tryWriteLock();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java
index 7ed0296..b8f90f4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java
@@ -31,7 +31,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest {
GridCompoundFuture<Boolean, Boolean> fut = new GridCompoundFuture<>();
for (int i = 0; i < 5; i++) {
- IgniteFuture<Boolean> part = new GridFinishedFuture<>(ctx, true);
+ InternalFuture<Boolean> part = new GridFinishedFuture<>(ctx, true);
part.syncNotify(true);
@@ -135,7 +135,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest {
fut.markInitialized();
- IgniteFuture<?> complete = multithreadedAsync(new Runnable() {
+ InternalFuture<?> complete = multithreadedAsync(new Runnable() {
@Override public void run() {
GridFutureAdapter<Boolean> part;
@@ -170,7 +170,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest {
fut.markInitialized();
- IgniteFuture<?> complete = multithreadedAsync(new Runnable() {
+ InternalFuture<?> complete = multithreadedAsync(new Runnable() {
@Override public void run() {
GridFutureAdapter<Boolean> part;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java
index c3ade47..4b0275a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java
@@ -40,12 +40,12 @@ public class GridEmbeddedFutureSelfTest extends GridCommonAbstractTest {
public void testFutureChain() throws Exception {
GridFutureAdapter<Integer> fut = new GridFutureAdapter<>(ctx);
- IgniteFuture<Integer> cur = fut;
+ InternalFuture<Integer> cur = fut;
for (int i = 0; i < DFLT_MAX_CONCURRENT_ASYNC_OPS; i++) {
cur = new GridEmbeddedFuture<>(cur,
- new IgniteBiClosure<Integer, Exception, IgniteFuture<Integer>>() {
- @Override public IgniteFuture<Integer> apply(Integer o, Exception e) {
+ new IgniteBiClosure<Integer, Exception, InternalFuture<Integer>>() {
+ @Override public InternalFuture<Integer> apply(Integer o, Exception e) {
return new GridFinishedFuture<>(ctx, o);
}
}, ctx);
@@ -111,7 +111,7 @@ public class GridEmbeddedFutureSelfTest extends GridCommonAbstractTest {
try {
embFut.get(1, SECONDS);
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
fail("Failed with timeout exception: " + e);
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java
index 9a009de..b9f1e14 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java
@@ -61,7 +61,7 @@ public class GridFinishedFutureSelfTest extends GridCommonAbstractTest {
IgniteMarshaller m = new IgniteOptimizedMarshaller();
ClassLoader clsLdr = getClass().getClassLoader();
- IgniteFuture<Object> orig = t == null ? new GridFinishedFuture<>(ctx, ex) :
+ InternalFuture<Object> orig = t == null ? new GridFinishedFuture<>(ctx, ex) :
new GridFinishedFuture<>(ctx, t);
orig.syncNotify(syncNotify);
@@ -82,8 +82,8 @@ public class GridFinishedFutureSelfTest extends GridCommonAbstractTest {
final CountDownLatch done = new CountDownLatch(1);
- fut.listenAsync(new CI1<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ fut.listenAsync(new CI1<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
done.countDown();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java
index d93f098..d4d40c5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java
@@ -88,7 +88,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
return fut.get();
}
- }, IgniteFutureCancelledException.class, null);
+ }, InternalFutureCancelledException.class, null);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -100,7 +100,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
return fut.get();
}
- }, IgniteFutureCancelledException.class, null);
+ }, InternalFutureCancelledException.class, null);
}
/**
@@ -118,8 +118,8 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
final AtomicReference<Exception> err = new AtomicReference<>();
for (int i = 0; i < lsnrCnt; i++) {
- fut.listenAsync(new CI1<IgniteFuture<String>>() {
- @Override public void apply(IgniteFuture<String> t) {
+ fut.listenAsync(new CI1<InternalFuture<String>>() {
+ @Override public void apply(InternalFuture<String> t) {
if (Thread.currentThread() != runThread)
err.compareAndSet(null, new Exception("Wrong notification thread: " + Thread.currentThread()));
@@ -139,8 +139,8 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
err.set(null);
- fut.listenAsync(new CI1<IgniteFuture<String>>() {
- @Override public void apply(IgniteFuture<String> t) {
+ fut.listenAsync(new CI1<InternalFuture<String>>() {
+ @Override public void apply(InternalFuture<String> t) {
if (Thread.currentThread() != runThread)
err.compareAndSet(null, new Exception("Wrong notification thread: " + Thread.currentThread()));
@@ -179,8 +179,8 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
final AtomicReference<Exception> err = new AtomicReference<>();
for (int i = 0; i < lsnrCnt; i++) {
- fut.listenAsync(new CI1<IgniteFuture<String>>() {
- @Override public void apply(IgniteFuture<String> t) {
+ fut.listenAsync(new CI1<InternalFuture<String>>() {
+ @Override public void apply(InternalFuture<String> t) {
if (Thread.currentThread() == runThread)
err.compareAndSet(null, new Exception("Wrong notification thread: " +
Thread.currentThread()));
@@ -201,8 +201,8 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
err.set(null);
- fut.listenAsync(new CI1<IgniteFuture<String>>() {
- @Override public void apply(IgniteFuture<String> t) {
+ fut.listenAsync(new CI1<InternalFuture<String>>() {
+ @Override public void apply(InternalFuture<String> t) {
if (Thread.currentThread() == runThread)
err.compareAndSet(null, new Exception("Wrong notification thread: " + Thread.currentThread()));
@@ -227,8 +227,8 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
*/
@SuppressWarnings("ErrorNotRethrown")
public void testChaining() throws Exception {
- final CX1<IgniteFuture<Object>, Object> passThrough = new CX1<IgniteFuture<Object>, Object>() {
- @Override public Object applyx(IgniteFuture<Object> f) throws IgniteCheckedException {
+ final CX1<InternalFuture<Object>, Object> passThrough = new CX1<InternalFuture<Object>, Object>() {
+ @Override public Object applyx(InternalFuture<Object> f) throws IgniteCheckedException {
return f.get();
}
};
@@ -246,7 +246,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
// Test result returned.
GridFutureAdapter<Object> fut = new GridFutureAdapter<>(ctx);
- IgniteFuture<Object> chain = fut.chain(passThrough);
+ InternalFuture<Object> chain = fut.chain(passThrough);
assertFalse(fut.isDone());
assertFalse(chain.isDone());
@@ -256,7 +256,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
fail("Expects timeout exception.");
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Expected timeout exception: " + e.getMessage());
}
@@ -325,7 +325,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Caught expected exception: " + e);
}
@@ -342,7 +342,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
@@ -351,7 +351,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
@@ -417,7 +417,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
@@ -426,7 +426,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java
index f97de41..d88d37c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java
@@ -66,8 +66,8 @@ public class GridFutureListenPerformanceTest {
futs.add(fut);
for (int k = 1; k < rnd.nextInt(3); k++) {
- fut.listenAsync(new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> t) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<Object>>() {
+ @Override public void apply(InternalFuture<Object> t) {
try {
t.get();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java
index d5e9e5d..77b9ece 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java
@@ -85,7 +85,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest {
return fut.get();
}
- }, IgniteFutureCancelledException.class, null);
+ }, InternalFutureCancelledException.class, null);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -97,7 +97,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest {
return fut.get();
}
- }, IgniteFutureCancelledException.class, null);
+ }, InternalFutureCancelledException.class, null);
}
/**
@@ -168,7 +168,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Caught expected exception: " + e);
}
@@ -185,7 +185,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
@@ -194,7 +194,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java
index cccf7a5..157cec4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.util.ipc.shmem;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.testframework.junits.common.*;
import org.jdk8.backport.*;
@@ -59,7 +58,7 @@ public class GridIpcSharedMemorySpaceSelfTest extends GridCommonAbstractTest {
final AtomicReference<GridIpcSharedMemorySpace> spaceRef = new AtomicReference<>();
- IgniteFuture<?> fut1 = multithreadedAsync(
+ InternalFuture<?> fut1 = multithreadedAsync(
new Callable<Object>() {
@SuppressWarnings("TooBroadScope")
@Override public Object call() throws Exception {
@@ -90,7 +89,7 @@ public class GridIpcSharedMemorySpaceSelfTest extends GridCommonAbstractTest {
1,
"writer");
- IgniteFuture<?> fut2 = multithreadedAsync(
+ InternalFuture<?> fut2 = multithreadedAsync(
new Callable<Object>() {
@SuppressWarnings({"TooBroadScope", "StatementWithEmptyBody"})
@Override public Object call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java
index 14ee90d..7fd5664 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java
@@ -93,7 +93,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
GridNioServer<?> srvr = startServer(PORT, new GridPlainParser(), lsnr);
try {
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override
public void run() {
byte[] msg = new byte[MSG_SIZE];
@@ -247,7 +247,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
final AtomicBoolean running = new AtomicBoolean(true);
try {
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override
public void run() {
try {
@@ -619,7 +619,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
new EchoListener());
try {
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings("BusyWait")
@Override public void run() {
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapMapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapMapAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapMapAbstractSelfTest.java
index 1833414..217f53e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapMapAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapMapAbstractSelfTest.java
@@ -654,7 +654,7 @@ public abstract class GridOffHeapMapAbstractSelfTest extends GridCommonAbstractT
final AtomicBoolean run = new AtomicBoolean(true);
- IgniteFuture<?> itFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> itFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
startLatch.await();
@@ -679,7 +679,7 @@ public abstract class GridOffHeapMapAbstractSelfTest extends GridCommonAbstractT
}
}, 1);
- IgniteFuture<?> putFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> putFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
startLatch.await();
@@ -738,7 +738,7 @@ public abstract class GridOffHeapMapAbstractSelfTest extends GridCommonAbstractT
keys[i][0] = (byte)i; // hash
}
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Void>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Void>() {
@Override
public Void call() throws IgniteCheckedException {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java
index 6f8e63c..28c6fb5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java
@@ -587,7 +587,7 @@ public abstract class GridOffHeapPartitionedMapAbstractSelfTest extends GridComm
final AtomicBoolean running = new AtomicBoolean(true);
- IgniteFuture<?> iterFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> iterFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
while (running.get()) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
index 8dbf32d..77e66ad 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
@@ -159,7 +159,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -214,7 +214,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -285,7 +285,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -340,7 +340,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/offheap/unsafe/GridUnsafeMemorySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
index c41e103..b779830 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.util.offheap.unsafe;
-import org.apache.ignite.lang.IgniteFuture;
+import org.apache.ignite.lang.InternalFuture;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.X;
import org.gridgain.testframework.junits.common.*;
@@ -256,7 +256,7 @@ public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest {
final AtomicBoolean run = new AtomicBoolean(true);
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
int x = 0;
@@ -309,7 +309,7 @@ public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest {
final LongAdder locAdder = new LongAdder();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new GridRandom();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/jvmtest/ConcurrentMapTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/jvmtest/ConcurrentMapTest.java b/modules/core/src/test/java/org/gridgain/jvmtest/ConcurrentMapTest.java
index 5beba7e..3ed4350 100644
--- a/modules/core/src/test/java/org/gridgain/jvmtest/ConcurrentMapTest.java
+++ b/modules/core/src/test/java/org/gridgain/jvmtest/ConcurrentMapTest.java
@@ -76,7 +76,7 @@ public class ConcurrentMapTest {
final AtomicInteger writes = new AtomicInteger();
- IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut1 = GridTestUtils.runMultiThreadedAsync(
new Runnable() {
@Override public void run() {
while (!done.get()) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/jvmtest/NetworkFailureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/jvmtest/NetworkFailureTest.java b/modules/core/src/test/java/org/gridgain/jvmtest/NetworkFailureTest.java
index 0534754..7717cba 100644
--- a/modules/core/src/test/java/org/gridgain/jvmtest/NetworkFailureTest.java
+++ b/modules/core/src/test/java/org/gridgain/jvmtest/NetworkFailureTest.java
@@ -34,7 +34,7 @@ public class NetworkFailureTest extends TestCase {
final InetAddress addr = InetAddress.getByName("192.168.0.100");
- IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
ServerSocket srvSock = null;
@@ -72,7 +72,7 @@ public class NetworkFailureTest extends TestCase {
"server"
);
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Socket sock = null;
@@ -133,7 +133,7 @@ public class NetworkFailureTest extends TestCase {
public void testReadTimeout() throws Exception {
final InetAddress addr = InetAddress.getByName("192.168.3.10");
- IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
ServerSocket srvSock = null;
@@ -174,7 +174,7 @@ public class NetworkFailureTest extends TestCase {
"server"
);
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Socket sock = null;
@@ -217,7 +217,7 @@ public class NetworkFailureTest extends TestCase {
final InetAddress addr = InetAddress.getByName("192.168.0.100");
- IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
ServerSocket srvSock = null;
@@ -245,7 +245,7 @@ public class NetworkFailureTest extends TestCase {
final AtomicReference<Socket> sockRef = new AtomicReference<>();
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Socket sock = null;
@@ -279,7 +279,7 @@ public class NetworkFailureTest extends TestCase {
"client"
);
- IgniteFuture<?> fut3 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut3 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
while (true) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/jvmtest/QueueSizeCounterMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/jvmtest/QueueSizeCounterMultiThreadedTest.java b/modules/core/src/test/java/org/gridgain/jvmtest/QueueSizeCounterMultiThreadedTest.java
index e443836..cb39da2 100644
--- a/modules/core/src/test/java/org/gridgain/jvmtest/QueueSizeCounterMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/gridgain/jvmtest/QueueSizeCounterMultiThreadedTest.java
@@ -38,7 +38,7 @@ public class QueueSizeCounterMultiThreadedTest extends TestCase {
final ReadWriteLock lock = new ReentrantReadWriteLock();
- IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@SuppressWarnings( {"BusyWait"})
@Nullable @Override public Object call() throws Exception {
[02/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/jvmtest/ReadWriteLockMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/jvmtest/ReadWriteLockMultiThreadedTest.java b/modules/core/src/test/java/org/gridgain/jvmtest/ReadWriteLockMultiThreadedTest.java
index 8169075..c13dfba 100644
--- a/modules/core/src/test/java/org/gridgain/jvmtest/ReadWriteLockMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/gridgain/jvmtest/ReadWriteLockMultiThreadedTest.java
@@ -54,7 +54,7 @@ public class ReadWriteLockMultiThreadedTest extends TestCase {
X.println("Read lock acquired.");
- IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
X.println("Attempting to acquire write lock: " + lock);
@@ -77,7 +77,7 @@ public class ReadWriteLockMultiThreadedTest extends TestCase {
Thread.sleep(2000);
- IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
X.println("Attempting to acquire read lock: " + lock);
@@ -123,7 +123,7 @@ public class ReadWriteLockMultiThreadedTest extends TestCase {
X.println("Write lock acquired: " + lock);
- IgniteFuture fut = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
X.println("Attempting to acquire read lock: " + lock);
@@ -168,7 +168,7 @@ public class ReadWriteLockMultiThreadedTest extends TestCase {
X.println("Read lock acquired.");
- IgniteFuture fut = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
boolean res = lock.writeLock().tryLock();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheAbstractLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheAbstractLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheAbstractLoadTest.java
index 256c896..02bb8af 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheAbstractLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheAbstractLoadTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.log4j.*;
import org.apache.log4j.varia.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -128,7 +127,7 @@ abstract class GridCacheAbstractLoadTest {
assert cache != null;
try {
- IgniteFuture<?> f1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
long start = System.currentTimeMillis();
@@ -150,7 +149,7 @@ abstract class GridCacheAbstractLoadTest {
}
}, writeThreads(), "cache-load-test-worker");
- IgniteFuture<?> f2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
long start = System.currentTimeMillis();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheSwapLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheSwapLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheSwapLoadTest.java
index 9a4aa47..4d91f93 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheSwapLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheSwapLoadTest.java
@@ -12,7 +12,6 @@ package org.gridgain.loadtests.cache;
import org.apache.ignite.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
@@ -116,7 +115,7 @@ public class GridCacheSwapLoadTest {
}
}, EVT_CACHE_OBJECT_SWAPPED);
- Collection<IgniteFuture<?>> futs = new ArrayList<>(3);
+ Collection<InternalFuture<?>> futs = new ArrayList<>(3);
long start = System.currentTimeMillis();
@@ -190,7 +189,7 @@ public class GridCacheSwapLoadTest {
/**
* @return Future.
*/
- private static IgniteFuture<?> doPut(final Ignite g) {
+ private static InternalFuture<?> doPut(final Ignite g) {
final AtomicInteger putKey = new AtomicInteger(0);
return GridTestUtils.runMultiThreadedAsync(new CAX() {
@@ -219,7 +218,7 @@ public class GridCacheSwapLoadTest {
/**
* @return Futures.
*/
- private static Collection<IgniteFuture<Long>> doGetRemove(final Ignite g) {
+ private static Collection<InternalFuture<Long>> doGetRemove(final Ignite g) {
final AtomicBoolean stop = new AtomicBoolean(false);
return F.asList(
@@ -293,9 +292,9 @@ public class GridCacheSwapLoadTest {
/**
* @param futs Futures.
*/
- private static void wait(Iterable<IgniteFuture<?>> futs) {
- F.forEach(futs, new CIX1<IgniteFuture<?>>() {
- @Override public void applyx(IgniteFuture<?> fut) throws IgniteCheckedException {
+ private static void wait(Iterable<InternalFuture<?>> futs) {
+ F.forEach(futs, new CIX1<InternalFuture<?>>() {
+ @Override public void applyx(InternalFuture<?> fut) throws IgniteCheckedException {
fut.get();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
index 89b871c..af79be6 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
@@ -146,7 +146,7 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings({"NullableProblems"})
@Override public void run() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestMain.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestMain.java b/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestMain.java
index 091f3fb..157a01a 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestMain.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestMain.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.thread.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.util.typedef.*;
import org.springframework.beans.factory.*;
@@ -66,7 +65,7 @@ public class GridTestMain {
final GridCache<GridTestKey, Long> cache = g.cache("partitioned");
- final BlockingQueue<IgniteFuture> q = new ArrayBlockingQueue<>(400);
+ final BlockingQueue<InternalFuture> q = new ArrayBlockingQueue<>(400);
long start = System.currentTimeMillis();
@@ -86,12 +85,12 @@ public class GridTestMain {
}
});
- final IgniteFuture<?> f = comp.future();
+ final InternalFuture<?> f = comp.future();
q.put(f);
- f.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> o) {
+ f.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> o) {
q.poll();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark.java b/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark.java
index 8d82c98..2344a38 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark.java
@@ -167,7 +167,7 @@ public class GridIoManagerBenchmark {
queries = newQueries;
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
@@ -200,7 +200,7 @@ public class GridIoManagerBenchmark {
try {
U.sleep(duration > 0 ? duration * 1000 + WARM_UP_DUR : Long.MAX_VALUE);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark0.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark0.java b/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark0.java
index 84be76e..ac9f02a 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark0.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/communication/GridIoManagerBenchmark0.java
@@ -13,7 +13,6 @@ 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.kernal.*;
import org.gridgain.grid.kernal.managers.communication.*;
import org.apache.ignite.spi.communication.*;
@@ -152,7 +151,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
final AtomicBoolean finish = new AtomicBoolean();
- IgniteFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
try {
IgniteUuid msgId = IgniteUuid.randomUuid();
@@ -244,7 +243,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
final AtomicBoolean finish = new AtomicBoolean();
- IgniteFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
try {
IgniteUuid msgId = IgniteUuid.randomUuid();
@@ -334,7 +333,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
final AtomicBoolean finish = new AtomicBoolean();
final AtomicReference<CountDownLatch> latchRef = new AtomicReference<>();
- IgniteFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!finish.get()) {
CountDownLatch latch = latchRef.get();
@@ -353,7 +352,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
}
}, THREADS, "send-thread");
- IgniteFuture<?> f1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
private long ts = System.currentTimeMillis();
@Override public Object call() throws Exception {
@@ -406,7 +405,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
}
}, 1, "load-dispatcher");
- IgniteFuture<?> f2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!finish.get()) {
U.sleep(1000);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/continuous/GridContinuousOperationsLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/continuous/GridContinuousOperationsLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/continuous/GridContinuousOperationsLoadTest.java
index 3918e76..89f5194 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/continuous/GridContinuousOperationsLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/continuous/GridContinuousOperationsLoadTest.java
@@ -93,7 +93,7 @@ public class GridContinuousOperationsLoadTest {
qry.callback(new PX2<UUID, Collection<Map.Entry<Object, Object>>>() {
@Override public boolean applyx(UUID uuid, Collection<Map.Entry<Object, Object>> entries)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
if (cbSleepMs > 0)
U.sleep(cbSleepMs);
@@ -104,7 +104,7 @@ public class GridContinuousOperationsLoadTest {
});
qry.filter(new PX2<Object, Object>() {
- @Override public boolean applyx(Object key, Object val) throws GridInterruptedException {
+ @Override public boolean applyx(Object key, Object val) throws InternalInterruptedException {
if (filterSleepMs > 0)
U.sleep(filterSleepMs);
@@ -125,7 +125,7 @@ public class GridContinuousOperationsLoadTest {
new PX2<UUID, IgniteEvent>() {
@Override
public boolean applyx(UUID uuid, IgniteEvent evt)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
if (cbSleepMs > 0)
U.sleep(cbSleepMs);
@@ -136,7 +136,7 @@ public class GridContinuousOperationsLoadTest {
},
new PX1<IgniteEvent>() {
@Override
- public boolean applyx(IgniteEvent evt) throws GridInterruptedException {
+ public boolean applyx(IgniteEvent evt) throws InternalInterruptedException {
if (filterSleepMs > 0)
U.sleep(filterSleepMs);
@@ -165,7 +165,7 @@ public class GridContinuousOperationsLoadTest {
", updatesPerSec=" + updDelta + ']');
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
}
@@ -174,7 +174,7 @@ public class GridContinuousOperationsLoadTest {
X.println("Starting " + threadsCnt + " generator thread(s).");
// Start generator threads.
- IgniteFuture<Long> genFut = runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<Long> genFut = runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
byte[] val = new byte[valSize];
ThreadLocalRandom8 rnd = ThreadLocalRandom8.current();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
index 0276456..5ace1cf 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
@@ -12,7 +12,6 @@ package org.gridgain.loadtests.direct.multisplit;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.loadtest.*;
import org.apache.ignite.spi.communication.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -112,7 +111,7 @@ public class GridMultiSplitsLoadTest extends GridCommonAbstractTest {
try {
comp.execute(GridLoadTestTask.class, levels);
- ComputeTaskFuture<Integer> fut = comp.future();
+ InternalComputeTaskFuture<Integer> fut = comp.future();
int res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
index 1e473f7..26e54cc 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
@@ -12,7 +12,6 @@ package org.gridgain.loadtests.direct.multisplit;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.loadtest.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
@@ -96,7 +95,7 @@ public class GridMultiSplitsRedeployLoadTest extends GridCommonAbstractTest {
long start = System.currentTimeMillis();
try {
- ComputeTaskFuture<Integer> fut = ignite.compute().withTimeout(10000).
+ InternalComputeTaskFuture<Integer> fut = ignite.compute().withTimeout(10000).
execute(TASK_TYPE_ID, levels);
int res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
index 178c902..acf92b6 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
@@ -150,7 +150,7 @@ public abstract class GridSingleSplitsNewNodesAbstractLoadTest extends GridCommo
comp.execute(new GridSingleSplitNewNodesTestTask(), levels);
- ComputeTaskFuture<Integer> fut = comp.future();
+ InternalComputeTaskFuture<Integer> fut = comp.future();
int res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
index fce9b85..2376097 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
@@ -12,7 +12,6 @@ package org.gridgain.loadtests.direct.redeploy;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.loadtest.*;
import org.apache.ignite.spi.communication.*;
import org.apache.ignite.spi.communication.tcp.*;
@@ -132,7 +131,7 @@ public class GridSingleSplitsRedeployLoadTest extends GridCommonAbstractTest {
// info("Executing task: " + TASK_NAME);
- ComputeTaskFuture<Integer> fut = ignite.compute().execute(TASK_NAME, levels);
+ InternalComputeTaskFuture<Integer> fut = ignite.compute().execute(TASK_NAME, levels);
int res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/session/GridSessionLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/session/GridSessionLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/session/GridSessionLoadTest.java
index b0d134d..dc651ac 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/session/GridSessionLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/session/GridSessionLoadTest.java
@@ -75,7 +75,7 @@ public class GridSessionLoadTest extends GridCommonAbstractTest {
while (end - System.currentTimeMillis() > 0) {
long start = System.currentTimeMillis();
- ComputeTaskFuture<?> fut = ignite.compute().withTimeout(10000).
+ InternalComputeTaskFuture<?> fut = ignite.compute().withTimeout(10000).
execute(GridSessionLoadTestTask.class.getName(), ignite.cluster().nodes().size());
Object res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTest.java
index 8340e9c..44bc7a1 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTest.java
@@ -115,7 +115,7 @@ public class GridStealingLoadTest extends GridCommonAbstractTest {
long start = System.currentTimeMillis();
// Pass stealing node id.
- ComputeTaskFuture<?> fut = ignite.compute().withTimeout(20000).
+ InternalComputeTaskFuture<?> fut = ignite.compute().withTimeout(20000).
execute(GridStealingLoadTestTask.class.getName(), stealingNodeId);
stolen.addAndGet((Integer)fut.get());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/dsi/GridDsiClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/dsi/GridDsiClient.java b/modules/core/src/test/java/org/gridgain/loadtests/dsi/GridDsiClient.java
index 05de5b8..83c12a6 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/dsi/GridDsiClient.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/dsi/GridDsiClient.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.testframework.*;
@@ -105,7 +104,7 @@ public class GridDsiClient implements Callable {
comp.execute(GridDsiRequestTask.class, new GridDsiMessage(terminalId, nodeId));
- ComputeTaskFuture<T3<Long, Integer, Integer>> f1 = comp.future();
+ InternalComputeTaskFuture<T3<Long, Integer, Integer>> f1 = comp.future();
submitTime.setIfGreater(System.currentTimeMillis() - submitTime1);
@@ -115,7 +114,7 @@ public class GridDsiClient implements Callable {
comp.execute(GridDsiResponseTask.class, new GridDsiMessage(terminalId, nodeId));
- ComputeTaskFuture<T3<Long, Integer, Integer>> f2 = comp.future();
+ InternalComputeTaskFuture<T3<Long, Integer, Integer>> f2 = comp.future();
submitTime.setIfGreater(System.currentTimeMillis() - submitTime1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionLoadTestClientSemaphore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionLoadTestClientSemaphore.java b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionLoadTestClientSemaphore.java
index d0f6735..c71f3e6 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionLoadTestClientSemaphore.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionLoadTestClientSemaphore.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.lang.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.loadtests.util.*;
@@ -50,8 +49,8 @@ public class GridJobExecutionLoadTestClientSemaphore implements Callable<Object>
/** {@inheritDoc} */
@SuppressWarnings("InfiniteLoopStatement")
@Nullable @Override public Object call() throws Exception {
- final IgniteInClosure<IgniteFuture<?>> lsnr = new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ final IgniteInClosure<InternalFuture<?>> lsnr = new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
tasksSem.release();
}
};
@@ -65,7 +64,7 @@ public class GridJobExecutionLoadTestClientSemaphore implements Callable<Object>
comp.execute(GridJobExecutionLoadTestTask.class, null);
- ComputeTaskFuture<Object> f = comp.future();
+ InternalComputeTaskFuture<Object> f = comp.future();
f.listenAsync(lsnr);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionSingleNodeSemaphoreLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionSingleNodeSemaphoreLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionSingleNodeSemaphoreLoadTest.java
index 851a083..ebd2edb 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionSingleNodeSemaphoreLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobExecutionSingleNodeSemaphoreLoadTest.java
@@ -86,7 +86,7 @@ public class GridJobExecutionSingleNodeSemaphoreLoadTest {
X.println("Running main test.");
- IgniteFuture<Void> collectorFut = GridTestUtils.runAsync(new Callable<Void>() {
+ InternalFuture<Void> collectorFut = GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
GridCumulativeAverage avgTasksPerSec = new GridCumulativeAverage();
@@ -101,7 +101,7 @@ public class GridJobExecutionSingleNodeSemaphoreLoadTest {
avgTasksPerSec.update(curTasksPerSec);
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
X.println(">>> Interrupted.");
Thread.currentThread().interrupt();
@@ -156,8 +156,8 @@ public class GridJobExecutionSingleNodeSemaphoreLoadTest {
final LongAdder iterCntr) {
final Semaphore sem = new Semaphore(taskCnt);
- final IgniteInClosure<IgniteFuture> lsnr = new CI1<IgniteFuture>() {
- @Override public void apply(IgniteFuture t) {
+ final IgniteInClosure<InternalFuture> lsnr = new CI1<InternalFuture>() {
+ @Override public void apply(InternalFuture t) {
sem.release();
}
};
@@ -170,7 +170,7 @@ public class GridJobExecutionSingleNodeSemaphoreLoadTest {
comp.execute(GridJobExecutionLoadTestTask.class, null);
- ComputeTaskFuture<Object> f = comp.future();
+ InternalComputeTaskFuture<Object> f = comp.future();
f.listenAsync(lsnr);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestSubmitter.java b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestSubmitter.java
index f9b7084..e68cb43 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestSubmitter.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestSubmitter.java
@@ -12,7 +12,6 @@ package org.gridgain.loadtests.job;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import java.util.*;
@@ -36,7 +35,7 @@ public class GridJobLoadTestSubmitter implements Runnable {
private final int cancelRate;
/** List of futures for submitted tasks. */
- private final List<ComputeTaskFuture<Integer>> futures = new LinkedList<>();
+ private final List<InternalComputeTaskFuture<Integer>> futures = new LinkedList<>();
/** Counter to implement fixed submit/cancel ratio. */
private int iteration;
@@ -87,8 +86,8 @@ public class GridJobLoadTestSubmitter implements Runnable {
* Finds completed tasks in the queue and removes them.
*/
private void checkCompletion() {
- for (Iterator<ComputeTaskFuture<Integer>> iter = futures.iterator(); iter.hasNext();) {
- ComputeTaskFuture<Integer> fut = iter.next();
+ for (Iterator<InternalComputeTaskFuture<Integer>> iter = futures.iterator(); iter.hasNext();) {
+ InternalComputeTaskFuture<Integer> fut = iter.next();
if (fut.isDone()) {
try {
@@ -99,7 +98,7 @@ public class GridJobLoadTestSubmitter implements Runnable {
ignite.log().info(">>> Task completed successfully. Task id: " + fut.getTaskSession().getId());
}
- catch (IgniteFutureCancelledException ignored) {
+ catch (InternalFutureCancelledException ignored) {
ignite.log().info(">>> Task cancelled: " + fut.getTaskSession().getId());
}
catch (IgniteCheckedException e) {
@@ -121,7 +120,7 @@ public class GridJobLoadTestSubmitter implements Runnable {
if (iteration % cancelRate == 0) {
// Here we should have mostly running futures so just pick one.
- ComputeTaskFuture<Integer> futToCancel = futures.get( new Random().nextInt(futures.size()) );
+ InternalComputeTaskFuture<Integer> futToCancel = futures.get( new Random().nextInt(futures.size()) );
try {
futToCancel.cancel();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/mergesort/GridMergeSortLoadTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/mergesort/GridMergeSortLoadTask.java b/modules/core/src/test/java/org/gridgain/loadtests/mergesort/GridMergeSortLoadTask.java
index 9795503..bb13f00 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/mergesort/GridMergeSortLoadTask.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/mergesort/GridMergeSortLoadTask.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import java.util.*;
@@ -52,7 +51,7 @@ public class GridMergeSortLoadTask extends ComputeTaskSplitAdapter<int[], int[]>
private ComputeJobContext jobCtx;
// Task execution result future.
- private ComputeTaskFuture<int[]> fut;
+ private InternalComputeTaskFuture<int[]> fut;
@Override public Object execute() throws IgniteCheckedException {
if (arr.length == 1)
@@ -70,8 +69,8 @@ public class GridMergeSortLoadTask extends ComputeTaskSplitAdapter<int[], int[]>
// Add a listener to the future, that will resume the
// parent task once the child one is completed.
- fut.listenAsync(new CI1<IgniteFuture<int[]>>() {
- @Override public void apply(IgniteFuture<int[]> fut) {
+ fut.listenAsync(new CI1<InternalFuture<int[]>>() {
+ @Override public void apply(InternalFuture<int[]> fut) {
// CONTINUATION:
// =============
// Resume suspended job execution.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/gridgain/loadtests/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
index 934b80d..9e5286f 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java
@@ -160,7 +160,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -215,7 +215,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -286,7 +286,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -341,7 +341,7 @@ public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends G
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/streamer/GridStreamerIndexLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/streamer/GridStreamerIndexLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/streamer/GridStreamerIndexLoadTest.java
index a84268b..378e811 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/streamer/GridStreamerIndexLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/streamer/GridStreamerIndexLoadTest.java
@@ -107,7 +107,7 @@ public class GridStreamerIndexLoadTest {
final AtomicLong enqueueCntr = new AtomicLong();
- IgniteFuture<Long> enqueueFut = runMultiThreadedAsync(new CAX() {
+ InternalFuture<Long> enqueueFut = runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
Random rnd = new Random();
@@ -121,7 +121,7 @@ public class GridStreamerIndexLoadTest {
final AtomicLong evictCntr = new AtomicLong();
- IgniteFuture<Long> evictFut = runMultiThreadedAsync(new CAX() {
+ InternalFuture<Long> evictFut = runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (!Thread.currentThread().isInterrupted()) {
win.pollEvicted();
@@ -131,7 +131,7 @@ public class GridStreamerIndexLoadTest {
}
}, thrCnt, "evictor");
- IgniteFuture<Long> collFut = runMultiThreadedAsync(new CAX() {
+ InternalFuture<Long> collFut = runMultiThreadedAsync(new CAX() {
@Override public void applyx() {
int nSec = 0;
long prevEnqueue = enqueueCntr.get();
@@ -152,7 +152,7 @@ public class GridStreamerIndexLoadTest {
prevEvict = curEvict;
}
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/loadtests/streamer/QueryClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/streamer/QueryClosure.java b/modules/core/src/test/java/org/gridgain/loadtests/streamer/QueryClosure.java
index 125cf6e..704c15e 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/streamer/QueryClosure.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/streamer/QueryClosure.java
@@ -35,7 +35,7 @@ class QueryClosure implements IgniteInClosure<IgniteStreamer> {
try {
U.sleep(warmup);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
return;
}
@@ -48,7 +48,7 @@ class QueryClosure implements IgniteInClosure<IgniteStreamer> {
try {
U.sleep(SLEEP_PERIOD_SEC * 1000);
}
- catch (GridInterruptedException ignore) {
+ catch (InternalInterruptedException ignore) {
return;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/testframework/GridTestSafeThreadFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/GridTestSafeThreadFactory.java b/modules/core/src/test/java/org/gridgain/testframework/GridTestSafeThreadFactory.java
index 199153e..d6b1b52 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/GridTestSafeThreadFactory.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/GridTestSafeThreadFactory.java
@@ -149,7 +149,7 @@ public final class GridTestSafeThreadFactory implements ThreadFactory {
for (Thread t : threads)
U.join(t);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java b/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
index bdd7042..9c1957e 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
@@ -448,7 +448,7 @@ public final class GridTestUtils {
* @param threadName Thread name.
* @return Future for the run. Future returns execution time in milliseconds.
*/
- public static IgniteFuture<Long> runMultiThreadedAsync(Runnable run, int threadNum, String threadName) {
+ public static InternalFuture<Long> runMultiThreadedAsync(Runnable run, int threadNum, String threadName) {
return runMultiThreadedAsync(makeCallable(run, null), threadNum, threadName);
}
@@ -476,7 +476,7 @@ public final class GridTestUtils {
* @return Future for the run. Future returns execution time in milliseconds.
*/
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
- public static IgniteFuture<Long> runMultiThreadedAsync(Callable<?> call, int threadNum, final String threadName) {
+ public static InternalFuture<Long> runMultiThreadedAsync(Callable<?> call, int threadNum, final String threadName) {
final List<Callable<?>> calls = Collections.<Callable<?>>nCopies(threadNum, call);
final GridTestSafeThreadFactory threadFactory = new GridTestSafeThreadFactory(threadName);
@@ -496,7 +496,7 @@ public final class GridTestUtils {
};
// Async execution future (doesn't support cancel()).
- IgniteFuture<Long> runFut = runAsync(new Callable<Long>() {
+ InternalFuture<Long> runFut = runAsync(new Callable<Long>() {
@Override public Long call() throws Exception {
return runMultiThreaded(calls, threadFactory);
}
@@ -574,7 +574,7 @@ public final class GridTestUtils {
* @return Future with task result.
*/
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
- public static <T> IgniteFuture<T> runAsync(final Callable<T> task) {
+ public static <T> InternalFuture<T> runAsync(final Callable<T> task) {
if (!busyLock.enterBusy())
throw new IllegalStateException("Failed to start new threads (test is being stopped).");
@@ -1169,11 +1169,11 @@ public final class GridTestUtils {
* @param retryInterval Interval between retries in milliseconds.
* @param c Closure with assertion. All {@link AssertionError}s thrown
* from this closure will be ignored {@code retries} times.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
@SuppressWarnings("ErrorNotRethrown")
public static void retryAssert(@Nullable IgniteLogger log, int retries, long retryInterval, GridAbsClosure c)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
for (int i = 0; i < retries; i++) {
try {
c.apply();
@@ -1226,9 +1226,9 @@ public final class GridTestUtils {
* @param sleepDur Sleep duration in milliseconds.
* @param i Integer to increment.
* @return Incremented value.
- * @throws GridInterruptedException If sleep was interrupted.
+ * @throws InternalInterruptedException If sleep was interrupted.
*/
- public static int sleepAndIncrement(int sleepDur, int i) throws GridInterruptedException {
+ public static int sleepAndIncrement(int sleepDur, int i) throws InternalInterruptedException {
U.sleep(sleepDur);
return i + 1;
@@ -1240,9 +1240,9 @@ public final class GridTestUtils {
* @param cond Condition to wait for.
* @param timeout Max time to wait in milliseconds.
* @return {@code true} if condition was achieved, {@code false} otherwise.
- * @throws GridInterruptedException If interrupted.
+ * @throws InternalInterruptedException If interrupted.
*/
- public static boolean waitForCondition(GridAbsPredicate cond, long timeout) throws GridInterruptedException {
+ public static boolean waitForCondition(GridAbsPredicate cond, long timeout) throws InternalInterruptedException {
long curTime = U.currentTimeMillis();
long endTime = curTime + timeout;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
index 570bc77..d93568d 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
@@ -19,7 +19,6 @@ import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.log4j.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.license.*;
@@ -282,7 +281,7 @@ public abstract class GridAbstractTest extends TestCase {
* @throws Exception If failed.
* @return Future.
*/
- protected IgniteFuture<?> multithreadedAsync(Runnable r, int threadNum) throws Exception {
+ protected InternalFuture<?> multithreadedAsync(Runnable r, int threadNum) throws Exception {
return multithreadedAsync(r, threadNum, getTestGridName());
}
@@ -297,7 +296,7 @@ public abstract class GridAbstractTest extends TestCase {
* @throws Exception If failed.
* @return Future.
*/
- protected IgniteFuture<?> multithreadedAsync(Runnable r, int threadNum, String threadName) throws Exception {
+ protected InternalFuture<?> multithreadedAsync(Runnable r, int threadNum, String threadName) throws Exception {
return GridTestUtils.runMultiThreadedAsync(r, threadNum, threadName);
}
@@ -335,7 +334,7 @@ public abstract class GridAbstractTest extends TestCase {
* @throws Exception If failed.
* @return Future.
*/
- protected IgniteFuture<?> multithreadedAsync(Callable<?> c, int threadNum) throws Exception {
+ protected InternalFuture<?> multithreadedAsync(Callable<?> c, int threadNum) throws Exception {
return multithreadedAsync(c, threadNum, getTestGridName());
}
@@ -349,7 +348,7 @@ public abstract class GridAbstractTest extends TestCase {
* @throws Exception If failed.
* @return Future.
*/
- protected IgniteFuture<?> multithreadedAsync(Callable<?> c, int threadNum, String threadName) throws Exception {
+ protected InternalFuture<?> multithreadedAsync(Callable<?> c, int threadNum, String threadName) throws Exception {
return GridTestUtils.runMultiThreadedAsync(c, threadNum, threadName);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
index 2c56601..ceb2fd0 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
@@ -483,7 +483,7 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Nullable @Override public InternalFuture<GridCacheTx> commitAsync() {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
index 095d05a..d3285f1 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
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.affinity.*;
import org.gridgain.grid.kernal.*;
@@ -430,13 +429,13 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @return Task future.
* @throws IgniteCheckedException If failed.
*/
- protected <R> ComputeTaskFuture<R> executeAsync(IgniteCompute comp, ComputeTask task, @Nullable Object arg)
+ protected <R> InternalComputeTaskFuture<R> executeAsync(IgniteCompute comp, ComputeTask task, @Nullable Object arg)
throws IgniteCheckedException {
comp = comp.enableAsync();
assertNull(comp.execute(task, arg));
- ComputeTaskFuture<R> fut = comp.future();
+ InternalComputeTaskFuture<R> fut = comp.future();
assertNotNull(fut);
@@ -450,13 +449,13 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @return Task future.
* @throws IgniteCheckedException If failed.
*/
- protected <R> ComputeTaskFuture<R> executeAsync(IgniteCompute comp, String taskName, @Nullable Object arg)
+ protected <R> InternalComputeTaskFuture<R> executeAsync(IgniteCompute comp, String taskName, @Nullable Object arg)
throws IgniteCheckedException {
comp = comp.enableAsync();
assertNull(comp.execute(taskName, arg));
- ComputeTaskFuture<R> fut = comp.future();
+ InternalComputeTaskFuture<R> fut = comp.future();
assertNotNull(fut);
@@ -471,13 +470,13 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @throws IgniteCheckedException If failed.
*/
@SuppressWarnings("unchecked")
- protected <R> ComputeTaskFuture<R> executeAsync(IgniteCompute comp, Class taskCls, @Nullable Object arg)
+ protected <R> InternalComputeTaskFuture<R> executeAsync(IgniteCompute comp, Class taskCls, @Nullable Object arg)
throws IgniteCheckedException {
comp = comp.enableAsync();
assertNull(comp.execute(taskCls, arg));
- ComputeTaskFuture<R> fut = comp.future();
+ InternalComputeTaskFuture<R> fut = comp.future();
assertNotNull(fut);
@@ -491,7 +490,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @return Future.
* @throws IgniteCheckedException If failed.
*/
- protected <T extends IgniteEvent> IgniteFuture<T> waitForLocalEvent(IgniteEvents evts,
+ protected <T extends IgniteEvent> InternalFuture<T> waitForLocalEvent(IgniteEvents evts,
@Nullable IgnitePredicate<T> filter, @Nullable int... types) throws IgniteCheckedException {
evts = evts.enableAsync();
@@ -499,7 +498,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
assertNull(evts.waitForLocal(filter, types));
- IgniteFuture<T> fut = evts.future();
+ InternalFuture<T> fut = evts.future();
assertNotNull(fut);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/email/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessor.java
----------------------------------------------------------------------
diff --git a/modules/email/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessor.java b/modules/email/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessor.java
index a2e7b27..ae0a40b 100644
--- a/modules/email/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessor.java
+++ b/modules/email/src/main/java/org/gridgain/grid/kernal/processors/email/GridEmailProcessor.java
@@ -157,7 +157,7 @@ public class GridEmailProcessor extends GridEmailProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> schedule(String subj, String body, boolean html) {
+ @Override public InternalFuture<Boolean> schedule(String subj, String body, boolean html) {
String[] addrs = ctx.config().getAdminEmails();
return addrs == null || addrs.length == 0 ? new GridFinishedFuture<>(ctx, false) :
@@ -166,7 +166,7 @@ public class GridEmailProcessor extends GridEmailProcessorAdapter {
/** {@inheritDoc} */
@SuppressWarnings({"SynchronizeOnNonFinalField"})
- @Override public IgniteFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs) {
+ @Override public InternalFuture<Boolean> schedule(String subj, String body, boolean html, Collection<String> addrs) {
assert subj != null;
assert body != null;
assert addrs != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/client/hadoop/GridHadoopClientProtocolProvider.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/client/hadoop/GridHadoopClientProtocolProvider.java b/modules/hadoop/src/main/java/org/gridgain/client/hadoop/GridHadoopClientProtocolProvider.java
index 4883ce4..1402902 100644
--- a/modules/hadoop/src/main/java/org/gridgain/client/hadoop/GridHadoopClientProtocolProvider.java
+++ b/modules/hadoop/src/main/java/org/gridgain/client/hadoop/GridHadoopClientProtocolProvider.java
@@ -16,7 +16,6 @@ import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.gridgain.client.*;
import org.gridgain.client.marshaller.optimized.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.future.*;
import org.gridgain.grid.util.typedef.*;
@@ -34,7 +33,7 @@ import static org.gridgain.client.hadoop.GridHadoopClientProtocol.*;
*/
public class GridHadoopClientProtocolProvider extends ClientProtocolProvider {
/** Clients. */
- private static final ConcurrentHashMap<String, IgniteFuture<GridClient>> cliMap = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap<String, InternalFuture<GridClient>> cliMap = new ConcurrentHashMap<>();
/** {@inheritDoc} */
@Override public ClientProtocol create(Configuration conf) throws IOException {
@@ -89,12 +88,12 @@ public class GridHadoopClientProtocolProvider extends ClientProtocolProvider {
*/
private static GridClient client(String addr) throws IOException {
try {
- IgniteFuture<GridClient> fut = cliMap.get(addr);
+ InternalFuture<GridClient> fut = cliMap.get(addr);
if (fut == null) {
GridFutureAdapter<GridClient> fut0 = new GridFutureAdapter<>();
- IgniteFuture<GridClient> oldFut = cliMap.putIfAbsent(addr, fut0);
+ InternalFuture<GridClient> oldFut = cliMap.putIfAbsent(addr, fut0);
if (oldFut != null)
return oldFut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java
index c1fcd7f..b730ea4 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java
@@ -271,7 +271,7 @@ public class GridGgfsHadoopIpcIo implements GridGgfsHadoopIo {
reader = null;
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
Thread.currentThread().interrupt();
log.warn("Got interrupted while waiting for reader thread to shut down (will return).");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopImpl.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopImpl.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopImpl.java
index a3504f4..a43067e 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopImpl.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopImpl.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.hadoop;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.util.*;
import org.jetbrains.annotations.*;
@@ -55,7 +54,7 @@ public class GridHadoopImpl implements GridHadoop {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
+ @Override public InternalFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
if (busyLock.enterBusy()) {
try {
return proc.submit(jobId, jobInfo);
@@ -97,7 +96,7 @@ public class GridHadoopImpl implements GridHadoop {
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
+ @Nullable @Override public InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
if (busyLock.enterBusy()) {
try {
return proc.finishFuture(jobId);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessor.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessor.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessor.java
index b1ec6db..5d86f11 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessor.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopProcessor.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.hadoop;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.hadoop.jobtracker.*;
@@ -172,7 +171,7 @@ public class GridHadoopProcessor extends GridHadoopProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
+ @Override public InternalFuture<?> submit(GridHadoopJobId jobId, GridHadoopJobInfo jobInfo) {
return hctx.jobTracker().submit(jobId, jobInfo);
}
@@ -187,7 +186,7 @@ public class GridHadoopProcessor extends GridHadoopProcessorAdapter {
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
+ @Override public InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
return hctx.jobTracker().finishFuture(jobId);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/jobtracker/GridHadoopJobTracker.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/jobtracker/GridHadoopJobTracker.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/jobtracker/GridHadoopJobTracker.java
index c2ee568..84411e1 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/jobtracker/GridHadoopJobTracker.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/jobtracker/GridHadoopJobTracker.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.hadoop.jobtracker;
import org.apache.ignite.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.query.*;
import org.gridgain.grid.hadoop.*;
@@ -67,8 +66,8 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
private GridSpinReadWriteLock busyLock;
/** Closure to check result of async transform of system cache. */
- private final IgniteInClosure<IgniteFuture<?>> failsLog = new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> gridFut) {
+ private final IgniteInClosure<InternalFuture<?>> failsLog = new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> gridFut) {
try {
gridFut.get();
}
@@ -194,7 +193,7 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
* @return Job completion future.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<GridHadoopJobId> submit(GridHadoopJobId jobId, GridHadoopJobInfo info) {
+ public InternalFuture<GridHadoopJobId> submit(GridHadoopJobId jobId, GridHadoopJobInfo info) {
if (!busyLock.tryReadLock()) {
return new GridFinishedFutureEx<>(new IgniteCheckedException("Failed to execute map-reduce job " +
"(grid is stopping): " + info));
@@ -301,7 +300,7 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
* @return Finish future or {@code null}.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public IgniteFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
+ @Nullable public InternalFuture<?> finishFuture(GridHadoopJobId jobId) throws IgniteCheckedException {
if (!busyLock.tryReadLock())
return null; // Grid is stopping.
@@ -993,7 +992,7 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
busyLock.readUnlock();
}
- IgniteFuture<?> fut = finishFuture(jobId);
+ InternalFuture<?> fut = finishFuture(jobId);
if (fut != null) {
try {
@@ -1142,8 +1141,8 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
return;
}
- IgniteInClosure<IgniteFuture<?>> cacheUpdater = new CIX1<IgniteFuture<?>>() {
- @Override public void applyx(IgniteFuture<?> f) {
+ IgniteInClosure<InternalFuture<?>> cacheUpdater = new CIX1<InternalFuture<?>>() {
+ @Override public void applyx(InternalFuture<?> f) {
Throwable err = null;
if (f != null) {
@@ -1192,8 +1191,8 @@ public class GridHadoopJobTracker extends GridHadoopComponent {
// Fail the whole job.
transform(jobId, new RemoveMappersClosure(prev, currMappers, status.failCause()));
else {
- ctx.shuffle().flush(jobId).listenAsync(new CIX1<IgniteFuture<?>>() {
- @Override public void applyx(IgniteFuture<?> f) {
+ ctx.shuffle().flush(jobId).listenAsync(new CIX1<InternalFuture<?>>() {
+ @Override public void applyx(InternalFuture<?> f) {
Throwable err = null;
if (f != null) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/proto/GridHadoopProtocolJobStatusTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/proto/GridHadoopProtocolJobStatusTask.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/proto/GridHadoopProtocolJobStatusTask.java
index 497729a..0bbbcea 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/proto/GridHadoopProtocolJobStatusTask.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/proto/GridHadoopProtocolJobStatusTask.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.hadoop.proto;
import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.util.typedef.*;
@@ -47,14 +46,14 @@ public class GridHadoopProtocolJobStatusTask extends GridHadoopProtocolTaskAdapt
pollDelay = DFLT_POLL_DELAY;
if (pollDelay > 0) {
- IgniteFuture<?> fut = hadoop.finishFuture(jobId);
+ InternalFuture<?> fut = hadoop.finishFuture(jobId);
if (fut != null) {
if (fut.isDone() || F.eq(jobCtx.getAttribute(ATTR_HELD), true))
return hadoop.status(jobId);
else {
- fut.listenAsync(new IgniteInClosure<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> fut0) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> fut0) {
jobCtx.callcc();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffle.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffle.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffle.java
index 55e54ad..78d2fe5 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffle.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffle.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.hadoop.shuffle;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.hadoop.*;
@@ -227,7 +226,7 @@ public class GridHadoopShuffle extends GridHadoopComponent {
* @param jobId Job ID.
* @return Future.
*/
- public IgniteFuture<?> flush(GridHadoopJobId jobId) {
+ public InternalFuture<?> flush(GridHadoopJobId jobId) {
GridHadoopShuffleJob job = jobs.get(jobId);
if (job == null)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffleJob.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffleJob.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffleJob.java
index 1a8614f..53fa49a 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffleJob.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/shuffle/GridHadoopShuffleJob.java
@@ -375,8 +375,8 @@ public class GridHadoopShuffleJob<T> implements AutoCloseable {
fut.onDone(U.unwrap(e));
}
- fut.listenAsync(new IgniteInClosure<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
try {
f.get();
@@ -403,7 +403,7 @@ public class GridHadoopShuffleJob<T> implements AutoCloseable {
snd.join();
}
catch (InterruptedException e) {
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
@@ -426,7 +426,7 @@ public class GridHadoopShuffleJob<T> implements AutoCloseable {
* @return Future.
*/
@SuppressWarnings("unchecked")
- public IgniteFuture<?> flush() throws IgniteCheckedException {
+ public InternalFuture<?> flush() throws IgniteCheckedException {
if (log.isDebugEnabled())
log.debug("Flushing job " + job.id() + " on address " + locReduceAddr);
@@ -452,7 +452,7 @@ public class GridHadoopShuffleJob<T> implements AutoCloseable {
log.debug("Finished waiting for sending thread to complete on shuffle job flush: " + job.id());
}
catch (InterruptedException e) {
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorService.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorService.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorService.java
index dde9850..ee63d1d 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorService.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/GridHadoopExecutorService.java
@@ -171,7 +171,7 @@ public class GridHadoopExecutorService {
workerName = task.toString();
GridWorker w = new GridWorker(gridName, workerName, log, lsnr) {
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
try {
task.call();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutor.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutor.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutor.java
index bb0c65c..4baca1a 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutor.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutor.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.hadoop.taskexecutor.external;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.hadoop.*;
@@ -150,8 +149,8 @@ public class GridHadoopExternalTaskExecutor extends GridHadoopTaskExecutorAdapte
"[jobId=" + meta.jobId() + ", meta=" + meta + ']');
}
else {
- proc.initFut.listenAsync(new CI1<IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
- @Override public void apply(IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
+ proc.initFut.listenAsync(new CI1<InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
+ @Override public void apply(InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
try {
f.get();
@@ -217,9 +216,9 @@ public class GridHadoopExternalTaskExecutor extends GridHadoopTaskExecutorAdapte
final HadoopProcess proc0 = proc;
- proc.initFut.listenAsync(new CI1<IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
+ proc.initFut.listenAsync(new CI1<InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
@Override public void apply(
- IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
+ InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
if (!busyLock.tryReadLock())
return;
@@ -398,8 +397,8 @@ public class GridHadoopExternalTaskExecutor extends GridHadoopTaskExecutorAdapte
}
}, true);
- fut.listenAsync(new CI1<IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
- @Override public void apply(IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
+ fut.listenAsync(new CI1<InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
+ @Override public void apply(InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
try {
// Make sure there were no exceptions.
f.get();
@@ -783,9 +782,9 @@ public class GridHadoopExternalTaskExecutor extends GridHadoopTaskExecutorAdapte
terminated = true;
if (!initFut.isDone())
- initFut.listenAsync(new CI1<IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
+ initFut.listenAsync(new CI1<InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>>>() {
@Override public void apply(
- IgniteFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
+ InternalFuture<IgniteBiTuple<Process, GridHadoopProcessDescriptor>> f) {
proc.destroy();
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/child/GridHadoopChildProcessRunner.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/child/GridHadoopChildProcessRunner.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/child/GridHadoopChildProcessRunner.java
index b8da700..f7e3244 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/child/GridHadoopChildProcessRunner.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/child/GridHadoopChildProcessRunner.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.hadoop.taskexecutor.external.child;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.processors.hadoop.message.*;
import org.gridgain.grid.kernal.processors.hadoop.shuffle.*;
@@ -140,8 +139,8 @@ public class GridHadoopChildProcessRunner {
if (!initFut.isDone() && log.isDebugEnabled())
log.debug("Will wait for process initialization future completion: " + req);
- initFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ initFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
try {
// Make sure init was successful.
f.get();
@@ -212,8 +211,8 @@ public class GridHadoopChildProcessRunner {
* @param req Update request.
*/
private void updateTasks(final GridHadoopJobInfoUpdateRequest req) {
- initFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> gridFut) {
+ initFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> gridFut) {
assert initGuard.get();
assert req.jobId().equals(job.id());
@@ -309,8 +308,8 @@ public class GridHadoopChildProcessRunner {
final long start = U.currentTimeMillis();
try {
- shuffleJob.flush().listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ shuffleJob.flush().listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
long end = U.currentTimeMillis();
if (log.isDebugEnabled())
@@ -389,8 +388,8 @@ public class GridHadoopChildProcessRunner {
if (log.isTraceEnabled())
log.trace("Received shuffle message [desc=" + desc + ", msg=" + msg + ']');
- initFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> f) {
+ initFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> f) {
try {
GridHadoopShuffleMessage m = (GridHadoopShuffleMessage)msg;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2CleanupTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2CleanupTask.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2CleanupTask.java
index f64b48a..13396c7 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2CleanupTask.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2CleanupTask.java
@@ -57,7 +57,7 @@ public class GridHadoopV2CleanupTask extends GridHadoopV2Task {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2MapTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2MapTask.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2MapTask.java
index 5bb4a66..42d489e 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2MapTask.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2MapTask.java
@@ -82,7 +82,7 @@ public class GridHadoopV2MapTask extends GridHadoopV2Task {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
catch (Exception e) {
err = e;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2ReduceTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2ReduceTask.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2ReduceTask.java
index 76942e6..2f9b2a0 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2ReduceTask.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2ReduceTask.java
@@ -64,7 +64,7 @@ public class GridHadoopV2ReduceTask extends GridHadoopV2Task {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
catch (Exception e) {
err = e;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2SetupTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2SetupTask.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2SetupTask.java
index ae52932..943e0d1 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2SetupTask.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2SetupTask.java
@@ -51,7 +51,7 @@ public class GridHadoopV2SetupTask extends GridHadoopV2Task {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2Splitter.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2Splitter.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2Splitter.java
index 7b201cf..4f478bc 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2Splitter.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/v2/GridHadoopV2Splitter.java
@@ -65,7 +65,7 @@ public class GridHadoopV2Splitter {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
- throw new GridInterruptedException(e);
+ throw new InternalInterruptedException(e);
}
}
[04/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheEventAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheEventAbstractTest.java
index 484f9a2..559a365 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheEventAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheEventAbstractTest.java
@@ -871,7 +871,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe
try {
cf.get(WAIT_TIMEOUT);
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
throw new RuntimeException("Timed out waiting for events: " + cf, e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheLockAbstractTest.java
index 4d4ba11..360dbe3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheLockAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheLockAbstractTest.java
@@ -379,7 +379,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest {
final CountDownLatch l1 = new CountDownLatch(1);
final CountDownLatch l2 = new CountDownLatch(1);
- IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
info("Before lock for keys.");
@@ -422,7 +422,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest {
}
}, 1, "TEST-THREAD-1");
- IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
info("Waiting for latch1...");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
index f4691a1..a5488b6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
@@ -224,7 +224,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
addListener(ignite2, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
addListener(ignite3, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
- IgniteFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
+ InternalFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
assert f1.get(10000);
@@ -266,9 +266,9 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
addListener(ignite2, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
addListener(ignite3, unlockLsnr, EVT_CACHE_OBJECT_UNLOCKED);
- IgniteFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
- IgniteFuture<Boolean> f2 = cache2.lockAsync(1, 0L);
- IgniteFuture<Boolean> f3 = cache3.lockAsync(1, 0L);
+ InternalFuture<Boolean> f1 = cache1.lockAsync(1, 0L);
+ InternalFuture<Boolean> f2 = cache2.lockAsync(1, 0L);
+ InternalFuture<Boolean> f3 = cache3.lockAsync(1, 0L);
boolean l1 = false;
boolean l2 = false;
@@ -353,9 +353,9 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
addListener(ignite2, lsnr);
addListener(ignite3, lsnr);
- IgniteFuture<String> f1 = cache1.putAsync(2, "val1");
- IgniteFuture<String> f2 = cache2.putAsync(2, "val2");
- IgniteFuture<String> f3 = cache3.putAsync(2, "val3");
+ InternalFuture<String> f1 = cache1.putAsync(2, "val1");
+ InternalFuture<String> f2 = cache2.putAsync(2, "val2");
+ InternalFuture<String> f3 = cache3.putAsync(2, "val3");
String v1 = f1.get(20000);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index 2e8867b..f4220b0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -13,7 +13,6 @@ 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.kernal.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -433,7 +432,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
Collections.addAll(keys1, 1, 2, 3);
Collections.addAll(keys2, 2, 3, 4);
- IgniteFuture<Boolean> f1 = cache1.lockAllAsync(keys1, 0);
+ InternalFuture<Boolean> f1 = cache1.lockAllAsync(keys1, 0);
try {
assert f1.get();
@@ -442,7 +441,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
checkRemoteLocked(cache2, keys1);
- IgniteFuture<Boolean> f2 = cache2.lockAllAsync(keys2, -1);
+ InternalFuture<Boolean> f2 = cache2.lockAllAsync(keys2, -1);
assert !f2.get();
@@ -463,7 +462,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
addListener(ignite1, new UnlockListener(latch, keys2));
- IgniteFuture<Boolean> f2 = cache2.lockAllAsync(keys2, 0);
+ InternalFuture<Boolean> f2 = cache2.lockAllAsync(keys2, 0);
try {
assert f2.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
index cab17f0..8200963 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
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.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -351,7 +350,7 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
putThreads[i] = thread;
}
- IgniteFuture<?> killNodeFut = null;
+ InternalFuture<?> killNodeFut = null;
if (nodeKillProbability() > 0) {
killNodeFut = GridTestUtils.runAsync(new Callable<Void>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
index ec3ed43..9c93e0a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
@@ -13,7 +13,6 @@ 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.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -166,7 +165,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
info("Check grid index: " + checkIdx);
- IgniteFuture<?> f = waitForLocalEvent(grid(checkIdx).events(), new P1<IgniteEvent>() {
+ InternalFuture<?> f = waitForLocalEvent(grid(checkIdx).events(), new P1<IgniteEvent>() {
@Override public boolean apply(IgniteEvent e) {
info("Received grid event: " + e);
@@ -251,7 +250,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
assert e.isLocked() : "Entry is not locked for grid [idx=" + checkIdx + ", entry=" + e + ']';
- IgniteFuture<?> f = waitForLocalEvent(grid(checkIdx).events(), new P1<IgniteEvent>() {
+ InternalFuture<?> f = waitForLocalEvent(grid(checkIdx).events(), new P1<IgniteEvent>() {
@Override public boolean apply(IgniteEvent e) {
info("Received grid event: " + e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxOriginatingNodeFailureAbstractSelfTest.java
index a3dd944..1a8f73c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxOriginatingNodeFailureAbstractSelfTest.java
@@ -156,7 +156,7 @@ public abstract class GridCacheTxOriginatingNodeFailureAbstractSelfTest extends
try {
txEx.prepareAsync().get(3, TimeUnit.SECONDS);
}
- catch (IgniteFutureTimeoutException ignored) {
+ catch (InternalFutureTimeoutException ignored) {
info("Failed to wait for prepare future completion: " + partial);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index ec20f23..3612b6b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -176,13 +176,13 @@ public abstract class GridCacheTxPessimisticOriginatingNodeFailureAbstractSelfTe
info("Before commitAsync");
- IgniteFuture<GridCacheTx> fut = tx.commitAsync();
+ InternalFuture<GridCacheTx> fut = tx.commitAsync();
info("Got future for commitAsync().");
fut.get(3, TimeUnit.SECONDS);
}
- catch (IgniteFutureTimeoutException ignored) {
+ catch (InternalFutureTimeoutException ignored) {
info("Failed to wait for commit future completion [fullFailure=" + fullFailure + ']');
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPreloadAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPreloadAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPreloadAbstractTest.java
index 2bb781d..4cc2442 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPreloadAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxPreloadAbstractTest.java
@@ -64,7 +64,7 @@ public abstract class GridCacheTxPreloadAbstractTest extends GridCacheAbstractSe
final AtomicInteger gridIdx = new AtomicInteger(1);
- IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
int idx = gridIdx.getAndIncrement();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
index 246bfb4..44f7565 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht;
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.affinity.consistenthash.*;
import org.gridgain.grid.cache.store.*;
@@ -267,7 +266,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
final int keysCnt = 10;
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
// Make thread-local copy to shuffle keys.
List<Integer> threadKeys = new ArrayList<>(keys);
@@ -361,7 +360,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
final CountDownLatch lockLatch = new CountDownLatch(1);
final CountDownLatch unlockLatch = new CountDownLatch(1);
- IgniteFuture<?> unlockFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> unlockFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
assert g0.cache(null).lock(key, 0);
@@ -387,7 +386,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
assert g0.cache(null).isLocked(key);
assert !g0.cache(null).isLockedByThread(key) : "Key can not be locked by current thread.";
- IgniteFuture<Boolean> lockFut = g0.cache(null).lockAsync(key, 0);
+ InternalFuture<Boolean> lockFut = g0.cache(null).lockAsync(key, 0);
assert g0.cache(null).isLocked(key);
assert !lockFut.isDone() : "Key can not be locked by current thread.";
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
index 64b28a5..1c6b6a3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
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.affinity.consistenthash.*;
import org.gridgain.grid.cache.eviction.fifo.*;
@@ -248,13 +247,13 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT
assert nearOther.peekExx(key) == null;
assert dhtOther.peekExx(key) == null;
- IgniteFuture<IgniteEvent> futOther =
+ InternalFuture<IgniteEvent> futOther =
waitForLocalEvent(grid(other).events(), nodeEvent(other.id()), EVT_CACHE_ENTRY_EVICTED);
- IgniteFuture<IgniteEvent> futBackup =
+ InternalFuture<IgniteEvent> futBackup =
waitForLocalEvent(grid(backup).events(), nodeEvent(backup.id()), EVT_CACHE_ENTRY_EVICTED);
- IgniteFuture<IgniteEvent> futPrimary =
+ InternalFuture<IgniteEvent> futPrimary =
waitForLocalEvent(grid(primary).events(), nodeEvent(primary.id()), EVT_CACHE_ENTRY_EVICTED);
// Get value on other node, it should be loaded to near cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
index e3d9aa1..ced14f5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
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.affinity.consistenthash.*;
import org.gridgain.grid.cache.eviction.fifo.*;
@@ -236,10 +235,10 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
assertTrue(entryPrimary.readers().isEmpty());
assertTrue(entryBackup.readers().isEmpty());
- IgniteFuture<IgniteEvent> futBackup =
+ InternalFuture<IgniteEvent> futBackup =
waitForLocalEvent(grid(backup).events(), nodeEvent(backup.id()), EVT_CACHE_ENTRY_EVICTED);
- IgniteFuture<IgniteEvent> futPrimary =
+ InternalFuture<IgniteEvent> futPrimary =
waitForLocalEvent(grid(primary).events(), nodeEvent(primary.id()), EVT_CACHE_ENTRY_EVICTED);
// Evict on primary node.
@@ -301,7 +300,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
final AtomicInteger cntBackup = new AtomicInteger();
- IgniteFuture<IgniteEvent> futBackup = waitForLocalEvent(backupIgnite.events(), new P1<IgniteEvent>() {
+ InternalFuture<IgniteEvent> futBackup = waitForLocalEvent(backupIgnite.events(), new P1<IgniteEvent>() {
@Override public boolean apply(IgniteEvent e) {
return e.node().id().equals(backupIgnite.cluster().localNode().id()) &&
cntBackup.incrementAndGet() == keyCnt;
@@ -310,7 +309,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
final AtomicInteger cntPrimary = new AtomicInteger();
- IgniteFuture<IgniteEvent> futPrimary = waitForLocalEvent(primaryIgnite.events(), new P1<IgniteEvent>() {
+ InternalFuture<IgniteEvent> futPrimary = waitForLocalEvent(primaryIgnite.events(), new P1<IgniteEvent>() {
@Override public boolean apply(IgniteEvent e) {
return e.node().id().equals(primaryIgnite.cluster().localNode().id()) &&
cntPrimary.incrementAndGet() == keyCnt;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
index ba1d3c3..db60414 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
@@ -406,7 +406,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest {
* @param caches Maps to compare.
*/
private void checkMaps(final boolean strict, final GridDhtCacheAdapter<String, Integer>... caches)
- throws GridInterruptedException {
+ throws InternalInterruptedException {
if (caches.length < 2)
return;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
index 656150a..305dc50 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
@@ -178,7 +178,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest {
final AtomicBoolean done = new AtomicBoolean();
- IgniteFuture fut1 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut1 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
Ignite g2 = startGrid(2);
@@ -214,7 +214,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest {
"reader"
);
- IgniteFuture fut2 = GridTestUtils.runMultiThreadedAsync(
+ InternalFuture fut2 = GridTestUtils.runMultiThreadedAsync(
new Callable<Object>() {
@Nullable @Override public Object call() throws Exception {
writeLatch.await();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
index 68994c4..7c34ec0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
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.affinity.*;
import org.gridgain.grid.cache.affinity.consistenthash.*;
@@ -250,7 +249,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
info(">>> Finished checking nodes [keyCnt=" + keyCnt + ", nodeCnt=" + nodeCnt + ", grids=" +
U.grids2names(ignites) + ']');
- Collection<IgniteFuture<?>> futs = new LinkedList<>();
+ Collection<InternalFuture<?>> futs = new LinkedList<>();
Ignite last = F.last(ignites);
@@ -529,7 +528,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
it.remove();
- Collection<IgniteFuture<?>> futs = new LinkedList<>();
+ Collection<InternalFuture<?>> futs = new LinkedList<>();
for (Ignite gg : ignites)
futs.add(waitForLocalEvent(gg.events(), new P1<IgniteEvent>() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
index cba688a..ab097e6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.dht;
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.affinity.*;
import org.gridgain.grid.cache.affinity.consistenthash.*;
@@ -209,7 +208,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest
= ((GridKernal)g1).context().cache().context().exchange();
// Wait for exchanges to complete.
- for (IgniteFuture<?> fut : exchMgr.exchangeFutures())
+ for (InternalFuture<?> fut : exchMgr.exchangeFutures())
fut.get();
GridCacheAffinity<Integer> aff = affinity(c1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
index f5de2a3..c78b8cc 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
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.affinity.*;
import org.gridgain.grid.cache.affinity.consistenthash.*;
@@ -128,7 +127,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
GridKernal[] nodes = new GridKernal[] {(GridKernal)grid(0), (GridKernal)grid(1)};
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
final CountDownLatch startLatch = new CountDownLatch(1);
@@ -176,7 +175,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
}
}
- IgniteFuture<?> startFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> startFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
startGrid(2);
@@ -197,7 +196,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
startLatch.countDown();
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get(1000);
startFut.get();
@@ -225,7 +224,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
final CountDownLatch commitLatch = new CountDownLatch(1);
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
for (final GridKernal node : nodes) {
printDistribution(node);
@@ -288,7 +287,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
// Now start new node. We do it in a separate thread since startGrid
// should block until partition exchange completes.
- IgniteFuture startFut = multithreadedAsync(new Runnable() {
+ InternalFuture startFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
Ignite g3 = startGrid(3);
@@ -308,7 +307,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
assertFalse("Node was able to join the grid while there exist pending transactions.", startFut.isDone());
// Now check that new transactions will wait for new topology version to become available.
- Collection<IgniteFuture> txFuts = new ArrayList<>(nodes.length);
+ Collection<InternalFuture> txFuts = new ArrayList<>(nodes.length);
for (final Ignite g : nodes) {
txFuts.add(multithreadedAsync(new Runnable() {
@@ -336,19 +335,19 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
Thread.sleep(500);
- for (IgniteFuture txFut : txFuts)
+ for (InternalFuture txFut : txFuts)
assertFalse("New transaction was completed before new node joined topology", txFut.isDone());
info(">>> Committing pending transactions.");
commitLatch.countDown();
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get(1000);
startFut.get(1000);
- for (IgniteFuture txFut : txFuts)
+ for (InternalFuture txFut : txFuts)
txFut.get(1000);
}
finally {
@@ -377,7 +376,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
info(">>> Started nodes [g0=" + g0.localNode().id() + ", g1=" + g1.localNode().id() + ", g2=" +
g2.localNode().id() + ", g3=" + g3.localNode().id() + ']');
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
printDistribution(g3);
@@ -444,7 +443,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
leaveLatch.await();
// Now check that new transactions will wait for new topology version to become available.
- Collection<IgniteFuture> txFuts = new ArrayList<>(nodes.length);
+ Collection<InternalFuture> txFuts = new ArrayList<>(nodes.length);
for (final Ignite g : nodes) {
txFuts.add(multithreadedAsync(new Runnable() {
@@ -470,17 +469,17 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
Thread.sleep(500);
- for (IgniteFuture txFut : txFuts)
+ for (InternalFuture txFut : txFuts)
assertFalse("New transaction was completed before old transactions were committed", txFut.isDone());
info(">>> Committing pending transactions.");
commitLatch.countDown();
- for (IgniteFuture fut : futs)
+ for (InternalFuture fut : futs)
fut.get(1000);
- for (IgniteFuture txFut : txFuts)
+ for (InternalFuture txFut : txFuts)
txFut.get(1000);
for (int i = 0; i < 3; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 846f3dd..4d051da 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -168,7 +168,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
System.err.println("FINISHED PUTS");
// Start put threads.
- IgniteFuture<?> fut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
Random rnd = new Random();
@@ -295,7 +295,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
if (delayMessage((GridIoMessage)msg))
U.sleep(ThreadLocalRandom8.current().nextInt(250) + 1);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException(e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEntryLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEntryLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEntryLockSelfTest.java
index 5163bd6..3028b91 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEntryLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEntryLockSelfTest.java
@@ -53,14 +53,14 @@ public class GridCachePartitionedEntryLockSelfTest extends GridCacheAbstractSelf
comp.call(new Callable<Boolean>() {
@Override public Boolean call() throws Exception {
- IgniteFuture<Boolean> f = e.lockAsync(1000);
+ InternalFuture<Boolean> f = e.lockAsync(1000);
try {
f.get(100);
fail();
}
- catch (IgniteFutureTimeoutException ex) {
+ catch (InternalFutureTimeoutException ex) {
info("Caught expected exception: " + ex);
}
@@ -75,7 +75,7 @@ public class GridCachePartitionedEntryLockSelfTest extends GridCacheAbstractSelf
}
});
- IgniteFuture<Boolean> f = comp.future();
+ InternalFuture<Boolean> f = comp.future();
// Let another thread start.
Thread.sleep(300);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
index 64f13d1..a9a2942 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java
@@ -107,7 +107,7 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom
assert e.isLocked() : "Entry is not locked for grid [idx=" + checkIdx + ", entry=" + e + ']';
}
- Collection<IgniteFuture<?>> futs = new LinkedList<>();
+ Collection<InternalFuture<?>> futs = new LinkedList<>();
for (int i = 1; i < GRID_CNT; i++) {
futs.add(
@@ -122,7 +122,7 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom
stopGrid(idx);
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get();
for (int i = 0; i < 3; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
index a50239d..f36c181 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.log4j.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
@@ -74,7 +73,7 @@ public class GridCachePartitionedLockSelfTest extends GridCacheLockAbstractTest
}
}, IgniteCheckedException.class, "Locks are not supported");
- final IgniteFuture<Boolean> lockFut1 = g0.cache(null).lockAsync(1, Long.MAX_VALUE);
+ final InternalFuture<Boolean> lockFut1 = g0.cache(null).lockAsync(1, Long.MAX_VALUE);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -82,7 +81,7 @@ public class GridCachePartitionedLockSelfTest extends GridCacheLockAbstractTest
}
}, IgniteCheckedException.class, "Locks are not supported");
- final IgniteFuture<Boolean> lockFut2 = g0.cache(null).lockAllAsync(Arrays.asList(1), Long.MAX_VALUE);
+ final InternalFuture<Boolean> lockFut2 = g0.cache(null).lockAllAsync(Arrays.asList(1), Long.MAX_VALUE);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index 237309f..3e44a9c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -444,7 +444,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
@Override public Boolean call() throws Exception {
syncLatch.countDown();
- IgniteFuture<Boolean> f = e.lockAsync(15000);
+ InternalFuture<Boolean> f = e.lockAsync(15000);
try {
f.get(100);
@@ -453,7 +453,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
", backup=" + e.backup() + ']');
fail();
- } catch (IgniteFutureTimeoutException ex) {
+ } catch (InternalFutureTimeoutException ex) {
info("Caught expected exception: " + ex);
}
@@ -469,7 +469,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
}
});
- IgniteFuture<Boolean> f = comp.future();
+ InternalFuture<Boolean> f = comp.future();
syncLatch.await();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
index 79e5467..1fed455 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
@@ -136,7 +136,7 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb
final AtomicLong luceneCnt = new AtomicLong();
// Start lucene query threads.
- IgniteFuture<?> futLucene = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ InternalFuture<?> futLucene = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (!done.get()) {
GridCacheQuery<Map.Entry<UUID, Person>> masters = cache0.queries().createFullTextQuery(
@@ -157,7 +157,7 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb
final AtomicLong sqlCnt = new AtomicLong();
// Start sql query threads.
- IgniteFuture<?> futSql = GridTestUtils.runMultiThreadedAsync(new CAX() {
+ InternalFuture<?> futSql = GridTestUtils.runMultiThreadedAsync(new CAX() {
@Override public void applyx() throws IgniteCheckedException {
while (!done.get()) {
GridCacheQuery<Map.Entry<UUID, Person>> bachelors =
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
index 3ba8a10..957a2c7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
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.affinity.consistenthash.*;
import org.gridgain.grid.kernal.*;
@@ -188,7 +187,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
final Collection<Integer> keys = nearKeys(ignite);
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
GridCache<Object, Object> c = cache(0);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
index 3067583..3752f63 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
@@ -70,7 +70,7 @@ public class GridCacheReplicatedEvictionSelfTest extends GridCacheAbstractSelfTe
assertNotNull(cache(g).peek(String.valueOf(i)));
}
- Collection<IgniteFuture<IgniteEvent>> futs = new ArrayList<>();
+ Collection<InternalFuture<IgniteEvent>> futs = new ArrayList<>();
for (int g = 0 ; g < gridCount(); g++)
futs.add(waitForLocalEvent(grid(g).events(), nodeEvent(grid(g).localNode().id()), EVT_CACHE_ENTRY_EVICTED));
@@ -78,7 +78,7 @@ public class GridCacheReplicatedEvictionSelfTest extends GridCacheAbstractSelfTe
for (int i = 0; i < KEYS; i++)
assertTrue(cache(0).evict(String.valueOf(i)));
- for (IgniteFuture<IgniteEvent> fut : futs)
+ for (InternalFuture<IgniteEvent> fut : futs)
fut.get(3000);
boolean evicted = GridTestUtils.waitForCondition(new PA() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
index 98d1b64..9cef61a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
@@ -2,7 +2,6 @@ package org.gridgain.grid.kernal.processors.cache.eviction;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.eviction.fifo.*;
import org.gridgain.grid.cache.store.*;
@@ -98,7 +97,7 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
info("Finished load cache.");
- IgniteFuture<?> evictFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> evictFut = multithreadedAsync(new Runnable() {
@Override public void run() {
Collection<Long> keys = new ArrayList<>(batchSize);
@@ -125,7 +124,7 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
final AtomicInteger unswappedKeys = new AtomicInteger();
- IgniteFuture<?> unswapFut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> unswapFut = multithreadedAsync(new Runnable() {
@Override public void run() {
try {
Collection<Long> keys = new ArrayList<>(batchSize);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index 1d5ad97..1754ae5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -167,7 +167,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Override
public Object call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
index 26ccf3b..4c529f4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
@@ -144,7 +144,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
long start = System.currentTimeMillis();
- IgniteFuture<?> fut = multithreadedAsync(
+ InternalFuture<?> fut = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
for (int i = 0; i < iterCnt; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index 825d526..f542ef2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -264,10 +264,10 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
* Checks that cache is empty.
*
* @param cache Cache to check.
- * @throws GridInterruptedException If interrupted while sleeping.
+ * @throws InternalInterruptedException If interrupted while sleeping.
*/
@SuppressWarnings({"ErrorNotRethrown", "TypeMayBeWeakened"})
- private void checkEmpty(GridCache<String, String> cache) throws GridInterruptedException {
+ private void checkEmpty(GridCache<String, String> cache) throws InternalInterruptedException {
for (int i = 0; i < 3; i++) {
try {
assertTrue(cache.entrySet().toString(), cache.entrySet().isEmpty());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheMockEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheMockEntry.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheMockEntry.java
index 6519617..acab859 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheMockEntry.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheMockEntry.java
@@ -156,7 +156,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<V> setAsync(V val,
+ @Nullable @Override public InternalFuture<V> setAsync(V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
// No-op.
return null;
@@ -169,7 +169,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<V> setIfAbsentAsync(V val) {
+ @Nullable @Override public InternalFuture<V> setIfAbsentAsync(V val) {
// No-op.
return null;
}
@@ -182,7 +182,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> setxAsync(V val,
+ @Nullable @Override public InternalFuture<Boolean> setxAsync(V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
// No-op.
return null;
@@ -195,7 +195,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> setxIfAbsentAsync(V val) {
+ @Nullable @Override public InternalFuture<Boolean> setxIfAbsentAsync(V val) {
// No-op.
return null;
}
@@ -206,7 +206,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(IgniteClosure<V, V> transformer) {
// No-op.
return null;
}
@@ -218,7 +218,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<V> replaceAsync(V val) {
+ @Nullable @Override public InternalFuture<V> replaceAsync(V val) {
// No-op.
return null;
}
@@ -230,7 +230,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> replacexAsync(V val) {
+ @Nullable @Override public InternalFuture<Boolean> replacexAsync(V val) {
// No-op.
return null;
}
@@ -242,7 +242,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> replaceAsync(V oldVal, V newVal) {
+ @Nullable @Override public InternalFuture<Boolean> replaceAsync(V oldVal, V newVal) {
// No-op.
return null;
}
@@ -255,7 +255,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<V> removeAsync(
+ @Nullable @Override public InternalFuture<V> removeAsync(
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
// No-op.
return null;
@@ -268,7 +268,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> removexAsync(
+ @Nullable @Override public InternalFuture<Boolean> removexAsync(
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
// No-op.
return null;
@@ -281,7 +281,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Nullable @Override public IgniteFuture<Boolean> removeAsync(V val) {
+ @Nullable @Override public InternalFuture<Boolean> removeAsync(V val) {
// No-op.
return null;
}
@@ -298,7 +298,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return new GridFinishedFuture<>(null, false);
}
@@ -329,7 +329,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync() {
+ @Override public InternalFuture<V> reloadAsync() {
return new GridFinishedFuture<>();
}
@@ -339,7 +339,7 @@ public class GridCacheMockEntry<K, V> extends GridMetadataAwareAdapter implement
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync() {
+ @Override public InternalFuture<V> getAsync() {
return new GridFinishedFuture<>();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
index e554949..c15c120 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
@@ -73,7 +73,7 @@ public class GridCacheSynchronousEvictionsFailoverSelfTest extends GridCacheAbst
final AtomicBoolean stop = new AtomicBoolean();
- IgniteFuture<?> fut = null;
+ InternalFuture<?> fut = null;
try {
Map<String, Integer> data = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
index 7740025..ef94ee4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
@@ -360,18 +360,18 @@ public class GridCacheLocalMultithreadedSelfTest extends GridCommonAbstractTest
try {
l1.await();
- IgniteFuture<Boolean> f1 = cache.lockAsync(1, 0L);
+ InternalFuture<Boolean> f1 = cache.lockAsync(1, 0L);
try {
f1.get(100, TimeUnit.MILLISECONDS);
assert false;
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Correctly received timeout exception: " + e);
}
- IgniteFuture<Boolean> f2 = cache.lockAsync(2, 0L);
+ InternalFuture<Boolean> f2 = cache.lockAsync(2, 0L);
try {
// Can't acquire f2 because f1 is held.
@@ -380,7 +380,7 @@ public class GridCacheLocalMultithreadedSelfTest extends GridCommonAbstractTest
// TODO uncomment after GG-3756 fix
//assert false;
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
info("Correctly received timeout exception: " + e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessorSelfTest.java
index cc4278a..54cbe2b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessorSelfTest.java
@@ -16,7 +16,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -182,7 +181,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<?> runAsync(int idx, Runnable job, @Nullable IgnitePredicate<ClusterNode> p)
+ private InternalFuture<?> runAsync(int idx, Runnable job, @Nullable IgnitePredicate<ClusterNode> p)
throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert job != null;
@@ -205,7 +204,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<?> broadcast(int idx, Runnable job, @Nullable IgnitePredicate<ClusterNode> p)
+ private InternalFuture<?> broadcast(int idx, Runnable job, @Nullable IgnitePredicate<ClusterNode> p)
throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert job != null;
@@ -231,7 +230,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<?> runAsync(int idx, Collection<TestRunnable> jobs, @Nullable IgnitePredicate<ClusterNode> p)
+ private InternalFuture<?> runAsync(int idx, Collection<TestRunnable> jobs, @Nullable IgnitePredicate<ClusterNode> p)
throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert !F.isEmpty(jobs);
@@ -254,7 +253,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<Integer> callAsync(int idx, Callable<Integer> job, @Nullable IgnitePredicate<ClusterNode> p)
+ private InternalFuture<Integer> callAsync(int idx, Callable<Integer> job, @Nullable IgnitePredicate<ClusterNode> p)
throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert job != null;
@@ -277,7 +276,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<Collection<Integer>> broadcast(int idx, Callable<Integer> job,
+ private InternalFuture<Collection<Integer>> broadcast(int idx, Callable<Integer> job,
@Nullable IgnitePredicate<ClusterNode> p) throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert job != null;
@@ -300,7 +299,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
* @return Future object.
* @throws IgniteCheckedException If failed.
*/
- private IgniteFuture<Collection<Integer>> callAsync(int idx, Collection<TestCallable> jobs,
+ private InternalFuture<Collection<Integer>> callAsync(int idx, Collection<TestCallable> jobs,
@Nullable IgnitePredicate<ClusterNode> p) throws IgniteCheckedException {
assert idx >= 0 && idx < NODES_CNT;
assert !F.isEmpty(jobs);
@@ -334,7 +333,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
public void testRunAsyncSingle() throws Exception {
Runnable job = new TestRunnable();
- IgniteFuture<?> fut = broadcast(0, job, null);
+ InternalFuture<?> fut = broadcast(0, job, null);
assert fut.get() == null;
@@ -360,7 +359,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
public void testRunAsyncMultiple() throws Exception {
Collection<TestRunnable> jobs = F.asList(new TestRunnable(), new TestRunnable());
- IgniteFuture<?> fut = runAsync(0, jobs, null);
+ InternalFuture<?> fut = runAsync(0, jobs, null);
assert fut.get() == null : "Execution result must be null.";
@@ -374,7 +373,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
public void testCallAsyncSingle() throws Exception {
Callable<Integer> job = new TestCallable();
- IgniteFuture<Collection<Integer>> fut1 = broadcast(0, job, null);
+ InternalFuture<Collection<Integer>> fut1 = broadcast(0, job, null);
assert fut1.get() != null;
@@ -387,7 +386,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
assertEquals(1, execCntr.get());
- IgniteFuture<Integer> fut2 = callAsync(0, job, null);
+ InternalFuture<Integer> fut2 = callAsync(0, job, null);
assert fut2.get() == 1 :
"Execution result must be equal to 1, actual: " + fut2.get();
@@ -404,7 +403,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
comp.withNoFailover().call(new TestCallableError());
- IgniteFuture<Integer> fut = comp.future();
+ InternalFuture<Integer> fut = comp.future();
try {
fut.get();
@@ -460,7 +459,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
public void testCallAsyncMultiple() throws Exception {
Collection<TestCallable> jobs = F.asList(new TestCallable(), new TestCallable());
- IgniteFuture<Collection<Integer>> fut = callAsync(0, jobs, null);
+ InternalFuture<Collection<Integer>> fut = callAsync(0, jobs, null);
Collection<Integer> results = fut.get();
@@ -483,7 +482,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
comp.call(jobs, F.sumIntReducer());
- IgniteFuture<Integer> fut = comp.future();
+ InternalFuture<Integer> fut = comp.future();
// Sum of arithmetic progression.
int exp = (1 + jobs.size()) * jobs.size() / 2;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridEventConsumeSelfTest.java
index c42022a..bc6a9e1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridEventConsumeSelfTest.java
@@ -16,7 +16,6 @@ import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
@@ -951,7 +950,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
final Random rnd = new Random();
- IgniteFuture<?> starterFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> starterFut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
for (int i = 0; i < CONSUME_CNT; i++) {
int idx = rnd.nextInt(GRID_CNT);
@@ -984,7 +983,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
}
}, 8, "consume-starter");
- IgniteFuture<?> stopperFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> stopperFut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!stop.get()) {
IgniteBiTuple<Integer, UUID> t = queue.poll(1, SECONDS);
@@ -1013,7 +1012,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
}
}, 4, "consume-stopper");
- IgniteFuture<?> nodeRestarterFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> nodeRestarterFut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!stop.get()) {
startGrid("anotherGrid");
@@ -1024,7 +1023,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
}
}, 1, "node-restarter");
- IgniteFuture<?> jobRunnerFut = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> jobRunnerFut = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!stop.get()) {
int idx = rnd.nextInt(GRID_CNT);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessorSelfTest.java
index c1ceb68..d581d7d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderProcessorSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.optimized.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.eviction.fifo.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -186,9 +185,9 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
final CountDownLatch l1 = new CountDownLatch(threads);
- IgniteFuture<?> f1 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f1 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
- Collection<IgniteFuture<?>> futs = new ArrayList<>(cnt);
+ Collection<InternalFuture<?>> futs = new ArrayList<>(cnt);
for (int i = 0; i < cnt; i++) {
int idx = idxGen.getAndIncrement();
@@ -198,7 +197,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
l1.countDown();
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get();
return null;
@@ -230,9 +229,9 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
final CountDownLatch l2 = new CountDownLatch(threads);
- IgniteFuture<?> f2 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f2 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
- Collection<IgniteFuture<?>> futs = new ArrayList<>(cnt);
+ Collection<InternalFuture<?>> futs = new ArrayList<>(cnt);
for (int i = 0; i < cnt; i++) {
final int key = idxGen.decrementAndGet();
@@ -242,7 +241,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
l2.countDown();
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get();
return null;
@@ -376,9 +375,9 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
try {
final int totalPutCnt = 50000;
- IgniteFuture<?> fut1 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut1 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
- Collection<IgniteFuture<?>> futs = new ArrayList<>();
+ Collection<InternalFuture<?>> futs = new ArrayList<>();
while (!done.get()) {
int idx = idxGen.getAndIncrement();
@@ -394,14 +393,14 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
ldr.flush();
- for (IgniteFuture<?> fut : futs)
+ for (InternalFuture<?> fut : futs)
fut.get();
return null;
}
}, 5, "producer");
- IgniteFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
while (!done.get()) {
ldr.flush();
@@ -416,7 +415,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
// Define index of node being restarted.
final int restartNodeIdx = nodesCntCache + nodesCntNoCache + 1;
- IgniteFuture<?> fut3 = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> fut3 = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
try {
for (int i = 0; i < 5; i++) {
@@ -522,7 +521,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
assert false;
}
- catch (IgniteFutureCancelledException e) {
+ catch (InternalFutureCancelledException e) {
info("Caught expected exception: " + e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
index 2544402..a82f1e1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
@@ -474,7 +474,7 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
* @param curBlocks Current blocks.
* @param curBytes Current bytes.
*/
- private void checkEvictionPolicy(final int curBlocks, final long curBytes) throws GridInterruptedException {
+ private void checkEvictionPolicy(final int curBlocks, final long curBytes) throws InternalInterruptedException {
assert GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
return evictPlc.getCurrentBlocks() == curBlocks && evictPlc.getCurrentSize() == curBytes;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
index 517d36a..5d4b369 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
@@ -1108,7 +1108,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
int threadCnt = 5;
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
while (!stop.get()) {
IgniteFsOutputStream os = null;
@@ -1128,7 +1128,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
U.sleep(10);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// nO-op.
}
}
@@ -1427,7 +1427,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
int threadCnt = 5;
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override public void run() {
while (!stop.get()) {
IgniteFsOutputStream os = null;
@@ -1447,7 +1447,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
U.sleep(10);
}
- catch (GridInterruptedException ignored) {
+ catch (InternalInterruptedException ignored) {
// nO-op.
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
index 565b423..c6b644b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
@@ -157,7 +157,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
rnd.nextBytes(data);
- IgniteFuture<Boolean> fut = mgr.writeStart(info);
+ InternalFuture<Boolean> fut = mgr.writeStart(info);
expectsStoreFail(info, data, "Not enough space reserved to store data");
@@ -244,7 +244,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
info = new GridGgfsFileInfo(info, info.length() + data.length + remainder.length);
- IgniteFuture<Boolean> fut = mgr.writeStart(info);
+ InternalFuture<Boolean> fut = mgr.writeStart(info);
GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
@@ -329,7 +329,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
info = new GridGgfsFileInfo(info, info.length() + data.length * writesCnt);
- IgniteFuture<Boolean> fut = mgr.writeStart(info);
+ InternalFuture<Boolean> fut = mgr.writeStart(info);
for (int j = 0; j < 64; j++) {
Arrays.fill(data, (byte)(j / 4));
@@ -366,7 +366,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
pos += stored.length;
}
- IgniteFuture<Object> delFut = mgr.delete(info);
+ InternalFuture<Object> delFut = mgr.delete(info);
delFut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
index 68ac49f..dfd3897 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
@@ -17,7 +17,6 @@ import org.apache.ignite.fs.mapreduce.*;
import org.apache.ignite.fs.mapreduce.records.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -178,7 +177,7 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest {
assertNull(ggfsAsync.execute(
new Task(), new IgniteFsStringDelimiterRecordResolver(" "), Collections.singleton(FILE), arg));
- IgniteFuture<IgniteBiTuple<Long, Integer>> fut = ggfsAsync.future();
+ InternalFuture<IgniteBiTuple<Long, Integer>> fut = ggfsAsync.future();
assertNotNull(fut);
@@ -190,7 +189,7 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest {
ggfsAsync.format();
- IgniteFuture<?> fut = ggfsAsync.future();
+ InternalFuture<?> fut = ggfsAsync.future();
assertNotNull(fut);
[16/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
# IGNITE-26 Created InternalFuture.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/90948e67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/90948e67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/90948e67
Branch: refs/heads/ignite-26-2
Commit: 90948e67ae229b3e68af77bf3750b4116e389550
Parents: 3cbcf92
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Dec 17 19:16:28 2014 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Dec 17 19:16:31 2014 +0300
----------------------------------------------------------------------
.../ComputeFibonacciContinuationExample.java | 11 +-
.../compute/ComputeRunnableExample.java | 5 +-
.../examples/datagrid/CacheApiExample.java | 7 +-
.../examples/ScalarContinuationExample.scala | 8 +-
.../singlesplit/GridSingleSplitsLoadTest.java | 3 +-
.../spi/checkpoint/s3/GridS3CheckpointSpi.java | 2 +-
.../ipfinder/s3/GridTcpDiscoveryS3IpFinder.java | 4 +-
.../s3/GridS3CheckpointSpiSelfTest.java | 4 +-
...GridClientAbstractMultiThreadedSelfTest.java | 7 +-
.../client/GridClientStartNodeTask.java | 5 +-
.../rest/GridRestProcessorStartSelfTest.java | 2 +-
.../java/org/apache/ignite/IgniteCompute.java | 75 +++---
.../org/apache/ignite/IgniteDataLoader.java | 34 +--
.../java/org/apache/ignite/IgniteScheduler.java | 4 +-
.../apache/ignite/IgniteSystemProperties.java | 7 +-
.../cluster/ClusterTopologyException.java | 2 +-
.../org/apache/ignite/compute/ComputeJob.java | 4 +-
.../apache/ignite/compute/ComputeJobResult.java | 2 +-
.../org/apache/ignite/compute/ComputeTask.java | 10 +-
.../ignite/compute/ComputeTaskAdapter.java | 3 +-
.../ignite/compute/ComputeTaskFuture.java | 6 +-
.../ignite/compute/ComputeTaskSession.java | 2 +-
.../compute/ComputeTaskTimeoutException.java | 2 +-
.../compute/InternalComputeTaskFuture.java | 52 ++++
.../apache/ignite/fs/mapreduce/IgniteFsJob.java | 4 +-
.../ignite/lang/IgniteAsyncSupportAdapter.java | 4 +-
.../org/apache/ignite/lang/IgniteFuture.java | 40 +--
.../lang/IgniteFutureCancelledException.java | 2 +-
.../org/apache/ignite/lang/InternalFuture.java | 182 +++++++++++++
.../lang/InternalFutureCancelledException.java | 50 ++++
.../lang/InternalFutureTimeoutException.java | 50 ++++
.../IgniteOptimizedObjectStreamRegistry.java | 14 +-
.../ignite/scheduler/SchedulerFuture.java | 12 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 10 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 12 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 2 +-
.../ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java | 2 +-
.../TcpDiscoveryMulticastIpFinder.java | 2 +-
.../sharedfs/TcpDiscoverySharedFsIpFinder.java | 2 +-
.../spi/swapspace/file/FileSwapSpaceSpi.java | 6 +-
.../window/StreamerBoundedSizeBatchWindow.java | 10 +-
.../window/StreamerBoundedTimeBatchWindow.java | 10 +-
.../impl/GridClientAbstractProjection.java | 4 +-
.../gridgain/grid/GridDeploymentException.java | 2 +-
.../gridgain/grid/GridInterruptedException.java | 50 ----
.../grid/IgniteInterruptedException.java | 50 ++++
.../grid/InternalInterruptedException.java | 50 ++++
.../java/org/gridgain/grid/cache/GridCache.java | 4 +-
.../org/gridgain/grid/cache/GridCacheEntry.java | 28 +-
.../grid/cache/GridCacheProjection.java | 46 ++--
.../org/gridgain/grid/cache/GridCacheTx.java | 2 +-
...GridCacheConsistentHashAffinityFunction.java | 2 +-
.../datastructures/GridCacheCountDownLatch.java | 12 +-
.../grid/cache/query/GridCacheQueries.java | 6 +-
.../grid/cache/query/GridCacheQueryFuture.java | 2 +-
.../org/gridgain/grid/hadoop/GridHadoop.java | 4 +-
.../gridgain/grid/hadoop/GridHadoopTask.java | 2 +-
.../grid/kernal/ComputeTaskFutureAdapter.java | 29 +++
.../java/org/gridgain/grid/kernal/GridEx.java | 2 +-
.../grid/kernal/GridJobSessionImpl.java | 6 +-
.../org/gridgain/grid/kernal/GridKernal.java | 18 +-
.../grid/kernal/GridTaskFutureImpl.java | 2 +-
.../grid/kernal/GridTaskSessionImpl.java | 2 +-
.../gridgain/grid/kernal/IgniteComputeImpl.java | 78 +++---
.../grid/kernal/IgniteFutureAdapter.java | 175 +++++++++++++
.../grid/kernal/IgniteSchedulerImpl.java | 4 +-
.../org/gridgain/grid/kernal/KernalFuture.java | 16 ++
.../kernal/executor/GridExecutorService.java | 49 ++--
.../grid/kernal/ggfs/common/GridGgfsLogger.java | 4 +-
.../discovery/GridDiscoveryManager.java | 4 +-
.../eventstorage/GridEventStorageManager.java | 4 +-
.../affinity/GridAffinityAssignmentCache.java | 5 +-
.../affinity/GridAffinityProcessor.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 254 +++++++++----------
.../cache/GridCacheAffinityManager.java | 6 +-
.../processors/cache/GridCacheContext.java | 13 +-
.../processors/cache/GridCacheEntryImpl.java | 28 +-
.../cache/GridCacheEvictionEntry.java | 28 +-
.../cache/GridCacheEvictionManager.java | 8 +-
.../cache/GridCacheExplicitLockSpan.java | 2 +-
.../cache/GridCacheFilterEvaluationEntry.java | 28 +-
.../processors/cache/GridCacheFuture.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 14 +-
.../cache/GridCacheMultiTxFuture.java | 4 +-
.../processors/cache/GridCacheMvccManager.java | 29 +--
.../GridCachePartitionExchangeManager.java | 18 +-
.../processors/cache/GridCachePreloader.java | 6 +-
.../cache/GridCachePreloaderAdapter.java | 9 +-
.../processors/cache/GridCacheProcessor.java | 8 +-
.../processors/cache/GridCacheProjectionEx.java | 22 +-
.../cache/GridCacheProjectionImpl.java | 68 ++---
.../processors/cache/GridCacheProxyImpl.java | 72 +++---
.../cache/GridCacheSharedContext.java | 11 +-
.../processors/cache/GridCacheTtlManager.java | 2 +-
.../processors/cache/GridCacheTxAdapter.java | 5 +-
.../kernal/processors/cache/GridCacheTxEx.java | 6 +-
.../processors/cache/GridCacheTxHandler.java | 47 ++--
.../cache/GridCacheTxLocalAdapter.java | 86 +++----
.../processors/cache/GridCacheTxLocalEx.java | 18 +-
.../processors/cache/GridCacheTxManager.java | 14 +-
.../processors/cache/GridCacheTxProxyImpl.java | 2 +-
.../kernal/processors/cache/GridCacheUtils.java | 7 +-
.../cache/GridCacheWriteBehindStore.java | 10 +-
.../GridCacheAtomicSequenceImpl.java | 3 +-
...ridCacheOptimisticCheckPreparedTxFuture.java | 7 +-
...dCachePessimisticCheckCommittedTxFuture.java | 6 +-
.../distributed/GridCacheTxFinishSync.java | 7 +-
.../GridDistributedCacheAdapter.java | 6 +-
.../GridDistributedTxRemoteAdapter.java | 6 +-
.../distributed/dht/GridDhtCacheAdapter.java | 12 +-
.../distributed/dht/GridDhtCacheEntry.java | 6 +-
.../distributed/dht/GridDhtEmbeddedFuture.java | 8 +-
.../cache/distributed/dht/GridDhtFuture.java | 2 +-
.../cache/distributed/dht/GridDhtGetFuture.java | 10 +-
.../distributed/dht/GridDhtLocalPartition.java | 6 +-
.../distributed/dht/GridDhtLockFuture.java | 11 +-
.../distributed/dht/GridDhtTopologyFuture.java | 2 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 28 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 11 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 20 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 10 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 12 +-
.../dht/GridPartitionedGetFuture.java | 21 +-
.../dht/atomic/GridDhtAtomicCache.java | 86 +++----
.../dht/atomic/GridNearAtomicUpdateFuture.java | 5 +-
.../dht/colocated/GridDhtColocatedCache.java | 20 +-
.../colocated/GridDhtColocatedLockFuture.java | 23 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 8 +-
.../preloader/GridDhtPartitionDemandPool.java | 24 +-
.../preloader/GridDhtPartitionSupplyPool.java | 2 +-
.../GridDhtPartitionsExchangeFuture.java | 24 +-
.../dht/preloader/GridDhtPreloader.java | 28 +-
.../distributed/near/GridNearAtomicCache.java | 42 +--
.../distributed/near/GridNearCacheAdapter.java | 14 +-
.../distributed/near/GridNearGetFuture.java | 25 +-
.../distributed/near/GridNearLockFuture.java | 23 +-
.../near/GridNearTransactionalCache.java | 8 +-
.../near/GridNearTxFinishFuture.java | 17 +-
.../cache/distributed/near/GridNearTxLocal.java | 60 ++---
.../near/GridNearTxPrepareFuture.java | 17 +-
.../processors/cache/local/GridLocalCache.java | 6 +-
.../processors/cache/local/GridLocalTx.java | 12 +-
.../local/atomic/GridLocalAtomicCache.java | 58 ++---
.../GridCacheDistributedFieldsQueryFuture.java | 2 +-
.../query/GridCacheDistributedQueryFuture.java | 2 +-
.../query/GridCacheDistributedQueryManager.java | 10 +-
.../query/GridCacheFieldsQueryErrorFuture.java | 2 +-
.../query/GridCacheLocalFieldsQueryFuture.java | 2 +-
.../cache/query/GridCacheLocalQueryFuture.java | 2 +-
.../cache/query/GridCacheQueriesImpl.java | 6 +-
.../cache/query/GridCacheQueriesProxy.java | 6 +-
.../query/GridCacheQueryFutureAdapter.java | 6 +-
.../cache/query/GridCacheQueryManager.java | 50 ++--
.../query/GridCacheQueryMetadataAware.java | 2 +-
.../GridCacheContinuousQueryEntry.java | 28 +-
.../clock/GridClockDeltaSnapshot.java | 6 +-
.../processors/clock/GridClockServer.java | 2 +-
.../clock/GridClockSyncProcessor.java | 2 +-
.../closure/GridClosureProcessor.java | 56 ++--
.../continuous/GridContinuousProcessor.java | 8 +-
.../dataload/GridDataLoadUpdateJob.java | 2 +-
.../dataload/GridDataLoaderProcessor.java | 8 +-
.../dataload/IgniteDataLoaderImpl.java | 75 +++---
.../dr/GridDrDataLoadCacheUpdater.java | 3 +-
.../email/GridEmailProcessorAdapter.java | 5 +-
.../email/GridNoopEmailProcessor.java | 4 +-
.../processors/ggfs/GridGgfsAsyncImpl.java | 3 +-
.../processors/ggfs/GridGgfsDataManager.java | 40 +--
.../processors/ggfs/GridGgfsDeleteWorker.java | 4 +-
.../grid/kernal/processors/ggfs/GridGgfsEx.java | 3 +-
.../ggfs/GridGgfsFileWorkerBatch.java | 2 +-
.../ggfs/GridGgfsFragmentizerManager.java | 6 +-
.../kernal/processors/ggfs/GridGgfsImpl.java | 17 +-
.../ggfs/GridGgfsInputStreamImpl.java | 19 +-
.../processors/ggfs/GridGgfsIpcHandler.java | 5 +-
.../processors/ggfs/GridGgfsMetaManager.java | 10 +-
.../kernal/processors/ggfs/GridGgfsServer.java | 10 +-
.../processors/ggfs/GridGgfsServerHandler.java | 2 +-
.../ggfs/IgniteFsOutputStreamImpl.java | 3 +-
.../hadoop/GridHadoopNoopProcessor.java | 4 +-
.../hadoop/GridHadoopProcessorAdapter.java | 4 +-
.../kernal/processors/job/GridJobWorker.java | 4 +-
.../processors/query/GridQueryProcessor.java | 12 +-
.../processors/rest/GridRestProcessor.java | 18 +-
.../rest/GridRestProtocolHandler.java | 2 +-
.../rest/handlers/GridRestCommandHandler.java | 2 +-
.../handlers/cache/GridCacheCommandHandler.java | 55 ++--
.../cache/GridCacheQueryCommandHandler.java | 13 +-
.../handlers/log/GridLogCommandHandler.java | 2 +-
.../metadata/GridPortableMetadataHandler.java | 3 +-
.../handlers/task/GridTaskCommandHandler.java | 15 +-
.../top/GridTopologyCommandHandler.java | 2 +-
.../version/GridVersionCommandHandler.java | 2 +-
.../tcp/GridTcpMemcachedNioListener.java | 17 +-
.../protocols/tcp/GridTcpRestNioListener.java | 5 +-
.../service/GridServiceProcessor.java | 24 +-
.../processors/streamer/IgniteStreamerImpl.java | 16 +-
.../processors/task/GridTaskProcessor.java | 22 +-
.../visor/cache/VisorCachePreloadTask.java | 4 +-
.../compute/VisorComputeCancelSessionsTask.java | 5 +-
.../grid/util/GridAtomicInitializer.java | 4 +-
.../java/org/gridgain/grid/util/GridUtils.java | 103 +++++---
.../grid/util/future/GridCompoundFuture.java | 30 +--
.../util/future/GridCompoundIdentityFuture.java | 2 +-
.../grid/util/future/GridEmbeddedFuture.java | 38 +--
.../grid/util/future/GridFinishedFuture.java | 9 +-
.../grid/util/future/GridFinishedFutureEx.java | 8 +-
.../grid/util/future/GridFutureAdapter.java | 42 +--
.../grid/util/future/GridFutureAdapterEx.java | 42 +--
.../util/future/GridFutureChainListener.java | 8 +-
.../GridIpcSharedMemoryServerEndpoint.java | 6 +-
.../org/gridgain/grid/util/lang/GridFunc.java | 64 ++---
.../grid/util/lang/GridPlainFuture.java | 3 +-
.../grid/util/lang/GridPlainFutureAdapter.java | 2 +-
.../gridgain/grid/util/nio/GridNioFuture.java | 18 +-
.../grid/util/nio/GridNioFutureImpl.java | 12 +-
.../gridgain/grid/util/nio/GridNioServer.java | 10 +-
.../java/org/gridgain/grid/util/typedef/X.java | 5 +-
.../gridgain/grid/util/worker/GridWorker.java | 6 +-
...redFsCheckpointSpiMultiThreadedSelfTest.java | 6 +-
.../collision/GridTestCollisionTaskSession.java | 2 +-
.../tcp/GridOrderedMessageCancelSelfTest.java | 6 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../tcp/GridTcpCommunicationSpiLanTest.java | 2 +-
...cpCommunicationSpiMultithreadedSelfTest.java | 10 +-
...GridTcpCommunicationSpiRecoverySelfTest.java | 6 +-
.../tcp/GridTcpDiscoveryMultiThreadedTest.java | 4 +-
.../file/GridFileSwapSpaceSpiSelfTest.java | 6 +-
.../index/GridStreamerIndexSelfTest.java | 8 +-
.../window/GridStreamerWindowSelfTest.java | 2 +-
.../GridCacheStoreValueBytesTest.java | 6 +-
.../org/gridgain/grid/GridTestTaskSession.java | 2 +-
.../store/GridCacheBalancingStoreSelfTest.java | 2 +-
...CacheJdbcBlobStoreMultithreadedSelfTest.java | 4 +-
.../kernal/GridCancelOnGridStopSelfTest.java | 3 +-
.../kernal/GridCancelUnusedJobSelfTest.java | 3 +-
.../GridCancelledJobsMetricsSelfTest.java | 5 +-
.../grid/kernal/GridContinuousTaskSelfTest.java | 11 +-
.../GridDeploymentMultiThreadedSelfTest.java | 3 +-
.../grid/kernal/GridDeploymentSelfTest.java | 9 +-
.../GridEventStorageCheckAllEventsSelfTest.java | 7 +-
.../GridExplicitImplicitDeploymentSelfTest.java | 3 +-
.../GridFailoverCustomTopologySelfTest.java | 5 +-
.../GridJobCheckpointCleanupSelfTest.java | 3 +-
.../kernal/GridJobCollisionCancelSelfTest.java | 3 +-
.../kernal/GridJobMasterLeaveAwareSelfTest.java | 64 ++---
.../grid/kernal/GridJobStealingSelfTest.java | 3 +-
.../GridJobStealingZeroActiveJobsSelfTest.java | 3 +-
.../grid/kernal/GridJobSubjectIdSelfTest.java | 3 +-
.../grid/kernal/GridMultipleJobsSelfTest.java | 7 +-
.../grid/kernal/GridMultipleSpisSelfTest.java | 3 +-
.../GridMultipleVersionsDeploymentSelfTest.java | 9 +-
.../GridMultithreadedJobStealingSelfTest.java | 3 +-
.../grid/kernal/GridProjectionAbstractTest.java | 29 +--
.../grid/kernal/GridReduceSelfTest.java | 2 +-
.../kernal/GridRuntimeExceptionSelfTest.java | 11 +-
.../grid/kernal/GridStopWithCancelSelfTest.java | 3 +-
.../grid/kernal/GridStopWithWaitSelfTest.java | 7 +-
.../GridTaskCancelSingleNodeSelfTest.java | 5 +-
.../GridTaskContinuousMapperSelfTest.java | 7 +-
.../grid/kernal/GridTaskExecutionSelfTest.java | 2 +-
.../grid/kernal/GridTaskFailoverSelfTest.java | 3 +-
.../GridTaskFutureImplStopGridSelfTest.java | 7 +-
.../GridTaskInstanceExecutionSelfTest.java | 2 +-
.../kernal/GridTaskInstantiationSelfTest.java | 2 +-
.../grid/kernal/GridTaskJobRejectSelfTest.java | 5 +-
.../grid/kernal/GridTaskListenerSelfTest.java | 7 +-
.../grid/kernal/GridTaskTimeoutSelfTest.java | 7 +-
.../GridCheckpointManagerAbstractSelfTest.java | 6 +-
.../GridDeploymentMessageCountSelfTest.java | 2 +-
.../events/GridEventStorageManagerSelfTest.java | 6 +-
.../GridCacheAbstractFailoverSelfTest.java | 3 +-
.../cache/GridCacheAbstractFlagsTest.java | 2 +-
...cheAbstractFullApiMultithreadedSelfTest.java | 4 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 85 +++----
.../GridCacheAbstractIteratorsSelfTest.java | 8 +-
.../GridCacheAbstractRemoveFailureTest.java | 5 +-
.../GridCacheAsyncOperationsLimitSelfTest.java | 6 +-
.../cache/GridCacheConcurrentMapTest.java | 4 +-
.../GridCacheConcurrentTxMultiNodeTest.java | 5 +-
.../GridCacheFinishPartitionsSelfTest.java | 22 +-
...CacheFullTextQueryMultithreadedSelfTest.java | 4 +-
...idCacheGetAndTransformStoreAbstractTest.java | 2 +-
.../GridCacheGroupLockAbstractSelfTest.java | 3 +-
.../GridCacheGroupLockFailoverSelfTest.java | 11 +-
.../cache/GridCacheGroupLockPutTask.java | 3 +-
.../cache/GridCacheIncrementTransformTest.java | 2 +-
.../cache/GridCacheLuceneQueryIndexTest.java | 16 +-
.../GridCacheMissingCommitVersionSelfTest.java | 4 +-
...GridCacheMixedPartitionExchangeSelfTest.java | 4 +-
.../cache/GridCacheMultiUpdateLockSelfTest.java | 2 +-
...HeapMultiThreadedUpdateAbstractSelfTest.java | 4 +-
.../GridCachePreloadingEvictionsSelfTest.java | 6 +-
.../cache/GridCachePutAllFailoverSelfTest.java | 27 +-
.../GridCacheReferenceCleanupSelfTest.java | 4 +-
...ridCacheReplicatedSynchronousCommitTest.java | 2 +-
.../processors/cache/GridCacheStopSelfTest.java | 4 +-
.../cache/GridCacheSwapPreloadSelfTest.java | 2 +-
.../cache/GridCacheTtlManagerLoadTest.java | 2 +-
.../GridCacheTxMultiThreadedAbstractTest.java | 5 +-
.../GridCacheVariableTopologySelfTest.java | 2 +-
...idCacheWriteBehindStoreAbstractSelfTest.java | 2 +-
.../GridCacheWriteBehindStoreAbstractTest.java | 2 +-
...BehindStorePartitionedMultiNodeSelfTest.java | 4 +-
.../GridCacheWriteBehindStoreSelfTest.java | 4 +-
...eAbstractDataStructuresFailoverSelfTest.java | 26 +-
...actQueueFailoverDataConsistencySelfTest.java | 6 +-
.../GridCacheCountDownLatchSelfTest.java | 6 +-
.../GridCacheQueueCleanupSelfTest.java | 2 +-
...ridCacheQueueJoinedNodeSelfAbstractTest.java | 16 +-
...GridCacheQueueMultiNodeAbstractSelfTest.java | 17 +-
.../GridCacheSetAbstractSelfTest.java | 6 +-
.../GridCacheSetFailoverAbstractSelfTest.java | 4 +-
...PartitionedQueueCreateMultiNodeSelfTest.java | 4 +-
...dCachePartitionedQueueEntryMoveSelfTest.java | 5 +-
.../GridCacheAbstractJobExecutionTest.java | 5 +-
.../GridCacheAtomicTimeoutSelfTest.java | 9 +-
.../GridCacheBasicOpAbstractTest.java | 7 +-
.../distributed/GridCacheEventAbstractTest.java | 2 +-
.../distributed/GridCacheLockAbstractTest.java | 4 +-
.../GridCacheMultiNodeAbstractTest.java | 14 +-
.../GridCacheMultiNodeLockAbstractTest.java | 7 +-
...dCacheMultithreadedFailoverAbstractTest.java | 3 +-
.../GridCacheNodeFailureAbstractTest.java | 5 +-
...xOriginatingNodeFailureAbstractSelfTest.java | 2 +-
...cOriginatingNodeFailureAbstractSelfTest.java | 4 +-
.../GridCacheTxPreloadAbstractTest.java | 2 +-
.../dht/GridCacheColocatedDebugTest.java | 7 +-
...GridCacheDhtEvictionNearReadersSelfTest.java | 7 +-
.../dht/GridCacheDhtEvictionSelfTest.java | 9 +-
.../dht/GridCacheDhtPreloadDelayedSelfTest.java | 2 +-
.../dht/GridCacheDhtPreloadPutGetSelfTest.java | 4 +-
.../dht/GridCacheDhtPreloadSelfTest.java | 5 +-
.../GridCacheDhtPreloadStartStopSelfTest.java | 3 +-
...dCachePartitionedTopologyChangeSelfTest.java | 29 +--
...eAtomicInvalidPartitionHandlingSelfTest.java | 4 +-
.../GridCachePartitionedEntryLockSelfTest.java | 6 +-
...titionedExplicitLockNodeFailureSelfTest.java | 4 +-
.../near/GridCachePartitionedLockSelfTest.java | 5 +-
...achePartitionedMultiNodeFullApiSelfTest.java | 6 +-
...hePartitionedQueryMultiThreadedSelfTest.java | 4 +-
.../GridCachePartitionedTxSalvageSelfTest.java | 3 +-
.../GridCacheReplicatedEvictionSelfTest.java | 4 +-
.../GridCacheBatchEvictUnswapSelfTest.java | 5 +-
...heConcurrentEvictionConsistencySelfTest.java | 2 +-
.../GridCacheConcurrentEvictionsSelfTest.java | 2 +-
.../GridCacheEmptyEntriesAbstractSelfTest.java | 4 +-
.../cache/eviction/GridCacheMockEntry.java | 28 +-
...cheSynchronousEvictionsFailoverSelfTest.java | 2 +-
.../GridCacheLocalMultithreadedSelfTest.java | 8 +-
.../closure/GridClosureProcessorSelfTest.java | 27 +-
.../continuous/GridEventConsumeSelfTest.java | 9 +-
.../GridDataLoaderProcessorSelfTest.java | 25 +-
...heGgfsPerBlockLruEvictionPolicySelfTest.java | 2 +-
.../ggfs/GridGgfsAbstractSelfTest.java | 8 +-
.../ggfs/GridGgfsDataManagerSelfTest.java | 8 +-
.../processors/ggfs/GridGgfsTaskSelfTest.java | 5 +-
.../cache/GridCacheCommandHandlerSelfTest.java | 2 +-
.../GridServiceProcessorAbstractSelfTest.java | 19 +-
.../GridServiceProcessorMultiNodeSelfTest.java | 6 +-
.../streamer/GridStreamerFailoverSelfTest.java | 2 +-
.../streamer/GridStreamerSelfTest.java | 2 +-
.../timeout/GridTimeoutProcessorSelfTest.java | 4 +-
.../grid/lang/GridBasicPerformanceTest.java | 4 +-
.../gridgain/grid/lang/GridFuncSelfTest.java | 13 +-
.../lang/GridFutureListenPerformanceTest.java | 4 +-
.../grid/loadtest/GridLoadTestStatistics.java | 2 +-
.../grid/loadtest/GridSingleExecutionTest.java | 3 +-
...idFileSwapSpaceSpiMultithreadedLoadTest.java | 4 +-
.../marshaller/GridMarshallerAbstractTest.java | 3 +-
.../grid/messaging/GridMessagingSelfTest.java | 4 +-
.../p2p/GridAbstractMultinodeRedeployTest.java | 5 +-
.../grid/p2p/GridP2PTestTaskExecutionTest.java | 3 +-
...SessionCancelSiblingsFromFutureSelfTest.java | 3 +-
...ridSessionCancelSiblingsFromJobSelfTest.java | 3 +-
...idSessionCancelSiblingsFromTaskSelfTest.java | 3 +-
.../GridSessionCheckpointAbstractSelfTest.java | 3 +-
...idSessionFutureWaitJobAttributeSelfTest.java | 3 +-
...dSessionFutureWaitTaskAttributeSelfTest.java | 3 +-
...GridSessionJobWaitTaskAttributeSelfTest.java | 3 +-
.../GridSessionSetFutureAttributeSelfTest.java | 3 +-
...nSetFutureAttributeWaitListenerSelfTest.java | 3 +-
.../GridSessionSetJobAttribute2SelfTest.java | 3 +-
...GridSessionSetJobAttributeOrderSelfTest.java | 3 +-
.../GridSessionSetJobAttributeSelfTest.java | 3 +-
...sionSetJobAttributeWaitListenerSelfTest.java | 3 +-
.../GridSessionSetTaskAttributeSelfTest.java | 3 +-
...GridSessionTaskWaitJobAttributeSelfTest.java | 3 +-
.../GridSessionWaitAttributeSelfTest.java | 3 +-
...dConcurrentLinkedDequeMultiThreadedTest.java | 4 +-
...rrentLinkedHashMapMultiThreadedSelfTest.java | 8 +-
.../gridgain/grid/util/GridIndexFillTest.java | 2 +-
.../grid/util/GridSnapshotLockSelfTest.java | 4 +-
.../util/GridSpinReadWriteLockSelfTest.java | 2 +-
.../util/future/GridCompoundFutureSelfTest.java | 6 +-
.../util/future/GridEmbeddedFutureSelfTest.java | 8 +-
.../util/future/GridFinishedFutureSelfTest.java | 6 +-
.../util/future/GridFutureAdapterSelfTest.java | 38 +--
.../future/GridFutureListenPerformanceTest.java | 4 +-
.../util/future/nio/GridNioFutureSelfTest.java | 10 +-
.../shmem/GridIpcSharedMemorySpaceSelfTest.java | 5 +-
.../gridgain/grid/util/nio/GridNioSelfTest.java | 6 +-
.../offheap/GridOffHeapMapAbstractSelfTest.java | 6 +-
...idOffHeapPartitionedMapAbstractSelfTest.java | 2 +-
...apPartitionedMapPerformanceAbstractTest.java | 8 +-
.../unsafe/GridUnsafeMemorySelfTest.java | 6 +-
.../org/gridgain/jvmtest/ConcurrentMapTest.java | 2 +-
.../gridgain/jvmtest/NetworkFailureTest.java | 14 +-
.../QueueSizeCounterMultiThreadedTest.java | 2 +-
.../jvmtest/ReadWriteLockMultiThreadedTest.java | 8 +-
.../cache/GridCacheAbstractLoadTest.java | 5 +-
.../loadtests/cache/GridCacheSwapLoadTest.java | 13 +-
.../GridCacheWriteBehindStoreLoadTest.java | 2 +-
.../loadtests/colocation/GridTestMain.java | 9 +-
.../communication/GridIoManagerBenchmark.java | 4 +-
.../communication/GridIoManagerBenchmark0.java | 11 +-
.../GridContinuousOperationsLoadTest.java | 12 +-
.../multisplit/GridMultiSplitsLoadTest.java | 3 +-
.../GridMultiSplitsRedeployLoadTest.java | 3 +-
...ridSingleSplitsNewNodesAbstractLoadTest.java | 2 +-
.../GridSingleSplitsRedeployLoadTest.java | 3 +-
.../direct/session/GridSessionLoadTest.java | 2 +-
.../direct/stealing/GridStealingLoadTest.java | 2 +-
.../gridgain/loadtests/dsi/GridDsiClient.java | 5 +-
...GridJobExecutionLoadTestClientSemaphore.java | 7 +-
...JobExecutionSingleNodeSemaphoreLoadTest.java | 10 +-
.../loadtests/job/GridJobLoadTestSubmitter.java | 11 +-
.../mergesort/GridMergeSortLoadTask.java | 7 +-
...apPartitionedMapPerformanceAbstractTest.java | 8 +-
.../streamer/GridStreamerIndexLoadTest.java | 8 +-
.../loadtests/streamer/QueryClosure.java | 4 +-
.../GridTestSafeThreadFactory.java | 2 +-
.../gridgain/testframework/GridTestUtils.java | 20 +-
.../testframework/junits/GridAbstractTest.java | 9 +-
.../cache/GridAbstractCacheStoreSelfTest.java | 2 +-
.../junits/common/GridCommonAbstractTest.java | 17 +-
.../processors/email/GridEmailProcessor.java | 4 +-
.../GridHadoopClientProtocolProvider.java | 7 +-
.../kernal/ggfs/hadoop/GridGgfsHadoopIpcIo.java | 2 +-
.../processors/hadoop/GridHadoopImpl.java | 5 +-
.../processors/hadoop/GridHadoopProcessor.java | 5 +-
.../hadoop/jobtracker/GridHadoopJobTracker.java | 19 +-
.../proto/GridHadoopProtocolJobStatusTask.java | 7 +-
.../hadoop/shuffle/GridHadoopShuffle.java | 3 +-
.../hadoop/shuffle/GridHadoopShuffleJob.java | 10 +-
.../taskexecutor/GridHadoopExecutorService.java | 2 +-
.../GridHadoopExternalTaskExecutor.java | 17 +-
.../child/GridHadoopChildProcessRunner.java | 17 +-
.../hadoop/v2/GridHadoopV2CleanupTask.java | 2 +-
.../hadoop/v2/GridHadoopV2MapTask.java | 2 +-
.../hadoop/v2/GridHadoopV2ReduceTask.java | 2 +-
.../hadoop/v2/GridHadoopV2SetupTask.java | 2 +-
.../hadoop/v2/GridHadoopV2Splitter.java | 2 +-
...idHadoopDefaultMapReducePlannerSelfTest.java | 8 +-
.../hadoop/GridHadoopJobTrackerSelfTest.java | 2 +-
.../GridHadoopMapReduceEmbeddedSelfTest.java | 2 +-
.../hadoop/GridHadoopMapReduceTest.java | 3 +-
.../hadoop/GridHadoopTaskExecutionSelfTest.java | 11 +-
.../GridHadoopExecutorServiceTest.java | 4 +-
...GridHadoopExternalTaskExecutionSelfTest.java | 5 +-
.../ggfs/GridGgfsPerformanceBenchmark.java | 2 +-
.../cache/GridCacheOffHeapAndSwapSelfTest.java | 4 +-
.../GridCacheQueryMultiThreadedSelfTest.java | 17 +-
...idCacheReduceQueryMultithreadedSelfTest.java | 4 +-
.../near/GridCacheQueryNodeRestartSelfTest.java | 4 +-
.../GridCacheReplicatedQuerySelfTest.java | 3 +-
.../query/h2/GridH2IndexRebuildTest.java | 10 +-
.../query/h2/GridH2IndexingGeoSelfTest.java | 4 +-
.../scalar/pimps/ScalarProjectionPimp.scala | 32 +--
.../processors/schedule/ScheduleFutureImpl.java | 38 +--
.../grid/kernal/GridScheduleSelfTest.java | 13 +-
.../GridResourceConcurrentUndeploySelfTest.java | 9 +-
.../util/nodestart/GridNodeCallableImpl.java | 6 +-
.../deployment/uri/GridUriDeploymentSpi.java | 2 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 2 +-
.../websession/GridWebSessionSelfTest.java | 2 +-
477 files changed, 3080 insertions(+), 2590 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/examples/src/main/java/org/gridgain/examples/compute/ComputeFibonacciContinuationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/compute/ComputeFibonacciContinuationExample.java b/examples/src/main/java/org/gridgain/examples/compute/ComputeFibonacciContinuationExample.java
index 2246694..4729a24 100644
--- a/examples/src/main/java/org/gridgain/examples/compute/ComputeFibonacciContinuationExample.java
+++ b/examples/src/main/java/org/gridgain/examples/compute/ComputeFibonacciContinuationExample.java
@@ -15,7 +15,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import org.gridgain.examples.*;
-import org.gridgain.grid.*;
import org.jetbrains.annotations.*;
import java.math.*;
@@ -79,10 +78,10 @@ public final class ComputeFibonacciContinuationExample {
*/
private static class FibonacciClosure implements IgniteClosure<Long, BigInteger> {
/** Future for spawned task. */
- private IgniteFuture<BigInteger> fut1;
+ private InternalFuture<BigInteger> fut1;
/** Future for spawned task. */
- private IgniteFuture<BigInteger> fut2;
+ private InternalFuture<BigInteger> fut2;
/** Auto-inject job context. */
@IgniteJobContextResource
@@ -116,7 +115,7 @@ public final class ComputeFibonacciContinuationExample {
return n == 0 ? BigInteger.ZERO : BigInteger.ONE;
// Node-local storage.
- ClusterNodeLocalMap<Long, IgniteFuture<BigInteger>> locMap = g.cluster().nodeLocalMap();
+ ClusterNodeLocalMap<Long, InternalFuture<BigInteger>> locMap = g.cluster().nodeLocalMap();
// Check if value is cached in node-local-map first.
fut1 = locMap.get(n - 1);
@@ -142,8 +141,8 @@ public final class ComputeFibonacciContinuationExample {
// If futures are not done, then wait asynchronously for the result
if (!fut1.isDone() || !fut2.isDone()) {
- IgniteInClosure<IgniteFuture<BigInteger>> lsnr = new IgniteInClosure<IgniteFuture<BigInteger>>() {
- @Override public void apply(IgniteFuture<BigInteger> f) {
+ IgniteInClosure<InternalFuture<BigInteger>> lsnr = new IgniteInClosure<InternalFuture<BigInteger>>() {
+ @Override public void apply(InternalFuture<BigInteger> f) {
// If both futures are done, resume the continuation.
if (fut1.isDone() && fut2.isDone())
// CONTINUATION:
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/examples/src/main/java/org/gridgain/examples/compute/ComputeRunnableExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/compute/ComputeRunnableExample.java b/examples/src/main/java/org/gridgain/examples/compute/ComputeRunnableExample.java
index 20e986e..0ede70b 100644
--- a/examples/src/main/java/org/gridgain/examples/compute/ComputeRunnableExample.java
+++ b/examples/src/main/java/org/gridgain/examples/compute/ComputeRunnableExample.java
@@ -12,7 +12,6 @@ package org.gridgain.examples.compute;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.gridgain.examples.*;
-import org.gridgain.grid.*;
import java.util.*;
@@ -37,7 +36,7 @@ public class ComputeRunnableExample {
System.out.println();
System.out.println("Compute runnable example started.");
- Collection<IgniteFuture> futs = new ArrayList<>();
+ Collection<InternalFuture> futs = new ArrayList<>();
// Enable asynchronous mode.
IgniteCompute compute = g.compute().enableAsync();
@@ -56,7 +55,7 @@ public class ComputeRunnableExample {
}
// Wait for all futures to complete.
- for (IgniteFuture<?> f : futs)
+ for (InternalFuture<?> f : futs)
f.get();
System.out.println();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/examples/src/main/java/org/gridgain/examples/datagrid/CacheApiExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/datagrid/CacheApiExample.java b/examples/src/main/java/org/gridgain/examples/datagrid/CacheApiExample.java
index a30c20f..29db0d9 100644
--- a/examples/src/main/java/org/gridgain/examples/datagrid/CacheApiExample.java
+++ b/examples/src/main/java/org/gridgain/examples/datagrid/CacheApiExample.java
@@ -11,7 +11,6 @@ package org.gridgain.examples.datagrid;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import java.util.concurrent.*;
@@ -72,11 +71,11 @@ public class CacheApiExample {
cache.putx(2, "2");
// Put asynchronously (every cache operation has async counterpart).
- IgniteFuture<String> fut = cache.putAsync(3, "3");
+ InternalFuture<String> fut = cache.putAsync(3, "3");
// Asynchronously wait for result.
- fut.listenAsync(new IgniteInClosure<IgniteFuture<String>>() {
- @Override public void apply(IgniteFuture<String> fut) {
+ fut.listenAsync(new IgniteInClosure<InternalFuture<String>>() {
+ @Override public void apply(InternalFuture<String> fut) {
try {
System.out.println("Put operation completed [previous-value=" + fut.get() + ']');
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/examples/src/main/scala/org/gridgain/scalar/examples/ScalarContinuationExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarContinuationExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarContinuationExample.scala
index 7e8fb1b..f710d9c 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarContinuationExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarContinuationExample.scala
@@ -11,7 +11,7 @@
package org.gridgain.scalar.examples
import org.apache.ignite.compute.ComputeJobContext
-import org.apache.ignite.lang.{IgniteFuture, IgniteClosure}
+import org.apache.ignite.lang.{InternalFuture, IgniteClosure}
import org.apache.ignite.resources.IgniteJobContextResource
import org.gridgain.scalar._
import scalar._
@@ -73,7 +73,7 @@ class FibonacciClosure (
// However, these fields will be preserved locally while
// this closure is being "held", i.e. while it is suspended
// and is waiting to be continued.
- @transient private var fut1, fut2: IgniteFuture[BigInteger] = null
+ @transient private var fut1, fut2: InternalFuture[BigInteger] = null
// Auto-inject job context.
@IgniteJobContextResource
@@ -95,7 +95,7 @@ class FibonacciClosure (
BigInteger.ONE
// Get properly typed node-local storage.
- val store = g.cluster().nodeLocalMap[Long, IgniteFuture[BigInteger]]()
+ val store = g.cluster().nodeLocalMap[Long, InternalFuture[BigInteger]]()
// Check if value is cached in node-local store first.
fut1 = store.get(n - 1)
@@ -125,7 +125,7 @@ class FibonacciClosure (
// If futures are not done, then wait asynchronously for the result
if (!fut1.isDone || !fut2.isDone) {
- val lsnr = (fut: IgniteFuture[BigInteger]) => {
+ val lsnr = (fut: InternalFuture[BigInteger]) => {
// This method will be called twice, once for each future.
// On the second call - we have to have both futures to be done
// - therefore we can call the continuation.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/aop/src/test/java/org/gridgain/loadtests/direct/singlesplit/GridSingleSplitsLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/aop/src/test/java/org/gridgain/loadtests/direct/singlesplit/GridSingleSplitsLoadTest.java b/modules/aop/src/test/java/org/gridgain/loadtests/direct/singlesplit/GridSingleSplitsLoadTest.java
index 0266d3a..e646cd0 100644
--- a/modules/aop/src/test/java/org/gridgain/loadtests/direct/singlesplit/GridSingleSplitsLoadTest.java
+++ b/modules/aop/src/test/java/org/gridgain/loadtests/direct/singlesplit/GridSingleSplitsLoadTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.logger.log4j.*;
import org.apache.log4j.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.loadtest.*;
import org.apache.ignite.spi.communication.tcp.*;
import org.apache.ignite.spi.discovery.tcp.*;
@@ -102,7 +101,7 @@ public class GridSingleSplitsLoadTest extends GridCommonAbstractTest {
comp.execute(new GridSingleSplitTestTask(), levels);
- ComputeTaskFuture<Integer> fut = comp.future();
+ InternalComputeTaskFuture<Integer> fut = comp.future();
int res = fut.get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
----------------------------------------------------------------------
diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
index 316e014..84b07ba 100644
--- a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
+++ b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
@@ -274,7 +274,7 @@ public class GridS3CheckpointSpi extends IgniteSpiAdapter implements CheckpointS
try {
U.sleep(200);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/aws/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/GridTcpDiscoveryS3IpFinder.java
----------------------------------------------------------------------
diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/GridTcpDiscoveryS3IpFinder.java b/modules/aws/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/GridTcpDiscoveryS3IpFinder.java
index 0eb38f1..ddb8869 100644
--- a/modules/aws/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/GridTcpDiscoveryS3IpFinder.java
+++ b/modules/aws/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/GridTcpDiscoveryS3IpFinder.java
@@ -242,7 +242,7 @@ public class GridTcpDiscoveryS3IpFinder extends TcpDiscoveryIpFinderAdapter {
try {
U.sleep(200);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
}
@@ -262,7 +262,7 @@ public class GridTcpDiscoveryS3IpFinder extends TcpDiscoveryIpFinderAdapter {
try {
U.await(initLatch);
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpiSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpiSelfTest.java
index f31919f..972ef72 100644
--- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpiSelfTest.java
+++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpiSelfTest.java
@@ -199,9 +199,9 @@ public class GridS3CheckpointSpiSelfTest extends GridSpiAbstractTest<GridS3Check
* Wrapper around {@link GridTestUtils#retryAssert(org.apache.ignite.IgniteLogger, int, long, GridAbsClosure)}.
* Provides s3-specific timeouts.
* @param assertion Closure with assertion inside.
- * @throws GridInterruptedException If was interrupted.
+ * @throws InternalInterruptedException If was interrupted.
*/
- private void assertWithRetries(GridAbsClosureX assertion) throws GridInterruptedException {
+ private void assertWithRetries(GridAbsClosureX assertion) throws InternalInterruptedException {
GridTestUtils.retryAssert(log, 6, 5000, assertion);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/clients/src/test/java/org/gridgain/client/GridClientAbstractMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/gridgain/client/GridClientAbstractMultiThreadedSelfTest.java b/modules/clients/src/test/java/org/gridgain/client/GridClientAbstractMultiThreadedSelfTest.java
index 306764e..7ccef60 100644
--- a/modules/clients/src/test/java/org/gridgain/client/GridClientAbstractMultiThreadedSelfTest.java
+++ b/modules/clients/src/test/java/org/gridgain/client/GridClientAbstractMultiThreadedSelfTest.java
@@ -18,7 +18,6 @@ import org.apache.ignite.resources.*;
import org.gridgain.client.balancer.*;
import org.gridgain.client.impl.*;
import org.gridgain.client.ssl.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.affinity.*;
import org.gridgain.grid.kernal.*;
@@ -298,7 +297,7 @@ public abstract class GridClientAbstractMultiThreadedSelfTest extends GridCommon
final String val = "v" + i;
- IgniteFuture<?> f = multithreadedAsync(new Callable<Object>() {
+ InternalFuture<?> f = multithreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
l.await();
@@ -326,7 +325,7 @@ public abstract class GridClientAbstractMultiThreadedSelfTest extends GridCommon
final ConcurrentLinkedQueue<String> execQueue = new ConcurrentLinkedQueue<>();
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@Override
public void run() {
long processed;
@@ -405,7 +404,7 @@ public abstract class GridClientAbstractMultiThreadedSelfTest extends GridCommon
assertEquals(NODES_CNT, client.compute().refreshTopology(false, false).size());
- IgniteFuture<?> fut = multithreadedAsync(new Runnable() {
+ InternalFuture<?> fut = multithreadedAsync(new Runnable() {
@SuppressWarnings("OverlyStrongTypeCast")
@Override public void run() {
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/clients/src/test/java/org/gridgain/client/GridClientStartNodeTask.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/gridgain/client/GridClientStartNodeTask.java b/modules/clients/src/test/java/org/gridgain/client/GridClientStartNodeTask.java
index ada470e..3d56a10 100644
--- a/modules/clients/src/test/java/org/gridgain/client/GridClientStartNodeTask.java
+++ b/modules/clients/src/test/java/org/gridgain/client/GridClientStartNodeTask.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.springframework.beans.factory.*;
@@ -142,7 +141,7 @@ public class GridClientStartNodeTask extends GridTaskSingleJobSplitAdapter<Strin
* @throws IgniteCheckedException On any exception.
*/
private static void changeTopology(Ignite parent, int add, int rmv, String type) throws IgniteCheckedException {
- Collection<ComputeTaskFuture<?>> tasks = new ArrayList<>();
+ Collection<InternalComputeTaskFuture<?>> tasks = new ArrayList<>();
IgniteCompute comp = parent.compute().enableAsync();
@@ -153,7 +152,7 @@ public class GridClientStartNodeTask extends GridTaskSingleJobSplitAdapter<Strin
tasks.add(comp.future());
}
- for (ComputeTaskFuture<?> task : tasks)
+ for (InternalComputeTaskFuture<?> task : tasks)
task.get();
// Stop nodes in sequence.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessorStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessorStartSelfTest.java b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessorStartSelfTest.java
index 22eaac7..5596053 100644
--- a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessorStartSelfTest.java
+++ b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridRestProcessorStartSelfTest.java
@@ -111,7 +111,7 @@ public class GridRestProcessorStartSelfTest extends GridCommonAbstractTest {
try {
gridReady.await();
- IgniteFuture<GridClient> c = GridTestUtils.runAsync(new Callable<GridClient>() {
+ InternalFuture<GridClient> c = GridTestUtils.runAsync(new Callable<GridClient>() {
@Override public GridClient call() throws Exception {
return GridClientFactory.start(cfg);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java b/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
index 613a521..2b8dd7a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
@@ -12,7 +12,6 @@ package org.apache.ignite;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.jetbrains.annotations.*;
import java.io.*;
@@ -114,9 +113,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param job Job which will be co-located on the node with given affinity key.
* @see org.apache.ignite.compute.ComputeJobContext#cacheName()
* @see org.apache.ignite.compute.ComputeJobContext#affinityKey()
- * @throws IgniteCheckedException If job failed.
+ * @throws IgniteException If job failed.
*/
- public void affinityRun(@Nullable String cacheName, Object affKey, Runnable job) throws IgniteCheckedException;
+ public void affinityRun(@Nullable String cacheName, Object affKey, Runnable job) throws IgniteException;
/**
* Executes given job on the node where data for provided affinity key is located
@@ -128,11 +127,11 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param affKey Affinity key.
* @param job Job which will be co-located on the node with given affinity key.
* @return Job result.
- * @throws IgniteCheckedException If job failed.
+ * @throws IgniteException If job failed.
* @see org.apache.ignite.compute.ComputeJobContext#cacheName()
* @see org.apache.ignite.compute.ComputeJobContext#affinityKey()
*/
- public <R> R affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job) throws IgniteCheckedException;
+ public <R> R affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job) throws IgniteException;
/**
* Executes given task on the grid projection. For step-by-step explanation of task execution process
@@ -145,9 +144,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* class name is used as task name.
* @param arg Optional argument of task execution, can be {@code null}.
* @return Task result.
- * @throws IgniteCheckedException If task failed.
+ * @throws IgniteException If task failed.
*/
- public <T, R> R execute(Class<? extends ComputeTask<T, R>> taskCls, @Nullable T arg) throws IgniteCheckedException;
+ public <T, R> R execute(Class<? extends ComputeTask<T, R>> taskCls, @Nullable T arg) throws IgniteException;
/**
* Executes given task on this grid projection. For step-by-step explanation of task execution process
@@ -160,9 +159,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* class name is used as task name.
* @param arg Optional argument of task execution, can be {@code null}.
* @return Task result.
- * @throws IgniteCheckedException If task failed.
+ * @throws IgniteException If task failed.
*/
- public <T, R> R execute(ComputeTask<T, R> task, @Nullable T arg) throws IgniteCheckedException;
+ public <T, R> R execute(ComputeTask<T, R> task, @Nullable T arg) throws IgniteException;
/**
* Executes given task on this grid projection. For step-by-step explanation of task execution process
@@ -176,10 +175,10 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param taskName Name of the task to execute.
* @param arg Optional argument of task execution, can be {@code null}.
* @return Task result.
- * @throws IgniteCheckedException If task failed.
+ * @throws IgniteException If task failed.
* @see org.apache.ignite.compute.ComputeTask for information about task execution.
*/
- public <T, R> R execute(String taskName, @Nullable T arg) throws IgniteCheckedException;
+ public <T, R> R execute(String taskName, @Nullable T arg) throws IgniteException;
/**
* Broadcasts given job to all nodes in grid projection.
@@ -187,9 +186,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* Supports asynchronous execution (see {@link IgniteAsyncSupport}).
*
* @param job Job to broadcast to all projection nodes.
- * @throws IgniteCheckedException If job failed.
+ * @throws IgniteException If job failed.
*/
- public void broadcast(Runnable job) throws IgniteCheckedException;
+ public void broadcast(Runnable job) throws IgniteException;
/**
* Broadcasts given job to all nodes in grid projection. Every participating node will return a
@@ -199,9 +198,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
*
* @param job Job to broadcast to all projection nodes.
* @return Collection of results for this execution.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R> Collection<R> broadcast(Callable<R> job) throws IgniteCheckedException;
+ public <R> Collection<R> broadcast(Callable<R> job) throws IgniteException;
/**
* Broadcasts given closure job with passed in argument to all nodes in grid projection.
@@ -213,9 +212,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param job Job to broadcast to all projection nodes.
* @param arg Job closure argument.
* @return Collection of results for this execution.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R, T> Collection<R> broadcast(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteCheckedException;
+ public <R, T> Collection<R> broadcast(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteException;
/**
* Executes provided job on a node in this grid projection.
@@ -223,9 +222,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* Supports asynchronous execution (see {@link IgniteAsyncSupport}).
*
* @param job Job closure to execute.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public void run(Runnable job) throws IgniteCheckedException;
+ public void run(Runnable job) throws IgniteException;
/**
* Executes collection of jobs on grid nodes within this grid projection.
@@ -233,9 +232,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* Supports asynchronous execution (see {@link IgniteAsyncSupport}).
*
* @param jobs Collection of jobs to execute.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public void run(Collection<? extends Runnable> jobs) throws IgniteCheckedException;
+ public void run(Collection<? extends Runnable> jobs) throws IgniteException;
/**
* Executes provided job on a node in this grid projection. The result of the
@@ -245,9 +244,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
*
* @param job Job to execute.
* @return Job result.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R> R call(Callable<R> job) throws IgniteCheckedException;
+ public <R> R call(Callable<R> job) throws IgniteException;
/**
* Executes collection of jobs on nodes within this grid projection.
@@ -257,9 +256,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
*
* @param jobs Collection of jobs to execute.
* @return Collection of job results for this execution.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R> Collection<R> call(Collection<? extends Callable<R>> jobs) throws IgniteCheckedException;
+ public <R> Collection<R> call(Collection<? extends Callable<R>> jobs) throws IgniteException;
/**
* Executes collection of jobs on nodes within this grid projection. The returned
@@ -270,9 +269,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param jobs Collection of jobs to execute.
* @param rdc Reducer to reduce all job results into one individual return value.
* @return Future with reduced job result for this execution.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R1, R2> R2 call(Collection<? extends Callable<R1>> jobs, IgniteReducer<R1, R2> rdc) throws IgniteCheckedException;
+ public <R1, R2> R2 call(Collection<? extends Callable<R1>> jobs, IgniteReducer<R1, R2> rdc) throws IgniteException;
/**
* Executes provided closure job on a node in this grid projection. This method is different
@@ -284,9 +283,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param job Job to run.
* @param arg Job argument.
* @return Job result.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <R, T> R apply(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteCheckedException;
+ public <R, T> R apply(IgniteClosure<T, R> job, @Nullable T arg) throws IgniteException;
/**
* Executes provided closure job on nodes within this grid projection. A new job is executed for
@@ -298,9 +297,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param job Job to run.
* @param args Job arguments.
* @return Collection of job results.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
- public <T, R> Collection<R> apply(IgniteClosure<T, R> job, Collection<? extends T> args) throws IgniteCheckedException;
+ public <T, R> Collection<R> apply(IgniteClosure<T, R> job, Collection<? extends T> args) throws IgniteException;
/**
* Executes provided closure job on nodes within this grid projection. A new job is executed for
@@ -314,17 +313,17 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* @param args Job arguments.
* @param rdc Reducer to reduce all job results into one individual return value.
* @return Future with reduced job result for this execution.
- * @throws IgniteCheckedException If execution failed.
+ * @throws IgniteException If execution failed.
*/
public <R1, R2, T> R2 apply(IgniteClosure<T, R1> job, Collection<? extends T> args,
- IgniteReducer<R1, R2> rdc) throws IgniteCheckedException;
+ IgniteReducer<R1, R2> rdc) throws IgniteException;
/**
* Gets tasks future for active tasks started on local node.
*
* @return Map of active tasks keyed by their task task session ID.
*/
- public <R> Map<IgniteUuid, ComputeTaskFuture<R>> activeTaskFutures();
+ public <R> Map<IgniteUuid, InternalComputeTaskFuture<R>> activeTaskFutures();
/**
* Sets task name for the next executed task on this projection in the <b>current thread</b>.
@@ -396,9 +395,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* class name will be used as task's name.
* @param clsLdr Task class loader. This class loader is in charge
* of loading all necessary resources for task execution.
- * @throws IgniteCheckedException If task is invalid and cannot be deployed.
+ * @throws IgniteException If task is invalid and cannot be deployed.
*/
- public void localDeployTask(Class<? extends ComputeTask> taskCls, ClassLoader clsLdr) throws IgniteCheckedException;
+ public void localDeployTask(Class<? extends ComputeTask> taskCls, ClassLoader clsLdr) throws IgniteException;
/**
* Gets map of all locally deployed tasks keyed by their task name .
@@ -413,9 +412,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
* undeployed on every node.
*
* @param taskName Name of the task to undeploy.
- * @throws IgniteCheckedException Thrown if undeploy failed.
+ * @throws IgniteException Thrown if undeploy failed.
*/
- public void undeployTask(String taskName) throws IgniteCheckedException;
+ public void undeployTask(String taskName) throws IgniteException;
/** {@inheritDoc} */
@Override public <R> ComputeTaskFuture<R> future();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java b/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
index ecedb0f..fe54128 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
@@ -187,7 +187,7 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
*
* @return Future for this loading process.
*/
- public IgniteFuture<?> future();
+ public InternalFuture<?> future();
/**
* Optional deploy class for peer deployment. All classes loaded by a data loader
@@ -214,11 +214,11 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* @param key Key.
* @return Future fo this operation.
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
* @throws IllegalStateException If grid has been concurrently stopped or
* {@link #close(boolean)} has already been called on loader.
*/
- public IgniteFuture<?> removeData(K key) throws IgniteCheckedException, GridInterruptedException, IllegalStateException;
+ public InternalFuture<?> removeData(K key) throws IgniteCheckedException, InternalInterruptedException, IllegalStateException;
/**
* Adds data for loading on remote node. This method can be called from multiple
@@ -232,11 +232,11 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* @param val Value or {@code null} if respective entry must be removed from cache.
* @return Future fo this operation.
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
* @throws IllegalStateException If grid has been concurrently stopped or
* {@link #close(boolean)} has already been called on loader.
*/
- public IgniteFuture<?> addData(K key, @Nullable V val) throws IgniteCheckedException, GridInterruptedException,
+ public InternalFuture<?> addData(K key, @Nullable V val) throws IgniteCheckedException, InternalInterruptedException,
IllegalStateException;
/**
@@ -250,11 +250,11 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* @param entry Entry.
* @return Future fo this operation.
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
* @throws IllegalStateException If grid has been concurrently stopped or
* {@link #close(boolean)} has already been called on loader.
*/
- public IgniteFuture<?> addData(Map.Entry<K, V> entry) throws IgniteCheckedException, GridInterruptedException,
+ public InternalFuture<?> addData(Map.Entry<K, V> entry) throws IgniteCheckedException, InternalInterruptedException,
IllegalStateException;
/**
@@ -270,7 +270,7 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* {@link #close(boolean)} has already been called on loader.
* @return Future for this load operation.
*/
- public IgniteFuture<?> addData(Collection<? extends Map.Entry<K, V>> entries) throws IllegalStateException;
+ public InternalFuture<?> addData(Collection<? extends Map.Entry<K, V>> entries) throws IllegalStateException;
/**
* Adds data for loading on remote node. This method can be called from multiple
@@ -285,7 +285,7 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* {@link #close(boolean)} has already been called on loader.
* @return Future for this load operation.
*/
- public IgniteFuture<?> addData(Map<K, V> entries) throws IllegalStateException;
+ public InternalFuture<?> addData(Map<K, V> entries) throws IllegalStateException;
/**
* Loads any remaining data, but doesn't close the loader. Data can be still added after
@@ -297,33 +297,33 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* use {@link #tryFlush()} method.
*
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
* @throws IllegalStateException If grid has been concurrently stopped or
* {@link #close(boolean)} has already been called on loader.
* @see #tryFlush()
*/
- public void flush() throws IgniteCheckedException, GridInterruptedException, IllegalStateException;
+ public void flush() throws IgniteCheckedException, InternalInterruptedException, IllegalStateException;
/**
* Makes an attempt to load remaining data. This method is mostly similar to {@link #flush},
* with the difference that it won't wait and will exit immediately.
*
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
* @throws IllegalStateException If grid has been concurrently stopped or
* {@link #close(boolean)} has already been called on loader.
* @see #flush()
*/
- public void tryFlush() throws IgniteCheckedException, GridInterruptedException, IllegalStateException;
+ public void tryFlush() throws IgniteCheckedException, InternalInterruptedException, IllegalStateException;
/**
* Loads any remaining data and closes this loader.
*
* @param cancel {@code True} to cancel ongoing loading operations.
* @throws IgniteCheckedException If failed to map key to node.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
*/
- public void close(boolean cancel) throws IgniteCheckedException, GridInterruptedException;
+ public void close(boolean cancel) throws IgniteCheckedException, InternalInterruptedException;
/**
* Closes data loader. This method is identical to calling {@link #close(boolean) close(false)} method.
@@ -332,7 +332,7 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
* {@code try-with-resources} statement.
*
* @throws IgniteCheckedException If failed to close data loader.
- * @throws GridInterruptedException If thread has been interrupted.
+ * @throws InternalInterruptedException If thread has been interrupted.
*/
- @Override public void close() throws IgniteCheckedException, GridInterruptedException;
+ @Override public void close() throws IgniteCheckedException, InternalInterruptedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java b/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java
index 59fe5f7..ce3fa58 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java
@@ -49,7 +49,7 @@ public interface IgniteScheduler {
* @see #callLocal(Callable)
* @see org.apache.ignite.lang.IgniteClosure
*/
- public IgniteFuture<?> runLocal(@Nullable Runnable r);
+ public InternalFuture<?> runLocal(@Nullable Runnable r);
/**
* Executes given callable on internal system thread pool asynchronously.
@@ -63,7 +63,7 @@ public interface IgniteScheduler {
* @see #runLocal(Runnable)
* @see org.apache.ignite.lang.IgniteOutClosure
*/
- public <R> IgniteFuture<R> callLocal(@Nullable Callable<R> c);
+ public <R> InternalFuture<R> callLocal(@Nullable Callable<R> c);
/**
* Schedules job for execution using local <b>cron-based</b> scheduling.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index c403fd7..725cb6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -9,6 +9,7 @@
package org.apache.ignite;
+import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import javax.net.ssl.*;
@@ -263,10 +264,10 @@ public final class IgniteSystemProperties {
/**
* Name of the system property or environment variable to activate synchronous
* listener notification for future objects implemented in GridGain. I.e.
- * closure passed into method {@link org.apache.ignite.lang.IgniteFuture#listenAsync(org.apache.ignite.lang.IgniteInClosure)} will
+ * closure passed into method {@link InternalFuture#listenAsync(org.apache.ignite.lang.IgniteInClosure)} will
* be evaluated in the same thread that will end the future.
*
- * @see org.apache.ignite.lang.IgniteFuture#syncNotify()
+ * @see InternalFuture#syncNotify()
*/
public static final String GG_FUT_SYNC_NOTIFICATION = "GRIDGAIN_FUTURE_SYNC_NOTIFICATION";
@@ -276,7 +277,7 @@ public final class IgniteSystemProperties {
* upon future completion every listener will be notified concurrently in a
* separate thread.
*
- * @see org.apache.ignite.lang.IgniteFuture#concurrentNotify()
+ * @see InternalFuture#concurrentNotify()
*/
public static final String GG_FUT_CONCURRENT_NOTIFICATION = "GRIDGAIN_FUTURE_CONCURRENT_NOTIFICATION";
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java
index 879e6bb..baa13ec 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterTopologyException.java
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.*;
/**
* This exception is used to indicate error with grid topology (e.g., crashed node, etc.).
*/
-public class ClusterTopologyException extends IgniteCheckedException {
+public class ClusterTopologyException extends IgniteException {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java
index 48926c6..8c8038d 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java
@@ -67,7 +67,7 @@ import java.util.*;
* <ul>
* <li>Collision SPI cancelled an active job.</li>
* <li>Parent task has completed without waiting for this job's result.</li>
- * <li>User cancelled task by calling {@link ComputeTaskFuture#cancel()} method.</li>
+ * <li>User cancelled task by calling {@link InternalComputeTaskFuture#cancel()} method.</li>
* </ul>
* </li>
* <li>
@@ -137,7 +137,7 @@ public interface ComputeJob extends Serializable {
* This method is called when system detects that completion of this
* job can no longer alter the overall outcome (for example, when parent task
* has already reduced the results). Job is also cancelled when
- * {@link ComputeTaskFuture#cancel()} is called.
+ * {@link InternalComputeTaskFuture#cancel()} is called.
* <p>
* Note that job cancellation is only a hint, and just like with
* {@link Thread#interrupt()} method, it is really up to the actual job
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java
index 7c9ae3e..1581f55 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobResult.java
@@ -86,7 +86,7 @@ public interface ComputeJobResult {
* execution result even if the job was canceled.
* <p>
* Job can receive cancellation request if the task was explicitly cancelled
- * from future (see {@link ComputeTaskFuture#cancel()}) or if task completed prior
+ * from future (see {@link InternalComputeTaskFuture#cancel()}) or if task completed prior
* to getting results from all remote jobs.
*
* @return {@code true} if job received cancellation request and {@code false} otherwise.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java
index b3d90f3..de72aa8 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java
@@ -96,7 +96,7 @@ import java.util.*;
* method returned {@link ComputeJobResultPolicy#REDUCE} policy, method {@link #reduce(List) reduce(List)}
* is called to aggregate received results into one final result. Once this method is finished the
* execution of the grid task is complete. This result will be returned to the user through
- * {@link ComputeTaskFuture#get()} method.
+ * {@link InternalComputeTaskFuture#get()} method.
* </li>
* </ol>
* <p>
@@ -240,7 +240,7 @@ public interface ComputeTask<T, R> extends Serializable {
* @return Map of grid jobs assigned to subgrid node. Unless {@link ComputeTaskContinuousMapper} is
* injected into task, if {@code null} or empty map is returned, exception will be thrown.
* @throws IgniteCheckedException If mapping could not complete successfully. This exception will be
- * thrown out of {@link ComputeTaskFuture#get()} method.
+ * thrown out of {@link InternalComputeTaskFuture#get()} method.
*/
@Nullable public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable T arg) throws IgniteCheckedException;
@@ -257,13 +257,13 @@ public interface ComputeTask<T, R> extends Serializable {
* @return Result policy that dictates how to process further upcoming
* job results.
* @throws IgniteCheckedException If handling a job result caused an error. This exception will
- * be thrown out of {@link ComputeTaskFuture#get()} method.
+ * be thrown out of {@link InternalComputeTaskFuture#get()} method.
*/
public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException;
/**
* Reduces (or aggregates) results received so far into one compound result to be returned to
- * caller via {@link ComputeTaskFuture#get()} method.
+ * caller via {@link InternalComputeTaskFuture#get()} method.
* <p>
* Note, that if some jobs did not succeed and could not be failed over then the list of
* results passed into this method will include the failed results. Otherwise, failed
@@ -273,7 +273,7 @@ public interface ComputeTask<T, R> extends Serializable {
* {@link ComputeTaskNoResultCache} annotation, then this list will be empty.
* @return Grid job result constructed from results of remote executions.
* @throws IgniteCheckedException If reduction or results caused an error. This exception will
- * be thrown out of {@link ComputeTaskFuture#get()} method.
+ * be thrown out of {@link InternalComputeTaskFuture#get()} method.
*/
@Nullable public R reduce(List<ComputeJobResult> results) throws IgniteCheckedException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java
index bcb3715..74ce7a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskAdapter.java
@@ -11,7 +11,6 @@ package org.apache.ignite.compute;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
-import org.gridgain.grid.*;
import java.util.*;
@@ -78,7 +77,7 @@ public abstract class ComputeTaskAdapter<T, R> implements ComputeTask<T, R> {
* @return Result policy that dictates how to process further upcoming
* job results.
* @throws IgniteCheckedException If handling a job result caused an error effectively rejecting
- * a failover. This exception will be thrown out of {@link ComputeTaskFuture#get()} method.
+ * a failover. This exception will be thrown out of {@link InternalComputeTaskFuture#get()} method.
*/
@Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException {
IgniteCheckedException e = res.getException();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java
index 70d4934..aa3fc2a 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskFuture.java
@@ -27,21 +27,21 @@ public interface ComputeTaskFuture<R> extends IgniteFuture<R> {
*
* @throws ComputeTaskTimeoutException If task execution timed out.
*/
- @Override public R get() throws IgniteCheckedException;
+ @Override public R get() throws IgniteException;
/**
* {@inheritDoc}
*
* @throws ComputeTaskTimeoutException If task execution timed out.
*/
- @Override public R get(long timeout) throws IgniteCheckedException;
+ @Override public R get(long timeout) throws IgniteException;
/**
* {@inheritDoc}
*
* @throws ComputeTaskTimeoutException If task execution timed out.
*/
- @Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
+ @Override public R get(long timeout, TimeUnit unit) throws IgniteException;
/**
* Gets task session of execution grid task.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java
index 9ac37ff..83341b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSession.java
@@ -431,5 +431,5 @@ public interface ComputeTaskSession {
*
* @return Future that will be completed when task "<tt>map</tt>" step has completed.
*/
- public IgniteFuture<?> mapFuture();
+ public InternalFuture<?> mapFuture();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java
index e2690be..a638091 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskTimeoutException.java
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.*;
/**
* This exception indicates that task execution timed out. It is thrown from
- * {@link ComputeTaskFuture#get()} method.
+ * {@link InternalComputeTaskFuture#get()} method.
*/
public class ComputeTaskTimeoutException extends IgniteCheckedException {
/** */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/compute/InternalComputeTaskFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/InternalComputeTaskFuture.java b/modules/core/src/main/java/org/apache/ignite/compute/InternalComputeTaskFuture.java
new file mode 100644
index 0000000..ccbdd42
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/compute/InternalComputeTaskFuture.java
@@ -0,0 +1,52 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.compute;
+
+import org.apache.ignite.*;
+import org.apache.ignite.lang.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * This class defines a handler for asynchronous task execution. It's similar in design
+ * to standard JDK {@link Future} interface but has improved and easier to use exception
+ * hierarchy.
+ * @param <R> Type of the task result returning from {@link ComputeTask#reduce(List)} method.
+ */
+public interface InternalComputeTaskFuture<R> extends InternalFuture<R> {
+ /**
+ * {@inheritDoc}
+ *
+ * @throws ComputeTaskTimeoutException If task execution timed out.
+ */
+ @Override public R get() throws IgniteCheckedException;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @throws ComputeTaskTimeoutException If task execution timed out.
+ */
+ @Override public R get(long timeout) throws IgniteCheckedException;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @throws ComputeTaskTimeoutException If task execution timed out.
+ */
+ @Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException;
+
+ /**
+ * Gets task session of execution grid task.
+ *
+ * @return Task session.
+ */
+ public ComputeTaskSession getTaskSession();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsJob.java b/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsJob.java
index 8fdc30c..ab75589 100644
--- a/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsJob.java
@@ -10,8 +10,8 @@
package org.apache.ignite.fs.mapreduce;
import org.apache.ignite.*;
+import org.apache.ignite.compute.*;
import org.apache.ignite.fs.*;
-import org.gridgain.grid.*;
import java.io.*;
@@ -52,7 +52,7 @@ public interface IgniteFsJob {
* This method is called when system detects that completion of this
* job can no longer alter the overall outcome (for example, when parent task
* has already reduced the results). Job is also cancelled when
- * {@link org.apache.ignite.compute.ComputeTaskFuture#cancel()} is called.
+ * {@link InternalComputeTaskFuture#cancel()} is called.
* <p>
* Note that job cancellation is only a hint, and just like with
* {@link Thread#interrupt()} method, it is really up to the actual job
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
index fe55b87..7188085 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
@@ -62,9 +62,9 @@ public class IgniteAsyncSupportAdapter implements IgniteAsyncSupport {
* @param fut Future.
* @return If async mode is enabled saves future and returns {@code null},
* otherwise waits for future and returns result.
- * @throws IgniteCheckedException If asynchronous mode is disabled and future failed.
+ * @throws IgniteException If asynchronous mode is disabled and future failed.
*/
- public <R> R saveOrGet(IgniteFuture<R> fut) throws IgniteCheckedException {
+ public <R> R saveOrGet(IgniteFuture<R> fut) throws IgniteException {
if (curFut != null) {
curFut.set(fut);
[12/16] incubator-ignite git commit: # IGNITE-26 Created
InternalFuture.
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
index a553dd5..7062404 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
@@ -123,8 +123,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
if (log.isDebugEnabled())
log.debug("Discovery event (will start exchange): " + exchId);
- locExchFut.listenAsync(new CI1<IgniteFuture<?>>() {
- @Override public void apply(IgniteFuture<?> t) {
+ locExchFut.listenAsync(new CI1<InternalFuture<?>>() {
+ @Override public void apply(InternalFuture<?> t) {
if (!enterBusy())
return;
@@ -220,7 +220,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
break;
}
- catch (IgniteFutureTimeoutException ignored) {
+ catch (InternalFutureTimeoutException ignored) {
if (first) {
U.warn(log, "Failed to wait for initial partition map exchange. " +
"Possible reasons are: " + U.nl() +
@@ -238,7 +238,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts())
cacheCtx.preloader().onInitialExchangeComplete(null);
}
- catch (IgniteFutureTimeoutException e) {
+ catch (InternalFutureTimeoutException e) {
IgniteCheckedException err = new IgniteCheckedException("Timed out waiting for exchange future: " + fut, e);
for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts())
@@ -255,7 +255,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
@Override protected void onKernalStop0(boolean cancel) {
// Finish all exchange futures.
for (GridDhtPartitionsExchangeFuture<K, V> f : exchFuts.values())
- f.onDone(new GridInterruptedException("Grid is stopping: " + cctx.gridName()));
+ f.onDone(new InternalInterruptedException("Grid is stopping: " + cctx.gridName()));
U.cancel(exchWorker);
@@ -331,8 +331,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
* @return Exchange futures.
*/
@SuppressWarnings( {"unchecked", "RedundantCast"})
- public List<IgniteFuture<?>> exchangeFutures() {
- return (List<IgniteFuture<?>>)(List)exchFuts.values();
+ public List<InternalFuture<?>> exchangeFutures() {
+ return (List<InternalFuture<?>>)(List)exchFuts.values();
}
/**
@@ -717,7 +717,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
long timeout = cctx.gridConfig().getNetworkTimeout();
boolean startEvtFired = false;
@@ -848,7 +848,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
}
}
- catch (GridInterruptedException e) {
+ catch (InternalInterruptedException e) {
throw e;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloader.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloader.java
index 74ddab2..74ed0db 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloader.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloader.java
@@ -92,12 +92,12 @@ public interface GridCachePreloader<K, V> {
/**
* @return Future which will complete when preloader is safe to use.
*/
- public IgniteFuture<Object> startFuture();
+ public InternalFuture<Object> startFuture();
/**
* @return Future which will complete when preloading is finished.
*/
- public IgniteFuture<?> syncFuture();
+ public InternalFuture<?> syncFuture();
/**
* Requests that preloader sends the request for the key.
@@ -106,7 +106,7 @@ public interface GridCachePreloader<K, V> {
* @param topVer Topology version, {@code -1} if not required.
* @return Future to complete when all keys are preloaded.
*/
- public IgniteFuture<Object> request(Collection<? extends K> keys, long topVer);
+ public InternalFuture<Object> request(Collection<? extends K> keys, long topVer);
/**
* Force preload process.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloaderAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloaderAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloaderAdapter.java
index e37b54a..b9017e2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloaderAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePreloaderAdapter.java
@@ -11,7 +11,6 @@ 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.affinity.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.preloader.*;
import org.gridgain.grid.util.future.*;
@@ -33,7 +32,7 @@ public class GridCachePreloaderAdapter<K, V> implements GridCachePreloader<K, V>
protected final GridCacheAffinityFunction aff;
/** Start future (always completed by default). */
- private final IgniteFuture finFut;
+ private final InternalFuture finFut;
/** Preload predicate. */
protected IgnitePredicate<GridCacheEntryInfo<K, V>> preloadPred;
@@ -88,12 +87,12 @@ public class GridCachePreloaderAdapter<K, V> implements GridCachePreloader<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Object> startFuture() {
+ @Override public InternalFuture<Object> startFuture() {
return finFut;
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> syncFuture() {
+ @Override public InternalFuture<?> syncFuture() {
return finFut;
}
@@ -103,7 +102,7 @@ public class GridCachePreloaderAdapter<K, V> implements GridCachePreloader<K, V>
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Object> request(Collection<? extends K> keys, long topVer) {
+ @Override public InternalFuture<Object> request(Collection<? extends K> keys, long topVer) {
return new GridFinishedFuture<>(cctx.kernalContext());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
index a2a8680..4ec5ee1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
@@ -74,7 +74,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
private final Map<String, GridCache<?, ?>> publicProxies;
/** Map of preload finish futures grouped by preload order. */
- private final NavigableMap<Integer, IgniteFuture<?>> preloadFuts;
+ private final NavigableMap<Integer, InternalFuture<?>> preloadFuts;
/** Maximum detected preload order. */
private int maxPreloadOrder;
@@ -1266,7 +1266,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
}
- for (IgniteFuture<?> fut : preloadFuts.values())
+ for (InternalFuture<?> fut : preloadFuts.values())
((GridCompoundFuture<Object, Object>)fut).markInitialized();
for (GridCacheSharedManager<?, ?> mgr : sharedCtx.managers())
@@ -1419,8 +1419,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
* @param order Cache order.
* @return Compound preload future or {@code null} if order is minimal order found.
*/
- @Nullable public IgniteFuture<?> orderedPreloadFuture(int order) {
- Map.Entry<Integer, IgniteFuture<?>> entry = preloadFuts.lowerEntry(order);
+ @Nullable public InternalFuture<?> orderedPreloadFuture(int order) {
+ Map.Entry<Integer, InternalFuture<?>> entry = preloadFuts.lowerEntry(order);
return entry == null ? null : entry.getValue();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionEx.java
index d8fbdfe..cfc22d6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionEx.java
@@ -62,7 +62,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
+ public InternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -89,7 +89,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param filter Optional filter.
* @return Putx operation future.
*/
- public IgniteFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
+ public InternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -109,7 +109,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @throws IgniteCheckedException If put operation failed.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException;
+ public InternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException;
/**
* Internal method that is called from {@link GridCacheEntryImpl}.
@@ -120,7 +120,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param ttl Optional time-to-lve.
* @return Transform operation future.
*/
- public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer, @Nullable GridCacheEntryEx<K, V> entry,
+ public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer, @Nullable GridCacheEntryEx<K, V> entry,
long ttl);
/**
@@ -143,7 +143,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ public InternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -163,7 +163,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @throws IgniteCheckedException If remove failed.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException;
+ public InternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException;
/**
* Internal method that is called from {@link GridCacheEntryImpl}.
@@ -185,7 +185,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param filter Optional filter.
* @return Putx operation future.
*/
- public IgniteFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ public InternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter);
/**
@@ -211,7 +211,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @throws NullPointerException If either key or value are {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal);
+ public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal);
/**
* Stores given key-value pair in cache only if only if the previous value is equal to the
@@ -281,7 +281,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @throws NullPointerException if the key or value is {@code null}.
* @throws GridCacheFlagException If projection flags validation failed.
*/
- public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val);
+ public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val);
/**
* @param key Key to retrieve the value for.
@@ -309,7 +309,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param key Key to get value for.
* @return Future with result.
*/
- public IgniteFuture<V> getForcePrimaryAsync(K key);
+ public InternalFuture<V> getForcePrimaryAsync(K key);
/**
* Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries
@@ -328,7 +328,7 @@ public interface GridCacheProjectionEx<K, V> extends GridCacheProjection<K, V> {
* @param keys Keys to get values for.
* @return Future with result.
*/
- public IgniteFuture<Map<K, V>> getAllOutTxAsync(List<K> keys);
+ public InternalFuture<Map<K, V>> getAllOutTxAsync(List<K> keys);
/**
* Checks whether this cache is GGFS data cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionImpl.java
index 67eb9e8..c9cabcb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProjectionImpl.java
@@ -584,7 +584,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync(K key) {
+ @Override public InternalFuture<V> reloadAsync(K key) {
return cache.reloadAsync(key, entryFilter(false));
}
@@ -594,7 +594,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync() {
+ @Override public InternalFuture<?> reloadAllAsync() {
return cache.reloadAllAsync(entryFilter(false));
}
@@ -604,7 +604,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
+ @Override public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
return cache.reloadAllAsync(keys, entryFilter(false));
}
@@ -620,7 +620,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync(K key) {
+ @Override public InternalFuture<V> getAsync(K key) {
return cache.getAsync(key, deserializePortables(), entryFilter(false));
}
@@ -630,7 +630,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getForcePrimaryAsync(K key) {
+ @Override public InternalFuture<V> getForcePrimaryAsync(K key) {
return cache.getForcePrimaryAsync(key);
}
@@ -640,7 +640,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
+ @Override public InternalFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
return cache.getAllOutTxAsync(keys);
}
@@ -675,7 +675,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) {
+ @Override public InternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) {
return cache.getAllAsync(keys, deserializePortables(), entryFilter(false));
}
@@ -692,13 +692,13 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(K key, V val,
+ @Override public InternalFuture<V> putAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return putAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
+ @Override public InternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
A.notNull(key, "key", val, "val");
@@ -727,7 +727,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap)
+ @Override public InternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap)
throws IgniteCheckedException {
return cache.putAllDrAsync(drMap);
}
@@ -748,13 +748,13 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return putxAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
long ttl, @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
A.notNull(key, "key", val, "val");
@@ -766,7 +766,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer) {
A.notNull(key, "key", transformer, "valTransform");
return cache.transformAsync(key, transformer);
@@ -778,7 +778,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(K key, V val) {
return putAsync(key, val, cctx.noPeekArray());
}
@@ -788,12 +788,12 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
return putxAsync(key, val, cctx.noPeekArray());
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
+ @Override public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
@Nullable GridCacheEntryEx<K, V> entry, long ttl) {
return cache.transformAsync(key, transformer, entry, ttl);
}
@@ -804,7 +804,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(K key, V val) {
+ @Override public InternalFuture<V> replaceAsync(K key, V val) {
return putAsync(key, val, cctx.hasPeekArray());
}
@@ -814,7 +814,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(K key, V val) {
return putxAsync(key, val, cctx.hasPeekArray());
}
@@ -824,7 +824,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
IgnitePredicate<GridCacheEntry<K, V>> fltr = and(F.<K, V>cacheContainsPeek(oldVal), false);
return cache.putxAsync(key, newVal, fltr);
@@ -854,7 +854,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
m = isAll(m, true);
@@ -865,7 +865,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
if (F.isEmpty(m))
return new GridFinishedFuture<>(cctx.kernalContext());
@@ -873,7 +873,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
throws IgniteCheckedException {
if (F.isEmpty(keys))
return new GridFinishedFuture<>(cctx.kernalContext());
@@ -1038,12 +1038,12 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return removeAsync(key, null, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return cache.removeAsync(key, entry, and(filter, true));
}
@@ -1060,7 +1060,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
+ @Override public InternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
return cache.removeAllDrAsync(drMap);
}
@@ -1071,19 +1071,19 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(K key,
+ @Override public InternalFuture<Boolean> removexAsync(K key,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return removexAsync(key, null, filter);
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return cache.removexAsync(key, entry, and(filter, true));
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
// Check k-v predicate first.
@@ -1104,7 +1104,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
return !isAll(key, val, true) ? new GridFinishedFuture<>(cctx.kernalContext(),
new GridCacheReturn<V>(false)) : cache.removexAsync(key, val);
}
@@ -1115,7 +1115,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> removeAsync(K key, V val) {
return !isAll(key, val, true) ? new GridFinishedFuture<>(cctx.kernalContext(), false) :
cache.removeAsync(key, val);
}
@@ -1127,7 +1127,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return cache.removeAllAsync(keys, and(filter, true));
}
@@ -1139,7 +1139,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
+ @Override public InternalFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
return cache.removeAllAsync(and(filter, true));
}
@@ -1150,7 +1150,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(K key, long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(K key, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return cache.lockAsync(key, timeout, and(filter, false));
}
@@ -1162,7 +1162,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
return cache.lockAllAsync(keys, timeout, and(filter, false));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProxyImpl.java
index 8b6ade8..b3c72c6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProxyImpl.java
@@ -220,7 +220,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, @Nullable Object[] args) {
+ @Override public InternalFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, @Nullable Object[] args) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -378,7 +378,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> reloadAsync(K key) {
+ @Override public InternalFuture<V> reloadAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -402,7 +402,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync() {
+ @Override public InternalFuture<?> reloadAllAsync() {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -426,7 +426,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
+ @Override public InternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -463,7 +463,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getAsync(K key) {
+ @Override public InternalFuture<V> getAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -487,7 +487,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> getForcePrimaryAsync(K key) {
+ @Override public InternalFuture<V> getForcePrimaryAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -511,7 +511,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
+ @Override public InternalFuture<Map<K, V>> getAllOutTxAsync(List<K> keys) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -595,7 +595,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) {
+ @Override public InternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -633,7 +633,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(K key, V val,
+ @Override public InternalFuture<V> putAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -646,7 +646,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
+ @Override public InternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -697,7 +697,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap)
+ @Override public InternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -735,7 +735,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -748,7 +748,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry,
long ttl, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -761,7 +761,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer) {
+ @Override public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -785,7 +785,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<V> putIfAbsentAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -809,7 +809,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -821,7 +821,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
+ @Override public InternalFuture<?> transformAsync(K key, IgniteClosure<V, V> transformer,
@Nullable GridCacheEntryEx<K, V> entry, long ttl) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -846,7 +846,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> replaceAsync(K key, V val) {
+ @Override public InternalFuture<V> replaceAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -870,7 +870,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> replacexAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -894,7 +894,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -944,7 +944,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
+ @Override public InternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -957,7 +957,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -969,7 +969,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
+ @Override public InternalFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1337,7 +1337,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<V> removeAsync(K key, IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1349,7 +1349,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1387,7 +1387,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
+ @Override public InternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1412,7 +1412,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(K key,
+ @Override public InternalFuture<Boolean> removexAsync(K key,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1425,7 +1425,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
+ @Override public InternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1438,7 +1438,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
+ @Override public InternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1474,7 +1474,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
+ @Override public InternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1498,7 +1498,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> removeAsync(K key, V val) {
+ @Override public InternalFuture<Boolean> removeAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1523,7 +1523,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
+ @Override public InternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1549,7 +1549,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
+ @Override public InternalFuture<?> removeAllAsync(@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
@@ -1574,7 +1574,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAsync(K key, long timeout,
+ @Override public InternalFuture<Boolean> lockAsync(K key, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1600,7 +1600,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
+ @Override public InternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout,
@Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1830,7 +1830,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> forceRepartition() {
+ @Override public InternalFuture<?> forceRepartition() {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
index 33ffea5..7fb21aa 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.managers.communication.*;
@@ -65,7 +64,7 @@ public class GridCacheSharedContext<K, V> {
private GridCacheTxMetricsAdapter txMetrics;
/** Preloaders start future. */
- private IgniteFuture<Object> preloadersStartFut;
+ private InternalFuture<Object> preloadersStartFut;
/**
* @param txMgr Transaction manager.
@@ -177,12 +176,12 @@ public class GridCacheSharedContext<K, V> {
/**
* @return Compound preloaders start future.
*/
- public IgniteFuture<Object> preloadersStartFuture() {
+ public InternalFuture<Object> preloadersStartFuture() {
if (preloadersStartFut == null) {
GridCompoundFuture<Object, Object> compound = null;
for (GridCacheContext<K, V> cacheCtx : cacheContexts()) {
- IgniteFuture<Object> startFut = cacheCtx.preloader().startFuture();
+ InternalFuture<Object> startFut = cacheCtx.preloader().startFuture();
if (!startFut.isDone()) {
if (compound == null)
@@ -356,7 +355,7 @@ public class GridCacheSharedContext<K, V> {
* @return {@code true} if waiting was successful.
*/
@SuppressWarnings({"unchecked"})
- public IgniteFuture<?> partitionReleaseFuture(long topVer) {
+ public InternalFuture<?> partitionReleaseFuture(long topVer) {
GridCompoundFuture f = new GridCompoundFuture(kernalCtx);
f.add(mvcc().finishExplicitLocks(topVer));
@@ -425,7 +424,7 @@ public class GridCacheSharedContext<K, V> {
* @param tx Transaction to commit.
* @return Commit future.
*/
- public IgniteFuture<GridCacheTx> commitTxAsync(GridCacheTxEx<K, V> tx) {
+ public InternalFuture<GridCacheTx> commitTxAsync(GridCacheTxEx<K, V> tx) {
Collection<Integer> cacheIds = tx.activeCacheIds();
if (cacheIds.isEmpty())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManager.java
index e01c27d..50c984a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTtlManager.java
@@ -100,7 +100,7 @@ public class GridCacheTtlManager<K, V> extends GridCacheManagerAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, GridInterruptedException {
+ @Override protected void body() throws InterruptedException, InternalInterruptedException {
while (!isCancelled()) {
long now = U.currentTimeMillis();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAdapter.java
index 84045a2..d3d3c4e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxAdapter.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
import org.gridgain.grid.util.*;
@@ -880,7 +879,7 @@ public abstract class GridCacheTxAdapter<K, V> extends GridMetadataAwareAdapter
/** {@inheritDoc} */
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
- @Override public IgniteFuture<GridCacheTx> finishFuture() {
+ @Override public InternalFuture<GridCacheTx> finishFuture() {
GridFutureAdapter<GridCacheTx> fut = finFut.get();
if (fut == null) {
@@ -1452,7 +1451,7 @@ public abstract class GridCacheTxAdapter<K, V> extends GridMetadataAwareAdapter
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheTx> commitAsync() {
+ @Override public InternalFuture<GridCacheTx> commitAsync() {
throw new IllegalStateException("Deserialized transaction can only be used as read-only.");
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxEx.java
index f1c22ea..c8f5b42 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxEx.java
@@ -351,7 +351,7 @@ public interface GridCacheTxEx<K, V> extends GridCacheTx, GridTimeoutObject {
*
* @return Future for prepare step.
*/
- public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync();
+ public InternalFuture<GridCacheTxEx<K, V>> prepareAsync();
/**
* @param endVer End version (a.k.a. <tt>'tnc'</tt> or <tt>'transaction number counter'</tt>)
@@ -375,7 +375,7 @@ public interface GridCacheTxEx<K, V> extends GridCacheTx, GridTimeoutObject {
/**
* @return Future for transaction completion.
*/
- public IgniteFuture<GridCacheTx> finishFuture();
+ public InternalFuture<GridCacheTx> finishFuture();
/**
* @param state Transaction state.
@@ -404,7 +404,7 @@ public interface GridCacheTxEx<K, V> extends GridCacheTx, GridTimeoutObject {
*
* @return Rollback future.
*/
- public IgniteFuture<GridCacheTx> rollbackAsync();
+ public InternalFuture<GridCacheTx> rollbackAsync();
/**
* Callback invoked whenever there is a lock that has been acquired
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
index 85a240c..43d814a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -41,7 +40,7 @@ public class GridCacheTxHandler<K, V> {
/** Shared cache context. */
private GridCacheSharedContext<K, V> ctx;
- public IgniteFuture<GridCacheTxEx<K, V>> processNearTxPrepareRequest(final UUID nearNodeId,
+ public InternalFuture<GridCacheTxEx<K, V>> processNearTxPrepareRequest(final UUID nearNodeId,
final GridNearTxPrepareRequest<K, V> req) {
return prepareTx(nearNodeId, null, req);
}
@@ -137,7 +136,7 @@ public class GridCacheTxHandler<K, V> {
* @param req Near prepare request.
* @return Future for transaction.
*/
- public IgniteFuture<GridCacheTxEx<K, V>> prepareTx(final UUID nearNodeId, @Nullable GridNearTxLocal<K, V> locTx,
+ public InternalFuture<GridCacheTxEx<K, V>> prepareTx(final UUID nearNodeId, @Nullable GridNearTxLocal<K, V> locTx,
final GridNearTxPrepareRequest<K, V> req) {
assert nearNodeId != null;
assert req != null;
@@ -163,20 +162,20 @@ public class GridCacheTxHandler<K, V> {
* @param req Near prepare request.
* @return Prepare future.
*/
- private IgniteFuture<GridCacheTxEx<K, V>> prepareColocatedTx(final GridNearTxLocal<K, V> locTx,
+ private InternalFuture<GridCacheTxEx<K, V>> prepareColocatedTx(final GridNearTxLocal<K, V> locTx,
final GridNearTxPrepareRequest<K, V> req) {
- IgniteFuture<Object> fut = new GridFinishedFutureEx<>(); // TODO force preload keys.
+ InternalFuture<Object> fut = new GridFinishedFutureEx<>(); // TODO force preload keys.
return new GridEmbeddedFuture<>(
ctx.kernalContext(),
fut,
- new C2<Object, Exception, IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public IgniteFuture<GridCacheTxEx<K, V>> apply(Object o, Exception ex) {
+ new C2<Object, Exception, InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public InternalFuture<GridCacheTxEx<K, V>> apply(Object o, Exception ex) {
if (ex != null)
throw new GridClosureException(ex);
- IgniteFuture<GridCacheTxEx<K, V>> fut = locTx.prepareAsyncLocal(req.reads(), req.writes(),
+ InternalFuture<GridCacheTxEx<K, V>> fut = locTx.prepareAsyncLocal(req.reads(), req.writes(),
req.transactionNodes(), req.last(), req.lastBackups());
if (locTx.isRollbackOnly())
@@ -209,7 +208,7 @@ public class GridCacheTxHandler<K, V> {
* @param req Near prepare request.
* @return Prepare future.
*/
- private IgniteFuture<GridCacheTxEx<K, V>> prepareNearTx(final UUID nearNodeId,
+ private InternalFuture<GridCacheTxEx<K, V>> prepareNearTx(final UUID nearNodeId,
final GridNearTxPrepareRequest<K, V> req) {
ClusterNode nearNode = ctx.node(nearNodeId);
@@ -272,7 +271,7 @@ public class GridCacheTxHandler<K, V> {
}
if (tx != null) {
- IgniteFuture<GridCacheTxEx<K, V>> fut = tx.prepareAsync(req.reads(), req.writes(),
+ InternalFuture<GridCacheTxEx<K, V>> fut = tx.prepareAsync(req.reads(), req.writes(),
req.dhtVersions(), req.messageId(), req.miniId(), req.transactionNodes(), req.last(),
req.lastBackups());
@@ -287,8 +286,8 @@ public class GridCacheTxHandler<K, V> {
final GridDhtTxLocal<K, V> tx0 = tx;
- fut.listenAsync(new CI1<IgniteFuture<GridCacheTxEx<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheTxEx<K, V>> txFut) {
+ fut.listenAsync(new CI1<InternalFuture<GridCacheTxEx<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheTxEx<K, V>> txFut) {
try {
txFut.get();
}
@@ -389,7 +388,7 @@ public class GridCacheTxHandler<K, V> {
* @param req Request.
* @return Future.
*/
- @Nullable public IgniteFuture<GridCacheTx> processNearTxFinishRequest(UUID nodeId, GridNearTxFinishRequest<K, V> req) {
+ @Nullable public InternalFuture<GridCacheTx> processNearTxFinishRequest(UUID nodeId, GridNearTxFinishRequest<K, V> req) {
return finish(nodeId, null, req);
}
@@ -398,7 +397,7 @@ public class GridCacheTxHandler<K, V> {
* @param req Request.
* @return Future.
*/
- @Nullable public IgniteFuture<GridCacheTx> finish(UUID nodeId, @Nullable GridNearTxLocal<K, V> locTx,
+ @Nullable public InternalFuture<GridCacheTx> finish(UUID nodeId, @Nullable GridNearTxLocal<K, V> locTx,
GridNearTxFinishRequest<K, V> req) {
assert locTx == null || locTx.nearLocallyMapped() || locTx.colocatedLocallyMapped();
assert nodeId != null;
@@ -407,12 +406,12 @@ public class GridCacheTxHandler<K, V> {
if (log.isDebugEnabled())
log.debug("Processing near tx finish request [nodeId=" + nodeId + ", req=" + req + "]");
- IgniteFuture<GridCacheTx> colocatedFinishFut = null;
+ InternalFuture<GridCacheTx> colocatedFinishFut = null;
if (locTx != null && locTx.colocatedLocallyMapped())
colocatedFinishFut = finishColocatedLocal(req.commit(), locTx);
- IgniteFuture<GridCacheTx> nearFinishFut = null;
+ InternalFuture<GridCacheTx> nearFinishFut = null;
if (locTx == null || locTx.nearLocallyMapped()) {
if (locTx != null)
@@ -444,7 +443,7 @@ public class GridCacheTxHandler<K, V> {
* @param req Finish request.
* @return Finish future.
*/
- private IgniteFuture<GridCacheTx> finishDhtLocal(UUID nodeId, @Nullable GridNearTxLocal<K, V> locTx,
+ private InternalFuture<GridCacheTx> finishDhtLocal(UUID nodeId, @Nullable GridNearTxLocal<K, V> locTx,
GridNearTxFinishRequest<K, V> req) {
GridCacheVersion dhtVer = ctx.tm().mappedVersion(req.version());
@@ -543,7 +542,7 @@ public class GridCacheTxHandler<K, V> {
if (tx.pessimistic())
tx.prepare();
- IgniteFuture<GridCacheTx> commitFut = tx.commitAsync();
+ InternalFuture<GridCacheTx> commitFut = tx.commitAsync();
// Only for error logging.
commitFut.listenAsync(CU.errorLogger(log));
@@ -559,7 +558,7 @@ public class GridCacheTxHandler<K, V> {
tx.nearFinishFutureId(req.futureId());
tx.nearFinishMiniId(req.miniId());
- IgniteFuture<GridCacheTx> rollbackFut = tx.rollbackAsync();
+ InternalFuture<GridCacheTx> rollbackFut = tx.rollbackAsync();
// Only for error logging.
rollbackFut.listenAsync(CU.errorLogger(log));
@@ -571,7 +570,7 @@ public class GridCacheTxHandler<K, V> {
U.error(log, "Failed completing transaction [commit=" + req.commit() + ", tx=" + tx + ']', e);
if (tx != null) {
- IgniteFuture<GridCacheTx> rollbackFut = tx.rollbackAsync();
+ InternalFuture<GridCacheTx> rollbackFut = tx.rollbackAsync();
// Only for error logging.
rollbackFut.listenAsync(CU.errorLogger(log));
@@ -588,7 +587,7 @@ public class GridCacheTxHandler<K, V> {
* @param tx Transaction to commit.
* @return Future.
*/
- public IgniteFuture<GridCacheTx> finishColocatedLocal(boolean commit, GridNearTxLocal<K, V> tx) {
+ public InternalFuture<GridCacheTx> finishColocatedLocal(boolean commit, GridNearTxLocal<K, V> tx) {
try {
if (commit) {
if (!tx.markFinalizing(USER_FINISH)) {
@@ -1406,10 +1405,10 @@ public class GridCacheTxHandler<K, V> {
if (log.isDebugEnabled())
log.debug("Processing check committed transaction request [nodeId=" + nodeId + ", req=" + req + ']');
- IgniteFuture<GridCacheCommittedTxInfo<K, V>> infoFut = ctx.tm().checkPessimisticTxCommitted(req);
+ InternalFuture<GridCacheCommittedTxInfo<K, V>> infoFut = ctx.tm().checkPessimisticTxCommitted(req);
- infoFut.listenAsync(new CI1<IgniteFuture<GridCacheCommittedTxInfo<K, V>>>() {
- @Override public void apply(IgniteFuture<GridCacheCommittedTxInfo<K, V>> infoFut) {
+ infoFut.listenAsync(new CI1<InternalFuture<GridCacheCommittedTxInfo<K, V>>>() {
+ @Override public void apply(InternalFuture<GridCacheCommittedTxInfo<K, V>> infoFut) {
GridCacheCommittedTxInfo<K, V> info = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
index 4ac7b4e..63da7b8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
@@ -288,7 +288,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Boolean> loadMissing(
+ @Override public InternalFuture<Boolean> loadMissing(
final GridCacheContext<K, V> cacheCtx,
boolean async,
final Collection<? extends K> keys,
@@ -1241,7 +1241,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @param filter Filter.
* @return Loaded key-value pairs.
*/
- private IgniteFuture<Map<K, V>> checkMissed(
+ private InternalFuture<Map<K, V>> checkMissed(
final GridCacheContext<K, V> cacheCtx,
final Map<K, V> map,
final Map<K, GridCacheVersion> missedMap,
@@ -1428,7 +1428,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<Map<K, V>> getAllAsync(
+ @Override public InternalFuture<Map<K, V>> getAllAsync(
final GridCacheContext<K, V> cacheCtx,
Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached, final boolean deserializePortable,
@@ -1457,11 +1457,11 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
// Handle locks.
if (pessimistic() && !readCommitted() && !groupLock()) {
- IgniteFuture<Boolean> fut = cacheCtx.cache().txLockAsync(lockKeys, lockTimeout(), this, true, true,
+ InternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(lockKeys, lockTimeout(), this, true, true,
isolation, isInvalidate(), CU.<K, V>empty());
PLC2<Map<K, V>> plc2 = new PLC2<Map<K, V>>() {
- @Override public IgniteFuture<Map<K, V>> postLock() throws IgniteCheckedException {
+ @Override public InternalFuture<Map<K, V>> postLock() throws IgniteCheckedException {
if (log.isDebugEnabled())
log.debug("Acquired transaction lock for read on keys: " + lockKeys);
@@ -1564,7 +1564,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
if (fut.isDone()) {
try {
- IgniteFuture<Map<K, V>> fut1 = plc2.apply(fut.get(), null);
+ InternalFuture<Map<K, V>> fut1 = plc2.apply(fut.get(), null);
return fut1.isDone() ?
new GridFinishedFutureEx<>(finClos.apply(fut1.get(), null)) :
@@ -1610,7 +1610,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
checkMissed(cacheCtx, retMap, missed, redos, deserializePortable, filter),
// Closure that returns another future, based on result from first.
new PMC<Map<K, V>>() {
- @Override public IgniteFuture<Map<K, V>> postMiss(Map<K, V> map) {
+ @Override public InternalFuture<Map<K, V>> postMiss(Map<K, V> map) {
if (redos.isEmpty())
return new GridFinishedFuture<>(cctx.kernalContext(),
Collections.<K, V>emptyMap());
@@ -1658,7 +1658,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> putAllAsync(
+ @Override public InternalFuture<GridCacheReturn<V>> putAllAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, ? extends V> map,
boolean retval,
@@ -1670,7 +1670,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> putAllDrAsync(
+ @Override public InternalFuture<?> putAllDrAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, GridCacheDrInfo<V>> drMap
) {
@@ -1678,7 +1678,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> transformAllAsync(
+ @Override public InternalFuture<GridCacheReturn<V>> transformAllAsync(
GridCacheContext<K, V> cacheCtx,
@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> map,
boolean retval,
@@ -1689,7 +1689,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<?> removeAllDrAsync(
+ @Override public InternalFuture<?> removeAllDrAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, GridCacheVersion> drMap
) {
@@ -1727,7 +1727,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @param drRmvMap DR remove map (optional).
* @return Future with skipped keys (the ones that didn't pass filter for pessimistic transactions).
*/
- protected IgniteFuture<Set<K>> enlistWrite(
+ protected InternalFuture<Set<K>> enlistWrite(
GridCacheContext<K, V> cacheCtx,
Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached,
@@ -1905,7 +1905,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
// one key in the keys collection.
assert keys.size() == 1;
- IgniteFuture<Boolean> fut = loadMissing(
+ InternalFuture<Boolean> fut = loadMissing(
cacheCtx,
true,
F.asList(key),
@@ -2133,7 +2133,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @param filter Filter.
* @return Operation future.
*/
- private IgniteFuture<GridCacheReturn<V>> putAllAsync0(
+ private InternalFuture<GridCacheReturn<V>> putAllAsync0(
final GridCacheContext<K, V> cacheCtx,
@Nullable Map<? extends K, ? extends V> map,
@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> transformMap,
@@ -2235,7 +2235,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
Collection<K> enlisted = new LinkedList<>();
- final IgniteFuture<Set<K>> loadFut = enlistWrite(
+ final InternalFuture<Set<K>> loadFut = enlistWrite(
cacheCtx,
keySet,
cached,
@@ -2271,7 +2271,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
if (log.isDebugEnabled())
log.debug("Before acquiring transaction lock for put on keys: " + keys);
- IgniteFuture<Boolean> fut = cacheCtx.cache().txLockAsync(keys, lockTimeout(), this, false,
+ InternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(keys, lockTimeout(), this, false,
retval, isolation, isInvalidate(), CU.<K, V>empty());
PLC1<GridCacheReturn<V>> plc1 = new PLC1<GridCacheReturn<V>>(ret) {
@@ -2311,8 +2311,8 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
cctx.kernalContext());
}
else {
- return loadFut.chain(new CX1<IgniteFuture<Set<K>>, GridCacheReturn<V>>() {
- @Override public GridCacheReturn<V> applyx(IgniteFuture<Set<K>> f) throws IgniteCheckedException {
+ return loadFut.chain(new CX1<InternalFuture<Set<K>>, GridCacheReturn<V>>() {
+ @Override public GridCacheReturn<V> applyx(InternalFuture<Set<K>> f) throws IgniteCheckedException {
f.get();
return ret;
@@ -2328,7 +2328,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public IgniteFuture<GridCacheReturn<V>> removeAllAsync(
+ @Override public InternalFuture<GridCacheReturn<V>> removeAllAsync(
GridCacheContext<K, V> cacheCtx,
Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached,
@@ -2346,7 +2346,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @param filter Filter.
* @return Future for asynchronous remove.
*/
- private IgniteFuture<GridCacheReturn<V>> removeAllAsync0(
+ private InternalFuture<GridCacheReturn<V>> removeAllAsync0(
final GridCacheContext<K, V> cacheCtx,
@Nullable final Collection<? extends K> keys,
@Nullable Map<? extends K, GridCacheVersion> drMap,
@@ -2416,7 +2416,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
try {
Collection<K> enlisted = new LinkedList<>();
- final IgniteFuture<Set<K>> loadFut = enlistWrite(
+ final InternalFuture<Set<K>> loadFut = enlistWrite(
cacheCtx,
keys0,
/** cached entry */null,
@@ -2446,7 +2446,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
if (log.isDebugEnabled())
log.debug("Before acquiring transaction lock for remove on keys: " + passedKeys);
- IgniteFuture<Boolean> fut = cacheCtx.cache().txLockAsync(passedKeys, lockTimeout(), this, false, retval,
+ InternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(passedKeys, lockTimeout(), this, false, retval,
isolation, isInvalidate(), CU.<K, V>empty());
PLC1<GridCacheReturn<V>> plc1 = new PLC1<GridCacheReturn<V>>(ret) {
@@ -2484,8 +2484,8 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
cctx.kernalContext());
}
else {
- return loadFut.chain(new CX1<IgniteFuture<Set<K>>, GridCacheReturn<V>>() {
- @Override public GridCacheReturn<V> applyx(IgniteFuture<Set<K>> f) throws IgniteCheckedException {
+ return loadFut.chain(new CX1<InternalFuture<Set<K>>, GridCacheReturn<V>>() {
+ @Override public GridCacheReturn<V> applyx(InternalFuture<Set<K>> f) throws IgniteCheckedException {
f.get();
return ret;
@@ -2556,7 +2556,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* Performs keys locking for affinity-based group lock transactions.
* @return Lock future.
*/
- @Override public IgniteFuture<?> groupLockAsync(GridCacheContext<K, V> cacheCtx, Collection<K> keys) {
+ @Override public InternalFuture<?> groupLockAsync(GridCacheContext<K, V> cacheCtx, Collection<K> keys) {
assert groupLock();
try {
@@ -2940,7 +2940,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
*
* @param <T> Return type.
*/
- protected abstract class PostLockClosure1<T> implements IgniteBiClosure<Boolean, Exception, IgniteFuture<T>> {
+ protected abstract class PostLockClosure1<T> implements IgniteBiClosure<Boolean, Exception, InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
@@ -2971,13 +2971,13 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
/** {@inheritDoc} */
- @Override public final IgniteFuture<T> apply(Boolean locked, @Nullable final Exception e) {
+ @Override public final InternalFuture<T> apply(Boolean locked, @Nullable final Exception e) {
if (e != null) {
setRollbackOnly();
if (commit && commitAfterLock())
- return rollbackAsync().chain(new C1<IgniteFuture<GridCacheTx>, T>() {
- @Override public T apply(IgniteFuture<GridCacheTx> f) {
+ return rollbackAsync().chain(new C1<InternalFuture<GridCacheTx>, T>() {
+ @Override public T apply(InternalFuture<GridCacheTx> f) {
throw new GridClosureException(e);
}
});
@@ -2993,8 +2993,8 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
", tx=" + this + ']'));
if (commit && commitAfterLock())
- return rollbackAsync().chain(new C1<IgniteFuture<GridCacheTx>, T>() {
- @Override public T apply(IgniteFuture<GridCacheTx> f) {
+ return rollbackAsync().chain(new C1<InternalFuture<GridCacheTx>, T>() {
+ @Override public T apply(InternalFuture<GridCacheTx> f) {
throw ex;
}
});
@@ -3011,8 +3011,8 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
if (commit && commitAfterLock()) {
rollback = false;
- return commitAsync().chain(new CX1<IgniteFuture<GridCacheTx>, T>() {
- @Override public T applyx(IgniteFuture<GridCacheTx> f) throws IgniteCheckedException {
+ return commitAsync().chain(new CX1<InternalFuture<GridCacheTx>, T>() {
+ @Override public T applyx(InternalFuture<GridCacheTx> f) throws IgniteCheckedException {
f.get();
return r;
@@ -3026,8 +3026,8 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
}
catch (final IgniteCheckedException ex) {
if (commit && commitAfterLock())
- return rollbackAsync().chain(new C1<IgniteFuture<GridCacheTx>, T>() {
- @Override public T apply(IgniteFuture<GridCacheTx> f) {
+ return rollbackAsync().chain(new C1<InternalFuture<GridCacheTx>, T>() {
+ @Override public T apply(InternalFuture<GridCacheTx> f) {
throw new GridClosureException(ex);
}
});
@@ -3055,12 +3055,12 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
*
* @param <T> Return type.
*/
- protected abstract class PostLockClosure2<T> implements IgniteBiClosure<Boolean, Exception, IgniteFuture<T>> {
+ protected abstract class PostLockClosure2<T> implements IgniteBiClosure<Boolean, Exception, InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public final IgniteFuture<T> apply(Boolean locked, @Nullable Exception e) {
+ @Override public final InternalFuture<T> apply(Boolean locked, @Nullable Exception e) {
boolean rollback = true;
try {
@@ -3071,7 +3071,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
throw new GridClosureException(new GridCacheTxTimeoutException("Failed to acquire lock " +
"within provided timeout for transaction [timeout=" + timeout() + ", tx=" + this + ']'));
- IgniteFuture<T> fut = postLock();
+ InternalFuture<T> fut = postLock();
rollback = false;
@@ -3092,7 +3092,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @return Future return value.
* @throws IgniteCheckedException If operation failed.
*/
- protected abstract IgniteFuture<T> postLock() throws IgniteCheckedException;
+ protected abstract InternalFuture<T> postLock() throws IgniteCheckedException;
}
/**
@@ -3100,19 +3100,19 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
*
* @param <T> Return type.
*/
- protected abstract class PostMissClosure<T> implements IgniteBiClosure<T, Exception, IgniteFuture<T>> {
+ protected abstract class PostMissClosure<T> implements IgniteBiClosure<T, Exception, InternalFuture<T>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
- @Override public final IgniteFuture<T> apply(T t, Exception e) {
+ @Override public final InternalFuture<T> apply(T t, Exception e) {
boolean rollback = true;
try {
if (e != null)
throw new GridClosureException(e);
- IgniteFuture<T> fut = postMiss(t);
+ InternalFuture<T> fut = postMiss(t);
rollback = false;
@@ -3134,7 +3134,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
* @return Future return value.
* @throws IgniteCheckedException If operation failed.
*/
- protected abstract IgniteFuture<T> postMiss(T t) throws IgniteCheckedException;
+ protected abstract InternalFuture<T> postMiss(T t) throws IgniteCheckedException;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalEx.java
index 524243c..b8aa4c9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalEx.java
@@ -29,7 +29,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
/**
* @return Future for this transaction.
*/
- public IgniteFuture<GridCacheTxEx<K, V>> future();
+ public InternalFuture<GridCacheTxEx<K, V>> future();
/**
* @return Commit error.
@@ -64,7 +64,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param filter Entry filter.
* @return Future for this get.
*/
- public IgniteFuture<Map<K, V>> getAllAsync(
+ public InternalFuture<Map<K, V>> getAllAsync(
GridCacheContext<K, V> cacheCtx,
Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached,
@@ -79,7 +79,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param ttl Time to live for entry. If negative, leave unchanged.
* @return Future for put operation.
*/
- public IgniteFuture<GridCacheReturn<V>> putAllAsync(
+ public InternalFuture<GridCacheReturn<V>> putAllAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, ? extends V> map,
boolean retval,
@@ -91,7 +91,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param map Map to put.
* @return Transform operation future.
*/
- public IgniteFuture<GridCacheReturn<V>> transformAllAsync(
+ public InternalFuture<GridCacheReturn<V>> transformAllAsync(
GridCacheContext<K, V> cacheCtx,
@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> map,
boolean retval,
@@ -105,7 +105,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param filter Filter.
* @return Future for asynchronous remove.
*/
- public IgniteFuture<GridCacheReturn<V>> removeAllAsync(
+ public InternalFuture<GridCacheReturn<V>> removeAllAsync(
GridCacheContext<K, V> cacheCtx,
Collection<? extends K> keys,
@Nullable GridCacheEntryEx<K, V> cached,
@@ -116,7 +116,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param drMap DR map to put.
* @return Future for DR put operation.
*/
- public IgniteFuture<?> putAllDrAsync(
+ public InternalFuture<?> putAllDrAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, GridCacheDrInfo<V>> drMap);
@@ -124,7 +124,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param drMap DR map.
* @return Future for asynchronous remove.
*/
- public IgniteFuture<?> removeAllDrAsync(
+ public InternalFuture<?> removeAllDrAsync(
GridCacheContext<K, V> cacheCtx,
Map<? extends K, GridCacheVersion> drMap);
@@ -134,7 +134,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param keys Keys to lock.
* @return Lock future.
*/
- public IgniteFuture<?> groupLockAsync(GridCacheContext<K, V> cacheCtx, Collection<K> keys);
+ public InternalFuture<?> groupLockAsync(GridCacheContext<K, V> cacheCtx, Collection<K> keys);
/**
* @return {@code True} if keys from the same partition are allowed to be enlisted in group-lock transaction.
@@ -157,7 +157,7 @@ public interface GridCacheTxLocalEx<K, V> extends GridCacheTxEx<K, V> {
* @param deserializePortable Deserialize portable flag.
* @return Future with {@code True} value if loading took place.
*/
- public IgniteFuture<Boolean> loadMissing(
+ public InternalFuture<Boolean> loadMissing(
GridCacheContext<K, V> cacheCtx,
boolean async,
Collection<? extends K> keys,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90948e67/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
index 7179f8e..8edf91f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
@@ -500,7 +500,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
* @param topVer Topology version.
* @return Future that will be completed when all ongoing transactions are finished.
*/
- public IgniteFuture<Boolean> finishTxs(long topVer) {
+ public InternalFuture<Boolean> finishTxs(long topVer) {
GridCompoundFuture<GridCacheTx, Boolean> res =
new GridCompoundFuture<>(context().kernalContext(),
new IgniteReducer<GridCacheTx, Boolean>() {
@@ -1459,7 +1459,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
* @param threadId Near tx thread ID.
* @return {@code null} if ack was received or future that will be completed when ack is received.
*/
- @Nullable public IgniteFuture<?> awaitFinishAckAsync(UUID rmtNodeId, long threadId) {
+ @Nullable public InternalFuture<?> awaitFinishAckAsync(UUID rmtNodeId, long threadId) {
if (finishSyncDisabled)
return null;
@@ -1949,7 +1949,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
* @param req Check committed request.
* @return Check committed future.
*/
- public IgniteFuture<GridCacheCommittedTxInfo<K, V>> checkPessimisticTxCommitted(GridCachePessimisticCheckCommittedTxRequest req) {
+ public InternalFuture<GridCacheCommittedTxInfo<K, V>> checkPessimisticTxCommitted(GridCachePessimisticCheckCommittedTxRequest req) {
// First check if we have near transaction with this ID.
GridCacheTxEx<K, V> tx = localTxForRecovery(req.nearXidVersion(), !req.nearOnlyCheck());
@@ -1963,8 +1963,8 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
final GridCacheTxEx<K, V> tx0 = tx;
- return tx.finishFuture().chain(new C1<IgniteFuture<GridCacheTx>, GridCacheCommittedTxInfo<K, V>>() {
- @Override public GridCacheCommittedTxInfo<K, V> apply(IgniteFuture<GridCacheTx> txFut) {
+ return tx.finishFuture().chain(new C1<InternalFuture<GridCacheTx>, GridCacheCommittedTxInfo<K, V>>() {
+ @Override public GridCacheCommittedTxInfo<K, V> apply(InternalFuture<GridCacheTx> txFut) {
GridCacheCommittedTxInfo<K, V> info = null;
if (tx0.state() == COMMITTED)
@@ -2160,7 +2160,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
/**
* Commit listener. Checks if commit succeeded and rollbacks if case of error.
*/
- private class CommitListener implements CI1<IgniteFuture<GridCacheTx>> {
+ private class CommitListener implements CI1<InternalFuture<GridCacheTx>> {
/** */
private static final long serialVersionUID = 0L;
@@ -2175,7 +2175,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
}
/** {@inheritDoc} */
- @Override public void apply(IgniteFuture<GridCacheTx> t) {
+ @Override public void apply(InternalFuture<GridCacheTx> t) {
try {
t.get();
}