ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] ignite git commit: Minor.
Date Wed, 11 Jan 2017 14:32:14 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-gg-11810 b81c30acb -> 1038a0b48


http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/CacheVersionIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/CacheVersionIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/CacheVersionIO.java
index fac3e20..8a630cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/CacheVersionIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/CacheVersionIO.java
@@ -78,25 +78,25 @@ public class CacheVersionIO {
     }
 
     /**
-     * @param buf Byte buffer.
+     * @param addr Write address.
      * @param ver Version to write.
      * @param allowNull Is {@code null} version allowed.
      */
-    public static void write(long buf, GridCacheVersion ver, boolean allowNull) {
+    public static void write(long addr, GridCacheVersion ver, boolean allowNull) {
         if (ver == null) {
             if (allowNull)
-                PageUtils.putByte(buf, 0, NULL_PROTO_VER);
+                PageUtils.putByte(addr, 0, NULL_PROTO_VER);
             else
                 throw new IllegalStateException("Cache version is null");
         }
         else {
             byte protoVer = 1; // Version of serialization protocol.
 
-            PageUtils.putByte(buf, 0, protoVer);
-            PageUtils.putInt(buf, 1, ver.topologyVersion());
-            PageUtils.putInt(buf, 5, ver.nodeOrderAndDrIdRaw());
-            PageUtils.putLong(buf, 9, ver.globalTime());
-            PageUtils.putLong(buf, 17, ver.order());
+            PageUtils.putByte(addr, 0, protoVer);
+            PageUtils.putInt(addr, 1, ver.topologyVersion());
+            PageUtils.putInt(addr, 5, ver.nodeOrderAndDrIdRaw());
+            PageUtils.putLong(addr, 9, ver.globalTime());
+            PageUtils.putLong(addr, 17, ver.order());
         }
     }
 
@@ -165,48 +165,23 @@ public class CacheVersionIO {
     }
 
     /**
-     * Gets needed buffer size to read the whole version instance.
-     * Does not change buffer position.
-     *
-     * @param buf Buffer.
-     * @param allowNull Is {@code null} version allowed.
-     * @return Size of serialized version.
-     * @throws IgniteCheckedException If failed.
-     */
-    public static int readSize(long buf, boolean allowNull) throws IgniteCheckedException
{
-        byte protoVer = checkProtocolVersion(PageUtils.getByte(buf, 0), allowNull);
-
-        switch (protoVer) {
-            case NULL_PROTO_VER:
-                return NULL_SIZE;
-
-            case 1:
-                return SIZE_V1;
-
-            default:
-                throw new IllegalStateException();
-        }
-    }
-
-    /**
-     * Reads GridCacheVersion instance from the given buffer. Moves buffer's position by
the number of used
-     * bytes.
+     * Reads GridCacheVersion instance from the given address.
      *
-     * @param buf Byte buffer.
+     * @param pageAddr Page address.
      * @param allowNull Is {@code null} version allowed.
      * @return Version.
      * @throws IgniteCheckedException If failed.
      */
-    public static GridCacheVersion read(long buf, boolean allowNull) throws IgniteCheckedException
{
-        byte protoVer = checkProtocolVersion(PageUtils.getByte(buf, 0), allowNull);
+    public static GridCacheVersion read(long pageAddr, boolean allowNull) throws IgniteCheckedException
{
+        byte protoVer = checkProtocolVersion(PageUtils.getByte(pageAddr, 0), allowNull);
 
         if (protoVer == NULL_PROTO_VER)
             return null;
 
-        int topVer = PageUtils.getInt(buf, 1);
-        int nodeOrderDrId = PageUtils.getInt(buf, 5);
-        long globalTime = PageUtils.getLong(buf, 9);
-        long order = PageUtils.getLong(buf, 17);
+        int topVer = PageUtils.getInt(pageAddr, 1);
+        int nodeOrderDrId = PageUtils.getInt(pageAddr, 5);
+        long globalTime = PageUtils.getLong(pageAddr, 9);
+        long order = PageUtils.getLong(pageAddr, 17);
 
         return new GridCacheVersion(topVer, nodeOrderDrId, globalTime, order);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/IOVersions.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/IOVersions.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/IOVersions.java
index f5eb4b0..428cb3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/IOVersions.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/IOVersions.java
@@ -78,16 +78,16 @@ public final class IOVersions<V extends PageIO> {
     }
 
     /**
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      * @return IO.
      */
-    public V forPage(long buf) {
-        int ver = PageIO.getVersion(buf);
+    public V forPage(long pageAddr) {
+        int ver = PageIO.getVersion(pageAddr);
 
         V res = forVersion(ver);
 
-        assert res.getType() == PageIO.getType(buf) : "resType=" + res.getType() +
-            ", pageType=" + PageIO.getType(buf);
+        assert res.getType() == PageIO.getType(pageAddr) : "resType=" + res.getType() +
+            ", pageType=" + PageIO.getType(pageAddr);
 
         return res;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
index 58f2b66b3..5ffc1b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
@@ -39,7 +39,7 @@ import org.apache.ignite.internal.processors.cache.database.tree.util.PageLockLi
  *    static methods (like {@code {@link #getPageId(long)}}) intentionally:
  *    this base format can not be changed between versions.
  *
- * 2. IO must correctly override {@link #initNewPage(long, long)} method and call super.
+ * 2. IO must correctly override {@link #initNewPage(long, long, int)} method and call super.
  *    We have logic that relies on this behavior.
  *
  * 3. Page IO type ID constant must be declared in this class to have a list of all the
@@ -200,11 +200,11 @@ public abstract class PageIO {
     }
 
     /**
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      * @return Page ID.
      */
-    public static long getPageId(long buf) {
-        return PageUtils.getLong(buf, PAGE_ID_OFF);
+    public static long getPageId(long pageAddr) {
+        return PageUtils.getLong(pageAddr, PAGE_ID_OFF);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageHandler.java
index 222a6a0..3e6e637 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageHandler.java
@@ -285,6 +285,13 @@ public abstract class PageHandler<X, R> {
             (page.fullPageWalRecordPolicy() == FALSE || page.isDirty());
     }
 
+    /**
+     * @param srcAddr Source.
+     * @param dstAddr Destination.
+     * @param srcOff Source offset in bytes.
+     * @param dstOff Destination offset in bytes.
+     * @param cnt Bytes count to copy.
+     */
     public static void copyMemory(long srcAddr, long dstAddr, long srcOff, long dstOff, long
cnt) {
         GridUnsafe.copyMemory(null, srcAddr + srcOff, null, dstAddr + dstOff, cnt);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageLockListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageLockListener.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageLockListener.java
index 8ee4e01..07cdd43 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageLockListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/util/PageLockListener.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.database.tree.util;
 
-import java.nio.ByteBuffer;
 import org.apache.ignite.internal.pagemem.Page;
 
 /**
@@ -31,15 +30,15 @@ public interface PageLockListener {
 
     /**
      * @param page Page.
-     * @param buf Buffer or {@code null} if attempt to lock failed.
+     * @param pageAddr Page address or {@code 0} if attempt to lock failed.
      */
-    public void onWriteLock(Page page, long buf);
+    public void onWriteLock(Page page, long pageAddr);
 
     /**
      * @param page Page.
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      */
-    public void onWriteUnlock(Page page, long buf);
+    public void onWriteUnlock(Page page, long pageAddr);
 
     /**
      * @param page Page.
@@ -48,13 +47,13 @@ public interface PageLockListener {
 
     /**
      * @param page Page.
-     * @param buf Buffer or {@code null} if attempt to lock failed.
+     * @param pageAddr Page address or {@code 0} if attempt to lock failed.
      */
-    public void onReadLock(Page page, long buf);
+    public void onReadLock(Page page, long pageAddr);
 
     /**
      * @param page Page.
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      */
-    public void onReadUnlock(Page page, long buf);
+    public void onReadUnlock(Page page, long pageAddr);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
index eb5a27f..783ab96 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
@@ -46,7 +46,7 @@ import sun.misc.Unsafe;
  */
 public abstract class GridUnsafe {
     /** Unsafe. */
-    public static final Unsafe UNSAFE = unsafe();
+    private static final Unsafe UNSAFE = unsafe();
 
     /** Unaligned flag. */
     private static final boolean UNALIGNED = unaligned();

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java
index 4aa72cb..32503d2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java
@@ -123,7 +123,7 @@ public class IgniteIncompleteCacheObjectSelfTest extends GridCommonAbstractTest
 
         /** {@inheritDoc} */
         @Override public int putValue(long addr) throws IgniteCheckedException {
-            return 0;
+            throw new UnsupportedOperationException();
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeReuseSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeReuseSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeReuseSelfTest.java
index e1d0da6..5f38bb0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeReuseSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeReuseSelfTest.java
@@ -90,15 +90,15 @@ public class BPlusTreeReuseSelfTest extends BPlusTreeSelfTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onReadLock(Page page, long buf) {
-            checkPageId(page, buf);
+        @Override public void onReadLock(Page page, long pageAddr) {
+            checkPageId(page, pageAddr);
 
             assertTrue(readLocks.get().add(page.id()));
         }
 
         /** {@inheritDoc} */
-        @Override public void onReadUnlock(Page page, long buf) {
-            checkPageId(page, buf);
+        @Override public void onReadUnlock(Page page, long pageAddr) {
+            checkPageId(page, pageAddr);
 
             assertTrue(readLocks.get().remove(page.id()));
         }
@@ -109,18 +109,18 @@ public class BPlusTreeReuseSelfTest extends BPlusTreeSelfTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onWriteLock(Page page, long buf) {
-            if (buf == 0L)
+        @Override public void onWriteLock(Page page, long pageAddr) {
+            if (pageAddr == 0L)
                 return; // Failed to lock.
 
-            checkPageId(page, buf);
+            checkPageId(page, pageAddr);
 
             assertTrue(writeLocks.get().add(page.id()));
         }
 
         /** {@inheritDoc} */
-        @Override public void onWriteUnlock(Page page, long buf) {
-            assertEquals(effectivePageId(page.id()), effectivePageId(PageIO.getPageId(buf)));
+        @Override public void onWriteUnlock(Page page, long pageAddr) {
+            assertEquals(effectivePageId(page.id()), effectivePageId(PageIO.getPageId(pageAddr)));
 
             assertTrue(writeLocks.get().remove(page.id()));
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
index 0358f5a..e5cda8f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
@@ -1132,10 +1132,10 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
 
     /**
      * @param page Page.
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      */
-    public static void checkPageId(Page page, long buf) {
-        long pageId = PageIO.getPageId(buf);
+    public static void checkPageId(Page page, long pageAddr) {
+        long pageId = PageIO.getPageId(pageAddr);
 
         // Page ID must be 0L for newly allocated page, for reused page effective ID must
remain the same.
         if (pageId != 0L && page.id() != pageId)
@@ -1199,18 +1199,18 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override protected int compare(BPlusIO<Long> io, long buf, int idx, Long n2)
+        @Override protected int compare(BPlusIO<Long> io, long pageAddr, int idx, Long
n2)
             throws IgniteCheckedException {
-            Long n1 = io.getLookupRow(this, buf, idx);
+            Long n1 = io.getLookupRow(this, pageAddr, idx);
 
             return Long.compare(n1, n2);
         }
 
         /** {@inheritDoc} */
-        @Override protected Long getRow(BPlusIO<Long> io, long buf, int idx) throws
IgniteCheckedException {
+        @Override protected Long getRow(BPlusIO<Long> io, long pageAddr, int idx) throws
IgniteCheckedException {
             assert io.canGetRow() : io;
 
-            return io.getLookupRow(this, buf, idx);
+            return io.getLookupRow(this, pageAddr, idx);
         }
 
         /**
@@ -1247,11 +1247,11 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onReadLock(Page page, long buf) {
-            if (buf != 0L) {
-                long pageId = PageIO.getPageId(buf);
+        @Override public void onReadLock(Page page, long pageAddr) {
+            if (pageAddr != 0L) {
+                long pageId = PageIO.getPageId(pageAddr);
 
-                checkPageId(page, buf);
+                checkPageId(page, pageAddr);
 
                 assertNull(locks(true).put(page.id(), pageId));
             }
@@ -1260,10 +1260,10 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onReadUnlock(Page page, long buf) {
-            checkPageId(page, buf);
+        @Override public void onReadUnlock(Page page, long pageAddr) {
+            checkPageId(page, pageAddr);
 
-            long pageId = PageIO.getPageId(buf);
+            long pageId = PageIO.getPageId(pageAddr);
 
             assertEquals(Long.valueOf(pageId), locks(true).remove(page.id()));
         }
@@ -1274,11 +1274,11 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onWriteLock(Page page, long buf) {
-            if (buf != 0L) {
-                checkPageId(page, buf);
+        @Override public void onWriteLock(Page page, long pageAddr) {
+            if (pageAddr != 0L) {
+                checkPageId(page, pageAddr);
 
-                long pageId = PageIO.getPageId(buf);
+                long pageId = PageIO.getPageId(pageAddr);
 
                 if (pageId == 0L)
                     pageId = page.id(); // It is a newly allocated page.
@@ -1290,8 +1290,8 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void onWriteUnlock(Page page, long buf) {
-            assertEquals(effectivePageId(page.id()), effectivePageId(PageIO.getPageId(buf)));
+        @Override public void onWriteUnlock(Page page, long pageAddr) {
+            assertEquals(effectivePageId(page.id()), effectivePageId(PageIO.getPageId(pageAddr)));
 
             assertEquals(Long.valueOf(page.id()), locks(false).remove(page.id()));
         }
@@ -1382,16 +1382,16 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(long buf, int off, Long row) {
+        @Override public void storeByOffset(long pageAddr, int off, Long row) {
             checkNotRemoved(row);
 
-            PageUtils.putLong(buf, off, row);
+            PageUtils.putLong(pageAddr, off, row);
         }
 
         /** {@inheritDoc} */
-        @Override public Long getLookupRow(BPlusTree<Long,?> tree, long buf, int idx)
+        @Override public Long getLookupRow(BPlusTree<Long,?> tree, long pageAddr, int
idx)
             throws IgniteCheckedException {
-            Long row = PageUtils.getLong(buf, offset(idx));
+            Long row = PageUtils.getLong(pageAddr, offset(idx));
 
             checkNotRemoved(row);
 
@@ -1428,21 +1428,21 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
     private static final class LongLeafIO extends BPlusLeafIO<Long> {
         /**
          */
-        protected LongLeafIO() {
+        LongLeafIO() {
             super(LONG_LEAF_IO, 1, 8);
         }
 
         /** {@inheritDoc} */
-        @Override public int getMaxCount(long buf, int pageSize) {
+        @Override public int getMaxCount(long pageAddr, int pageSize) {
             if (MAX_PER_PAGE != 0)
                 return MAX_PER_PAGE;
 
-            return super.getMaxCount(buf, pageSize);
+            return super.getMaxCount(pageAddr, pageSize);
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(long buf, int off, Long row) {
-            PageUtils.putLong(buf, off, row);
+        @Override public void storeByOffset(long pageAddr, int off, Long row) {
+            PageUtils.putLong(pageAddr, off, row);
         }
 
         /** {@inheritDoc} */
@@ -1453,9 +1453,9 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public Long getLookupRow(BPlusTree<Long,?> tree, long buf, int idx)
+        @Override public Long getLookupRow(BPlusTree<Long,?> tree, long pageAddr, int
idx)
             throws IgniteCheckedException {
-            return PageUtils.getLong(buf, offset(idx));
+            return PageUtils.getLong(pageAddr, offset(idx));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
index 5f9d0fa..5c60b16 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.query.h2.database;
 
-import java.nio.ByteBuffer;
 import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.PageMemory;
@@ -76,9 +75,9 @@ public abstract class H2Tree extends BPlusTree<SearchRow, GridH2Row>
{
     }
 
     /** {@inheritDoc} */
-    @Override protected GridH2Row getRow(BPlusIO<SearchRow> io, long buf, int idx)
+    @Override protected GridH2Row getRow(BPlusIO<SearchRow> io, long pageAddr, int
idx)
         throws IgniteCheckedException {
-        return (GridH2Row)io.getLookupRow(this, buf, idx);
+        return (GridH2Row)io.getLookupRow(this, pageAddr, idx);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
index ac39850..bbd14da 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
@@ -87,9 +87,9 @@ public class H2TreeIndex extends GridH2IndexBase {
         tree = new H2Tree(name, cctx.offheap().reuseListForIndex(name), cctx.cacheId(),
             dbMgr.pageMemory(), cctx.shared().wal(), cctx.offheap().globalRemoveId(),
             tbl.rowFactory(), page.pageId().pageId(), page.isAllocated()) {
-            @Override protected int compare(BPlusIO<SearchRow> io, long buf, int idx,
SearchRow row)
+            @Override protected int compare(BPlusIO<SearchRow> io, long pageAddr, int
idx, SearchRow row)
                 throws IgniteCheckedException {
-                return compareRows(getRow(io, buf, idx), row);
+                return compareRows(getRow(io, pageAddr, idx), row);
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2InnerIO.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2InnerIO.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2InnerIO.java
index e56691e..8252a69 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2InnerIO.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2InnerIO.java
@@ -44,31 +44,31 @@ public class H2InnerIO extends BPlusInnerIO<SearchRow> implements
H2RowLinkIO {
     }
 
     /** {@inheritDoc} */
-    @Override public void storeByOffset(long buf, int off, SearchRow row) {
+    @Override public void storeByOffset(long pageAddr, int off, SearchRow row) {
         GridH2Row row0 = (GridH2Row)row;
 
         assert row0.link != 0;
 
-        PageUtils.putLong(buf, off, row0.link);
+        PageUtils.putLong(pageAddr, off, row0.link);
     }
 
     /** {@inheritDoc} */
-    @Override public SearchRow getLookupRow(BPlusTree<SearchRow,?> tree, long buf,
int idx)
+    @Override public SearchRow getLookupRow(BPlusTree<SearchRow,?> tree, long pageAddr,
int idx)
         throws IgniteCheckedException {
-        long link = getLink(buf, idx);
+        long link = getLink(pageAddr, idx);
 
         return ((H2Tree)tree).getRowFactory().getRow(link);
     }
 
     /** {@inheritDoc} */
-    @Override public void store(long dst, int dstIdx, BPlusIO<SearchRow> srcIo, long
src, int srcIdx) {
-        long link = ((H2RowLinkIO)srcIo).getLink(src, srcIdx);
+    @Override public void store(long dstPageAddr, int dstIdx, BPlusIO<SearchRow> srcIo,
long srcPageAddr, int srcIdx) {
+        long link = ((H2RowLinkIO)srcIo).getLink(srcPageAddr, srcIdx);
 
-        PageUtils.putLong(dst, offset(dstIdx), link);
+        PageUtils.putLong(dstPageAddr, offset(dstIdx), link);
     }
 
     /** {@inheritDoc} */
-    @Override public long getLink(long buf, int idx) {
-        return PageUtils.getLong(buf, offset(idx));
+    @Override public long getLink(long pageAddr, int idx) {
+        return PageUtils.getLong(pageAddr, offset(idx));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2LeafIO.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2LeafIO.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2LeafIO.java
index 67fe337..a24eb99 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2LeafIO.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2LeafIO.java
@@ -44,31 +44,31 @@ public class H2LeafIO extends BPlusLeafIO<SearchRow> implements
H2RowLinkIO {
     }
 
     /** {@inheritDoc} */
-    @Override public void storeByOffset(long buf, int off, SearchRow row) {
+    @Override public void storeByOffset(long pageAddr, int off, SearchRow row) {
         GridH2Row row0 = (GridH2Row)row;
 
         assert row0.link != 0;
 
-        PageUtils.putLong(buf, off, row0.link);
+        PageUtils.putLong(pageAddr, off, row0.link);
     }
 
     /** {@inheritDoc} */
-    @Override public void store(long dst, int dstIdx, BPlusIO<SearchRow> srcIo, long
src, int srcIdx) {
+    @Override public void store(long dstPageAddr, int dstIdx, BPlusIO<SearchRow> srcIo,
long srcPageAddr, int srcIdx) {
         assert srcIo == this;
 
-        PageUtils.putLong(dst, offset(dstIdx), getLink(src, srcIdx));
+        PageUtils.putLong(dstPageAddr, offset(dstIdx), getLink(srcPageAddr, srcIdx));
     }
 
     /** {@inheritDoc} */
-    @Override public SearchRow getLookupRow(BPlusTree<SearchRow,?> tree, long buf,
int idx)
+    @Override public SearchRow getLookupRow(BPlusTree<SearchRow,?> tree, long pageAddr,
int idx)
         throws IgniteCheckedException {
-        long link = getLink(buf, idx);
+        long link = getLink(pageAddr, idx);
 
         return ((H2Tree)tree).getRowFactory().getRow(link);
     }
 
     /** {@inheritDoc} */
-    @Override public long getLink(long buf, int idx) {
-        return PageUtils.getLong(buf, offset(idx));
+    @Override public long getLink(long pageAddr, int idx) {
+        return PageUtils.getLong(pageAddr, offset(idx));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1038a0b4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2RowLinkIO.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2RowLinkIO.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2RowLinkIO.java
index 852f46d..ce69197 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2RowLinkIO.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2RowLinkIO.java
@@ -22,9 +22,9 @@ package org.apache.ignite.internal.processors.query.h2.database.io;
  */
 public interface H2RowLinkIO {
     /**
-     * @param buf Buffer.
+     * @param pageAddr Page address.
      * @param idx Index.
      * @return Row link.
      */
-    public long getLink(long buf, int idx);
+    public long getLink(long pageAddr, int idx);
 }


Mime
View raw message