http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java index 3a60def..0a5f28a 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java @@ -25,7 +25,7 @@ import static org.apache.ignite.events.IgniteEventType.*; import static org.junit.Assert.*; /** - * Test for various {@link GridSwapSpaceSpi} implementations. + * Test for various {@link SwapSpaceSpi} implementations. */ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstractTest { /** Default swap space name. */ @@ -38,12 +38,12 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac protected static final String SPACE2 = "space2"; /** SPI to test. */ - protected GridSwapSpaceSpi spi; + protected SwapSpaceSpi spi; /** - * @return New {@link GridSwapSpaceSpi} instance. + * @return New {@link SwapSpaceSpi} instance. */ - protected abstract GridSwapSpaceSpi spi(); + protected abstract SwapSpaceSpi spi(); /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -66,7 +66,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac /** * @return Swap context. */ - protected GridSwapContext context() { + protected SwapContext context() { return context(null); } @@ -74,8 +74,8 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac * @param clsLdr Class loader. * @return Swap context. */ - private GridSwapContext context(@Nullable ClassLoader clsLdr) { - GridSwapContext ctx = new GridSwapContext(); + private SwapContext context(@Nullable ClassLoader clsLdr) { + SwapContext ctx = new SwapContext(); ctx.classLoader(clsLdr != null ? clsLdr : getClass().getClassLoader()); @@ -102,21 +102,21 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac byte[] val1 = Long.toString(key1).getBytes(); - spi.store(DFLT_SPACE_NAME, new GridSwapKey(key1), val1, context()); + spi.store(DFLT_SPACE_NAME, new SwapKey(key1), val1, context()); assertEquals(1, spi.count(DFLT_SPACE_NAME)); - assertArrayEquals(spi.read(DFLT_SPACE_NAME, new GridSwapKey(key1), context()), val1); + assertArrayEquals(spi.read(DFLT_SPACE_NAME, new SwapKey(key1), context()), val1); final byte[] val2 = "newValue".getBytes(); - spi.store(DFLT_SPACE_NAME, new GridSwapKey(key1), val2, context()); + spi.store(DFLT_SPACE_NAME, new SwapKey(key1), val2, context()); assertEquals(1, spi.count(DFLT_SPACE_NAME)); - assertArrayEquals(spi.read(DFLT_SPACE_NAME, new GridSwapKey(key1), context()), val2); + assertArrayEquals(spi.read(DFLT_SPACE_NAME, new SwapKey(key1), context()), val2); - spi.remove(DFLT_SPACE_NAME, new GridSwapKey(key1), new IgniteInClosure<byte[]>() { + spi.remove(DFLT_SPACE_NAME, new SwapKey(key1), new IgniteInClosure<byte[]>() { @Override public void apply(byte[] old) { assertArrayEquals(val2, old); } @@ -148,49 +148,49 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac final byte[] val1 = Long.toString(key1).getBytes(); - spi.store(space1, new GridSwapKey(key1), val1, context()); + spi.store(space1, new SwapKey(key1), val1, context()); assertEquals(1, spi.count(space1)); assertEquals(0, spi.count(space2)); - spi.store(space2, new GridSwapKey(key1), val1, context()); + spi.store(space2, new SwapKey(key1), val1, context()); assertEquals(1, spi.count(space1)); assertEquals(1, spi.count(space2)); - assertArrayEquals(spi.read(space1, new GridSwapKey(key1), context()), val1); + assertArrayEquals(spi.read(space1, new SwapKey(key1), context()), val1); - assertArrayEquals(spi.read(space2, new GridSwapKey(key1), context()), val1); + assertArrayEquals(spi.read(space2, new SwapKey(key1), context()), val1); long key2 = 2; byte[] val2 = Long.toString(key2).getBytes(); - spi.store(space1, new GridSwapKey(key2), val2, context()); + spi.store(space1, new SwapKey(key2), val2, context()); assertEquals(2, spi.count(space1)); assertEquals(1, spi.count(space2)); - assertArrayEquals(spi.read(space1, new GridSwapKey(key2), context()), val2); + assertArrayEquals(spi.read(space1, new SwapKey(key2), context()), val2); - assertNull(spi.read(space2, new GridSwapKey(key2), context())); + assertNull(spi.read(space2, new SwapKey(key2), context())); final byte[] val12 = "newValue".getBytes(); - spi.store(space1, new GridSwapKey(key1), val12, context()); + spi.store(space1, new SwapKey(key1), val12, context()); assertEquals(2, spi.count(space1)); assertEquals(1, spi.count(space2)); - assertArrayEquals(spi.read(space1, new GridSwapKey(key1), context()), val12); + assertArrayEquals(spi.read(space1, new SwapKey(key1), context()), val12); - assertArrayEquals(spi.read(space2, new GridSwapKey(key1), context()), val1); + assertArrayEquals(spi.read(space2, new SwapKey(key1), context()), val1); - spi.remove(space1, new GridSwapKey(key1), new IgniteInClosure<byte[]>() { + spi.remove(space1, new SwapKey(key1), new IgniteInClosure<byte[]>() { @Override public void apply(byte[] old) { assertArrayEquals(val12, old); } @@ -200,7 +200,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac assertEquals(1, spi.count(space2)); - spi.remove(space2, new GridSwapKey(key1), new IgniteInClosure<byte[]>() { + spi.remove(space2, new SwapKey(key1), new IgniteInClosure<byte[]>() { @Override public void apply(byte[] old) { assertArrayEquals(val1, old); } @@ -219,30 +219,30 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac public void testBatchCrud() throws Exception { assertEquals(0, spi.count(DFLT_SPACE_NAME)); - final Map<GridSwapKey, byte[]> batch = new HashMap<>(); + final Map<SwapKey, byte[]> batch = new HashMap<>(); int batchSize = 10; // Generate initial values. for (int i = 0; i < batchSize; i++) - batch.put(new GridSwapKey(i), Integer.toString(i).getBytes()); + batch.put(new SwapKey(i), Integer.toString(i).getBytes()); spi.storeAll(DFLT_SPACE_NAME, batch, context()); assertEquals(batchSize, spi.count(DFLT_SPACE_NAME)); - Map<GridSwapKey, byte[]> read = spi.readAll(DFLT_SPACE_NAME, batch.keySet(), context()); + Map<SwapKey, byte[]> read = spi.readAll(DFLT_SPACE_NAME, batch.keySet(), context()); // Check all entries are as expected. - assertTrue(F.forAll(read, new P1<Map.Entry<GridSwapKey, byte[]>>() { - @Override public boolean apply(Map.Entry<GridSwapKey, byte[]> e) { + assertTrue(F.forAll(read, new P1<Map.Entry<SwapKey, byte[]>>() { + @Override public boolean apply(Map.Entry<SwapKey, byte[]> e) { return Arrays.equals(batch.get(e.getKey()), e.getValue()); } })); // Generate new values. for (int i = 0; i < batchSize; i++) - batch.put(new GridSwapKey(i), Integer.toString(i + 1).getBytes()); + batch.put(new SwapKey(i), Integer.toString(i + 1).getBytes()); spi.storeAll(DFLT_SPACE_NAME, batch, context()); @@ -251,8 +251,8 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac read = spi.readAll(DFLT_SPACE_NAME, batch.keySet(), context()); // Check all entries are as expected. - assertTrue(F.forAll(read, new P1<Map.Entry<GridSwapKey, byte[]>>() { - @Override public boolean apply(Map.Entry<GridSwapKey, byte[]> e) { + assertTrue(F.forAll(read, new P1<Map.Entry<SwapKey, byte[]>>() { + @Override public boolean apply(Map.Entry<SwapKey, byte[]> e) { return Arrays.equals(batch.get(e.getKey()), e.getValue()); } })); @@ -266,9 +266,9 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac * @throws Exception If failed. */ public void testDeleteIfNotPersist() throws Exception { - spi.store(SPACE1, new GridSwapKey("key1"), "value1".getBytes(), context()); + spi.store(SPACE1, new SwapKey("key1"), "value1".getBytes(), context()); - assertArrayEquals("value1".getBytes(), spi.read(SPACE1, new GridSwapKey("key1"), context())); + assertArrayEquals("value1".getBytes(), spi.read(SPACE1, new SwapKey("key1"), context())); } /** @@ -281,7 +281,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac final CountDownLatch readLatch = new CountDownLatch(cnt); final CountDownLatch rmvLatch = new CountDownLatch(cnt); - spi.setListener(new GridSwapSpaceSpiListener() { + spi.setListener(new SwapSpaceSpiListener() { @Override public void onSwapEvent(int evtType, @Nullable String spaceName, @Nullable byte[] keyBytes) { info("Received event: " + evtType); @@ -300,22 +300,22 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac }); for (int i = 0; i < cnt; i++) - assertNull(spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertNull(spi.read(SPACE1, new SwapKey("key" + i), context())); for (int i = 0; i < cnt; i++) - spi.store(SPACE1, new GridSwapKey("key" + i), str2ByteArray("value" + i), context()); + spi.store(SPACE1, new SwapKey("key" + i), str2ByteArray("value" + i), context()); assert storeLatch.await(5000, MILLISECONDS); for (int i = 0; i < cnt; i++) - assertArrayEquals(str2ByteArray("value" + i), spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertArrayEquals(str2ByteArray("value" + i), spi.read(SPACE1, new SwapKey("key" + i), context())); assert readLatch.await(5000, MILLISECONDS); for (int i = 0; i < cnt; i++) { final int tmp = i; - spi.remove(SPACE1, new GridSwapKey("key" + i), new CI1<byte[]>() { + spi.remove(SPACE1, new SwapKey("key" + i), new CI1<byte[]>() { @Override public void apply(byte[] arr) { assertArrayEquals(str2ByteArray("value" + tmp), arr); @@ -327,7 +327,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac assert rmvLatch.await(10000, MILLISECONDS); for (int i = 0; i < cnt; i++) - assertNull(spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertNull(spi.read(SPACE1, new SwapKey("key" + i), context())); } @@ -341,7 +341,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac final CountDownLatch readLatch = new CountDownLatch(cnt); final CountDownLatch rmvLatch = new CountDownLatch(cnt); - spi.setListener(new GridSwapSpaceSpiListener() { + spi.setListener(new SwapSpaceSpiListener() { @Override public void onSwapEvent(int evtType, @Nullable String spaceName, @Nullable byte[] keyBytes) { info("Received event: " + evtType); @@ -360,22 +360,22 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac }); for (int i = 0; i < cnt; i++) - assertNull(spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertNull(spi.read(SPACE1, new SwapKey("key" + i), context())); for (int i = 0; i < cnt; i++) - spi.store(SPACE1, new GridSwapKey("key" + i), null, context()); + spi.store(SPACE1, new SwapKey("key" + i), null, context()); assert storeLatch.await(5000, MILLISECONDS); for (int i = 0; i < cnt; i++) - assertNull(spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertNull(spi.read(SPACE1, new SwapKey("key" + i), context())); assert readLatch.await(5000, MILLISECONDS); for (int i = 0; i < cnt; i++) { final int tmp = i; - spi.remove(SPACE1, new GridSwapKey("key" + i), new CI1<byte[]>() { + spi.remove(SPACE1, new SwapKey("key" + i), new CI1<byte[]>() { @Override public void apply(byte[] arr) { assertNull(arr); @@ -387,7 +387,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac assert rmvLatch.await(10000, MILLISECONDS); for (int i = 0; i < cnt; i++) - assertNull(spi.read(SPACE1, new GridSwapKey("key" + i), context())); + assertNull(spi.read(SPACE1, new SwapKey("key" + i), context())); } /** @@ -400,7 +400,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac final CountDownLatch readLatch = new CountDownLatch(cnt); final CountDownLatch rmvLatch = new CountDownLatch(cnt); - spi.setListener(new GridSwapSpaceSpiListener() { + spi.setListener(new SwapSpaceSpiListener() { @Override public void onSwapEvent(int evtType, @Nullable String spaceName, @Nullable byte[] keyBytes) { info("Received event: " + evtType); @@ -425,7 +425,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac for (int i = 0; i < cnt; i++) { String val = "value" + i; - spi.store(SPACE1, new GridSwapKey(new Key(i)), str2ByteArray(val), context()); + spi.store(SPACE1, new SwapKey(new Key(i)), str2ByteArray(val), context()); keys.add(i); @@ -436,14 +436,14 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac for (int i = 0; i < cnt; i++) assertArrayEquals(entries.get(i).getBytes(), - spi.read(SPACE1, new GridSwapKey(new Key(i)), context())); + spi.read(SPACE1, new SwapKey(new Key(i)), context())); assert readLatch.await(5000, MILLISECONDS) : "Count: " + readLatch.getCount(); Collections.shuffle(keys); for (final Integer key : keys) { - spi.remove(SPACE1, new GridSwapKey(new Key(key)), new CI1<byte[]>() { + spi.remove(SPACE1, new SwapKey(new Key(key)), new CI1<byte[]>() { @Override public void apply(byte[] arr) { assertArrayEquals(entries.get(key).getBytes(), arr); @@ -455,7 +455,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac assert rmvLatch.await(5000, MILLISECONDS) : "Count: " + rmvLatch.getCount(); for (final Integer key : keys) - assertNull(spi.read(SPACE1, new GridSwapKey(new Key(key)), context())); + assertNull(spi.read(SPACE1, new SwapKey(new Key(key)), context())); } @@ -468,11 +468,11 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac int cnt = 10; for (int i = 0; i < cnt; i++) - spi.store(SPACE1, new GridSwapKey("key" + i, i), str2ByteArray("value" + i), context()); + spi.store(SPACE1, new SwapKey("key" + i, i), str2ByteArray("value" + i), context()); for (int i = 0; i < cnt; i++) assertArrayEquals(str2ByteArray("value" + i), - spi.read(SPACE1, new GridSwapKey("key" + i, i), context())); + spi.read(SPACE1, new SwapKey("key" + i, i), context())); try (IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>> iter = spi.rawIterator(SPACE1)) { assertNotNull(iter); @@ -501,18 +501,18 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac * @throws Exception If failed. */ public void testIterationOverPartition() throws Exception { - spi.store(SPACE1, new GridSwapKey("key", 0), str2ByteArray("value"), context()); + spi.store(SPACE1, new SwapKey("key", 0), str2ByteArray("value"), context()); spi.clear(SPACE1); int cnt = 10; for (int i = 0; i < cnt; i++) - spi.store(SPACE1, new GridSwapKey("key" + i, i), str2ByteArray("value" + i), context()); + spi.store(SPACE1, new SwapKey("key" + i, i), str2ByteArray("value" + i), context()); for (int i = 0; i < cnt; i++) assertArrayEquals(str2ByteArray("value" + i), - spi.read(SPACE1, new GridSwapKey("key" + i, i), context())); + spi.read(SPACE1, new SwapKey("key" + i, i), context())); try (IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>> iter = spi.rawIterator(SPACE1, 5)) { assertNotNull(iter); @@ -530,7 +530,7 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac iter.remove(); - assertNull(spi.read(SPACE1, new GridSwapKey(key, 5), context())); + assertNull(spi.read(SPACE1, new SwapKey(key, 5), context())); i++; } @@ -543,14 +543,14 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac * @throws Exception If failed. */ public void testSwapIterator() throws Exception { - spi.store(SPACE1, new GridSwapKey("key", 0), str2ByteArray("value"), context()); + spi.store(SPACE1, new SwapKey("key", 0), str2ByteArray("value"), context()); spi.clear(SPACE1); int cnt = 10; for (int i = 0; i < cnt; i++) - spi.store(SPACE1, new GridSwapKey("key" + i, i), str2ByteArray("value" + i), context()); + spi.store(SPACE1, new SwapKey("key" + i, i), str2ByteArray("value" + i), context()); IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>> iter = spi.rawIterator(SPACE1);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapCompactionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapCompactionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapCompactionSelfTest.java index 84dcb75..73b2491 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapCompactionSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapCompactionSelfTest.java @@ -17,7 +17,7 @@ import java.nio.ByteBuffer; import java.util.*; /** - * Test for {@link GridFileSwapSpaceSpi}. + * Test for {@link FileSwapSpaceSpi}. */ public class GridFileSwapCompactionSelfTest extends GridCommonAbstractTest { /** @@ -28,16 +28,16 @@ public class GridFileSwapCompactionSelfTest extends GridCommonAbstractTest { X.println("file: " + file.getPath()); - GridFileSwapSpaceSpi.SwapFile f = new GridFileSwapSpaceSpi.SwapFile(file, 8); + FileSwapSpaceSpi.SwapFile f = new FileSwapSpaceSpi.SwapFile(file, 8); Random rnd = new Random(); - ArrayList<GridFileSwapSpaceSpi.SwapValue> arr = new ArrayList<>(); + ArrayList<FileSwapSpaceSpi.SwapValue> arr = new ArrayList<>(); int size = 0; for (int a = 0; a < 100; a++) { - GridFileSwapSpaceSpi.SwapValue[] vals = new GridFileSwapSpaceSpi.SwapValue[1 + rnd.nextInt(10)]; + FileSwapSpaceSpi.SwapValue[] vals = new FileSwapSpaceSpi.SwapValue[1 + rnd.nextInt(10)]; int size0 = 0; @@ -48,12 +48,12 @@ public class GridFileSwapCompactionSelfTest extends GridCommonAbstractTest { size0 += bytes.length; - vals[i] = new GridFileSwapSpaceSpi.SwapValue(bytes); + vals[i] = new FileSwapSpaceSpi.SwapValue(bytes); arr.add(vals[i]); } - f.write(new GridFileSwapSpaceSpi.SwapValues(vals, size0), 1); + f.write(new FileSwapSpaceSpi.SwapValues(vals, size0), 1); size += size0; @@ -63,27 +63,27 @@ public class GridFileSwapCompactionSelfTest extends GridCommonAbstractTest { int i = 0; - for (GridFileSwapSpaceSpi.SwapValue val : arr) + for (FileSwapSpaceSpi.SwapValue val : arr) assertEquals(val.idx(), ++i); i = 0; for (int cnt = arr.size() / 2; i < cnt; i++) { - GridFileSwapSpaceSpi.SwapValue v = arr.remove(rnd.nextInt(arr.size())); + FileSwapSpaceSpi.SwapValue v = arr.remove(rnd.nextInt(arr.size())); assertTrue(f.tryRemove(v.idx(), v)); } int hash0 = 0; - for (GridFileSwapSpaceSpi.SwapValue val : arr) + for (FileSwapSpaceSpi.SwapValue val : arr) hash0 += Arrays.hashCode(val.readValue(f.readCh)); - ArrayList<T2<ByteBuffer, ArrayDeque<GridFileSwapSpaceSpi.SwapValue>>> bufs = new ArrayList(); + ArrayList<T2<ByteBuffer, ArrayDeque<FileSwapSpaceSpi.SwapValue>>> bufs = new ArrayList(); for (;;) { - ArrayDeque<GridFileSwapSpaceSpi.SwapValue> que = new ArrayDeque<>(); + ArrayDeque<FileSwapSpaceSpi.SwapValue> que = new ArrayDeque<>(); ByteBuffer buf = f.compact(que, 1024); @@ -97,21 +97,21 @@ public class GridFileSwapCompactionSelfTest extends GridCommonAbstractTest { int hash1 = 0; - for (GridFileSwapSpaceSpi.SwapValue val : arr) + for (FileSwapSpaceSpi.SwapValue val : arr) hash1 += Arrays.hashCode(val.value(null)); assertEquals(hash0, hash1); File file0 = new File(UUID.randomUUID().toString()); - GridFileSwapSpaceSpi.SwapFile f0 = new GridFileSwapSpaceSpi.SwapFile(file0, 8); + FileSwapSpaceSpi.SwapFile f0 = new FileSwapSpaceSpi.SwapFile(file0, 8); - for (T2<ByteBuffer, ArrayDeque<GridFileSwapSpaceSpi.SwapValue>> t : bufs) + for (T2<ByteBuffer, ArrayDeque<FileSwapSpaceSpi.SwapValue>> t : bufs) f0.write(t.get2(), t.get1(), 1); int hash2 = 0; - for (GridFileSwapSpaceSpi.SwapValue val : arr) + for (FileSwapSpaceSpi.SwapValue val : arr) hash2 += Arrays.hashCode(val.readValue(f0.readCh)); assertEquals(hash2, hash1); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java index b25006a..a7b7f85 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/file/GridFileSwapSpaceSpiSelfTest.java @@ -22,12 +22,12 @@ import java.util.concurrent.*; import java.util.concurrent.atomic.*; /** - * Test for {@link GridFileSwapSpaceSpi}. + * Test for {@link FileSwapSpaceSpi}. */ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTest { /** {@inheritDoc} */ - @Override protected GridSwapSpaceSpi spi() { - GridFileSwapSpaceSpi s = new GridFileSwapSpaceSpi(); + @Override protected SwapSpaceSpi spi() { + FileSwapSpaceSpi s = new FileSwapSpaceSpi(); s.setMaximumSparsity(0.05f); s.setWriteBufferSize(8 * 1024); @@ -43,7 +43,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe public void testMultithreadedWrite() throws Exception { final AtomicLong valCntr = new AtomicLong(); - final GridSwapKey key = new GridSwapKey("key"); + final SwapKey key = new SwapKey("key"); final CountDownLatch wLatch = new CountDownLatch(1); @@ -93,15 +93,15 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe * @param i Integer. * @return Swap key. */ - private GridSwapKey key(int i) { - return new GridSwapKey(i, i % 11, U.intToBytes(i)); + private SwapKey key(int i) { + return new SwapKey(i, i % 11, U.intToBytes(i)); } /** * @throws Exception If failed. */ public void testMultithreadedOperations() throws Exception { - final ConcurrentHashMap8<GridSwapKey, byte[]> map = new ConcurrentHashMap8<>(); + final ConcurrentHashMap8<SwapKey, byte[]> map = new ConcurrentHashMap8<>(); Random rnd = new Random(); @@ -136,7 +136,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe Random rnd = new Random(); while (!fin.get()) { - final GridSwapKey key = key(rnd.nextInt(keys)); + final SwapKey key = key(rnd.nextInt(keys)); switch(rnd.nextInt(13)) { case 0: // store @@ -175,12 +175,12 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe case 3: // storeAll case 4: case 9: - Map<GridSwapKey, byte[]> m = new HashMap<>(); + Map<SwapKey, byte[]> m = new HashMap<>(); int cnt = 1 + rnd.nextInt(25); for (int i = 0; i < cnt; i++) { - GridSwapKey k = key(rnd.nextInt(keys)); + SwapKey k = key(rnd.nextInt(keys)); val = map.remove(k); @@ -196,12 +196,12 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe break; case 5: // readAll - HashSet<GridSwapKey> s = new HashSet<>(); + HashSet<SwapKey> s = new HashSet<>(); cnt = 1 + rnd.nextInt(25); for (int i = 0; i < cnt; i++) { - GridSwapKey k = key(rnd.nextInt(keys)); + SwapKey k = key(rnd.nextInt(keys)); val = map.get(k); @@ -214,10 +214,10 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe s.removeAll(m.keySet()); - Iterator<GridSwapKey> iter = s.iterator(); + Iterator<SwapKey> iter = s.iterator(); while (iter.hasNext()) { - GridSwapKey k = iter.next(); + SwapKey k = iter.next(); if (map.containsKey(k)) iter.remove(); @@ -285,7 +285,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe cnt = 1 + rnd.nextInt(25); for (int i = 0; i < cnt; i++) { - GridSwapKey k = key(rnd.nextInt(keys)); + SwapKey k = key(rnd.nextInt(keys)); val = map.get(k); @@ -296,8 +296,8 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe if (s.isEmpty()) break; - spi.removeAll(space, s, new IgniteBiInClosure<GridSwapKey, byte[]>() { - @Override public void apply(GridSwapKey k, byte[] bytes) { + spi.removeAll(space, s, new IgniteBiInClosure<SwapKey, byte[]>() { + @Override public void apply(SwapKey k, byte[] bytes) { if (bytes != null) assertNull(map.putIfAbsent(k, bytes)); } @@ -337,7 +337,7 @@ public class GridFileSwapSpaceSpiSelfTest extends GridSwapSpaceSpiAbstractSelfTe assertEquals(cnt, spi.count(space)); - for (Map.Entry<GridSwapKey, byte[]> entry : map.entrySet()) + for (Map.Entry<SwapKey, byte[]> entry : map.entrySet()) hash1 += (Integer)entry.getKey().key() * Arrays.hashCode(entry.getValue()); assertEquals(hash0, hash1); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java index 2f44ab3..7e96007 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/inmemory/GridTestSwapSpaceSpi.java @@ -25,9 +25,9 @@ import static org.apache.ignite.events.IgniteEventType.*; * Test swap space SPI that stores values in map. */ @IgniteSpiMultipleInstancesSupport(true) -public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSpaceSpi { +public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi { /** Listener. */ - private GridSwapSpaceSpiListener lsnr; + private SwapSpaceSpiListener lsnr; /** Spaces map. */ private ConcurrentMap<String, Space> spaces = new ConcurrentHashMap8<>(); @@ -65,7 +65,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } /** {@inheritDoc} */ - @Override public byte[] read(@Nullable String spaceName, GridSwapKey key, GridSwapContext ctx) + @Override public byte[] read(@Nullable String spaceName, SwapKey key, SwapContext ctx) throws IgniteSpiException { Space space = space(spaceName); @@ -73,16 +73,16 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } /** {@inheritDoc} */ - @Override public Map<GridSwapKey, byte[]> readAll(@Nullable String spaceName, Iterable<GridSwapKey> keys, - GridSwapContext ctx) throws IgniteSpiException { + @Override public Map<SwapKey, byte[]> readAll(@Nullable String spaceName, Iterable<SwapKey> keys, + SwapContext ctx) throws IgniteSpiException { Space space = space(spaceName); - return space != null ? space.readAll(keys) : Collections.<GridSwapKey, byte[]>emptyMap(); + return space != null ? space.readAll(keys) : Collections.<SwapKey, byte[]>emptyMap(); } /** {@inheritDoc} */ - @Override public void remove(@Nullable String spaceName, GridSwapKey key, @Nullable IgniteInClosure<byte[]> c, - GridSwapContext ctx) throws IgniteSpiException { + @Override public void remove(@Nullable String spaceName, SwapKey key, @Nullable IgniteInClosure<byte[]> c, + SwapContext ctx) throws IgniteSpiException { Space space = space(spaceName); if (space != null) @@ -90,8 +90,8 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } /** {@inheritDoc} */ - @Override public void removeAll(@Nullable String spaceName, Collection<GridSwapKey> keys, - @Nullable IgniteBiInClosure<GridSwapKey, byte[]> c, GridSwapContext ctx) throws IgniteSpiException { + @Override public void removeAll(@Nullable String spaceName, Collection<SwapKey> keys, + @Nullable IgniteBiInClosure<SwapKey, byte[]> c, SwapContext ctx) throws IgniteSpiException { Space space = space(spaceName); if (space != null) @@ -99,19 +99,19 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } /** {@inheritDoc} */ - @Override public void store(@Nullable String spaceName, GridSwapKey key, @Nullable byte[] val, GridSwapContext ctx) + @Override public void store(@Nullable String spaceName, SwapKey key, @Nullable byte[] val, SwapContext ctx) throws IgniteSpiException { ensureSpace(spaceName).store(key, val); } /** {@inheritDoc} */ - @Override public void storeAll(@Nullable String spaceName, Map<GridSwapKey, byte[]> pairs, GridSwapContext ctx) + @Override public void storeAll(@Nullable String spaceName, Map<SwapKey, byte[]> pairs, SwapContext ctx) throws IgniteSpiException { ensureSpace(spaceName).storeAll(pairs); } /** {@inheritDoc} */ - @Override public void setListener(@Nullable GridSwapSpaceSpiListener evictLsnr) { + @Override public void setListener(@Nullable SwapSpaceSpiListener evictLsnr) { lsnr = evictLsnr; } @@ -123,7 +123,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } /** {@inheritDoc} */ - @Override public <K> IgniteSpiCloseableIterator<K> keyIterator(@Nullable String spaceName, GridSwapContext ctx) + @Override public <K> IgniteSpiCloseableIterator<K> keyIterator(@Nullable String spaceName, SwapContext ctx) throws IgniteSpiException { return ensureSpace(spaceName).keyIterator(); } @@ -164,7 +164,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } private void fireEvent(int evtType, String spaceName, @Nullable byte[] key) { - GridSwapSpaceSpiListener lsnr0 = lsnr; + SwapSpaceSpiListener lsnr0 = lsnr; if (lsnr0 != null) lsnr0.onSwapEvent(evtType, spaceName, key); @@ -172,7 +172,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp private class Space { /** Data storage. */ - private ConcurrentMap<GridSwapKey, byte[]> data = new ConcurrentHashMap8<>(); + private ConcurrentMap<SwapKey, byte[]> data = new ConcurrentHashMap8<>(); private final String name; @@ -210,7 +210,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp * @param key Key to read. * @return Read bytes. */ - public byte[] read(GridSwapKey key) { + public byte[] read(SwapKey key) { byte[] bytes = data.get(key); fireEvent(EVT_SWAP_SPACE_DATA_READ, name, key.keyBytes()); @@ -222,10 +222,10 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp * @param keys Keys to read. * @return Read keys. */ - public Map<GridSwapKey, byte[]> readAll(Iterable<GridSwapKey> keys) { - Map<GridSwapKey, byte[]> res = new HashMap<>(); + public Map<SwapKey, byte[]> readAll(Iterable<SwapKey> keys) { + Map<SwapKey, byte[]> res = new HashMap<>(); - for (GridSwapKey key : keys) { + for (SwapKey key : keys) { byte[] val = data.get(key); if (val != null) { @@ -242,7 +242,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp * @param key Key to remove. * @param c Closure. */ - public void remove(GridSwapKey key, IgniteInClosure<byte[]> c) { + public void remove(SwapKey key, IgniteInClosure<byte[]> c) { byte[] val = data.remove(key); if (val != null) { @@ -256,8 +256,8 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp * @param keys Keys to remove. * @param c Closure to apply for removed values. */ - public void removeAll(Iterable<GridSwapKey> keys, IgniteBiInClosure<GridSwapKey, byte[]> c) { - for (GridSwapKey key : keys) { + public void removeAll(Iterable<SwapKey> keys, IgniteBiInClosure<SwapKey, byte[]> c) { + for (SwapKey key : keys) { byte[] val = data.remove(key); if (val != null) { @@ -272,7 +272,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp * @param key Key to store. * @param val Value to store. */ - public void store(GridSwapKey key, byte[] val) { + public void store(SwapKey key, byte[] val) { if (val != null) { data.put(key, val); @@ -289,9 +289,9 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp /** * @param pairs Values to store. */ - public void storeAll(Map<GridSwapKey, byte[]> pairs) { - for (Map.Entry<GridSwapKey, byte[]> entry : pairs.entrySet()) { - GridSwapKey key = entry.getKey(); + public void storeAll(Map<SwapKey, byte[]> pairs) { + for (Map.Entry<SwapKey, byte[]> entry : pairs.entrySet()) { + SwapKey key = entry.getKey(); byte[] val = entry.getValue(); store(key, val); @@ -304,14 +304,14 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp public Collection<Integer> partitions() { Collection<Integer> parts = new HashSet<>(); - for (GridSwapKey key : data.keySet()) + for (SwapKey key : data.keySet()) parts.add(key.partition()); return parts; } public <K> IgniteSpiCloseableIterator<K> keyIterator() { - final Iterator<GridSwapKey> it = data.keySet().iterator(); + final Iterator<SwapKey> it = data.keySet().iterator(); return new IgniteSpiCloseableIterator<K>() { @Override public void close() { @@ -323,7 +323,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } @Override public K next() { - GridSwapKey next = it.next(); + SwapKey next = it.next(); return (K)next.key(); } @@ -335,7 +335,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } public IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>> rawIterator() { - final Iterator<Map.Entry<GridSwapKey, byte[]>> it = data.entrySet().iterator(); + final Iterator<Map.Entry<SwapKey, byte[]>> it = data.entrySet().iterator(); return new IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>>() { @Override public void close() { @@ -347,7 +347,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } @Override public Map.Entry<byte[], byte[]> next() { - final Map.Entry<GridSwapKey, byte[]> next = it.next(); + final Map.Entry<SwapKey, byte[]> next = it.next(); return new Map.Entry<byte[], byte[]>() { @Override public byte[] getKey() { @@ -371,13 +371,13 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp } public IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>> rawIterator(final int part) { - final Iterator<Map.Entry<GridSwapKey, byte[]>> it = data.entrySet().iterator(); + final Iterator<Map.Entry<SwapKey, byte[]>> it = data.entrySet().iterator(); return new IgniteSpiCloseableIterator<Map.Entry<byte[], byte[]>>() { /** Next entry in this iterator. */ - private Map.Entry<GridSwapKey, byte[]> next; + private Map.Entry<SwapKey, byte[]> next; - private Map.Entry<GridSwapKey, byte[]> cur; + private Map.Entry<SwapKey, byte[]> cur; { advance(); @@ -395,7 +395,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp if (next == null) throw new NoSuchElementException(); - final Map.Entry<GridSwapKey, byte[]> ret = next; + final Map.Entry<SwapKey, byte[]> ret = next; cur = ret; @@ -425,7 +425,7 @@ public class GridTestSwapSpaceSpi extends IgniteSpiAdapter implements GridSwapSp private void advance() { while (it.hasNext()) { - Map.Entry<GridSwapKey, byte[]> entry = it.next(); + Map.Entry<SwapKey, byte[]> entry = it.next(); if(entry.getKey().partition() == part) { cur = next; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/noop/GridNoopSwapSpaceSpiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/noop/GridNoopSwapSpaceSpiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/noop/GridNoopSwapSpaceSpiSelfTest.java index 9a1cbc7..d7b90de 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/noop/GridNoopSwapSpaceSpiSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/swapspace/noop/GridNoopSwapSpaceSpiSelfTest.java @@ -17,7 +17,7 @@ import org.gridgain.grid.spi.swapspace.*; import org.gridgain.testframework.junits.common.*; /** - * Tests for "noop" realization of {@link GridSwapSpaceSpi}. + * Tests for "noop" realization of {@link org.gridgain.grid.spi.swapspace.SwapSpaceSpi}. */ public class GridNoopSwapSpaceSpiSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @@ -40,11 +40,11 @@ public class GridNoopSwapSpaceSpiSelfTest extends GridCommonAbstractTest { try { Ignite ignite = startGrid(1); - GridSwapSpaceSpi spi = ignite.configuration().getSwapSpaceSpi(); + SwapSpaceSpi spi = ignite.configuration().getSwapSpaceSpi(); assertNotNull(spi); - assertTrue(spi instanceof GridNoopSwapSpaceSpi); + assertTrue(spi instanceof NoopSwapSpaceSpi); } finally { stopAllGrids(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java b/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java index fad2628..0f5a559 100644 --- a/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java +++ b/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java @@ -260,7 +260,7 @@ public class GridSwapEvictAllBenchmark { ccfg.setEvictionPolicy(new GridCacheFifoEvictionPolicy(EVICT_PLC_SIZE)); ccfg.setStore(store); - GridFileSwapSpaceSpi swap = new GridFileSwapSpaceSpi(); + FileSwapSpaceSpi swap = new FileSwapSpaceSpi(); // swap.setConcurrencyLevel(16); // swap.setWriterThreadsCount(16); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/core/src/test/java/org/gridgain/testframework/GridSpiTestContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/testframework/GridSpiTestContext.java b/modules/core/src/test/java/org/gridgain/testframework/GridSpiTestContext.java index dfc1c7f..bc5384d 100644 --- a/modules/core/src/test/java/org/gridgain/testframework/GridSpiTestContext.java +++ b/modules/core/src/test/java/org/gridgain/testframework/GridSpiTestContext.java @@ -443,7 +443,7 @@ public class GridSpiTestContext implements IgniteSpiContext { } /** {@inheritDoc} */ - @Override public <T> T readFromSwap(String spaceName, GridSwapKey key, @Nullable ClassLoader ldr) + @Override public <T> T readFromSwap(String spaceName, SwapKey key, @Nullable ClassLoader ldr) throws GridException { return null; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java index ede7b64..4efc310 100644 --- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java @@ -105,7 +105,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT c.setIndexingSpi(indexing); // Otherwise noop swap space will be chosen on Windows. - c.setSwapSpaceSpi(new GridFileSwapSpaceSpi()); + c.setSwapSpaceSpi(new FileSwapSpaceSpi()); c.setMarshaller(new IgniteOptimizedMarshaller(false)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/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 7e9cc9b..e5a72f2 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 @@ -111,7 +111,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest { cfg.setNetworkTimeout(2000); - cfg.setSwapSpaceSpi(new GridFileSwapSpaceSpi()); + cfg.setSwapSpaceSpi(new FileSwapSpaceSpi()); GridH2IndexingSpi indexingSpi = new GridH2IndexingSpi(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/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 a512a2f..8a7522f 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 @@ -74,7 +74,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest cfg.setDiscoverySpi(disco); - cfg.setSwapSpaceSpi(new GridFileSwapSpaceSpi()); + cfg.setSwapSpaceSpi(new FileSwapSpaceSpi()); cfg.setMarshaller(new IgniteOptimizedMarshaller(false)); GridCacheConfiguration cacheCfg = defaultCacheConfiguration(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java index 14bf8ec..dfa298a 100644 --- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java @@ -102,11 +102,11 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest { try { Ignite ignite = startGrids(1); - GridSwapSpaceSpi swapSpi = ignite.configuration().getSwapSpaceSpi(); + SwapSpaceSpi swapSpi = ignite.configuration().getSwapSpaceSpi(); assertNotNull(swapSpi); - assertTrue(swapSpi instanceof GridNoopSwapSpaceSpi); + assertTrue(swapSpi instanceof NoopSwapSpaceSpi); } finally { stopAllGrids(); @@ -120,11 +120,11 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest { try { Ignite ignite = startGrids(1); - GridSwapSpaceSpi swapSpi = ignite.configuration().getSwapSpaceSpi(); + SwapSpaceSpi swapSpi = ignite.configuration().getSwapSpaceSpi(); assertNotNull(swapSpi); - assertFalse(swapSpi instanceof GridNoopSwapSpaceSpi); + assertFalse(swapSpi instanceof NoopSwapSpaceSpi); } finally { stopAllGrids(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c31cec7c/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridIndexingWithNoopSwapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridIndexingWithNoopSwapSelfTest.java index 1b915bb..02355e5 100644 --- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridIndexingWithNoopSwapSelfTest.java +++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridIndexingWithNoopSwapSelfTest.java @@ -54,7 +54,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest { c.setIndexingSpi(indexing); - c.setSwapSpaceSpi(new GridNoopSwapSpaceSpi()); + c.setSwapSpaceSpi(new NoopSwapSpaceSpi()); GridCacheConfiguration cc = defaultCacheConfiguration();