Repository: ignite
Updated Branches:
  refs/heads/ignite-4652 5f83c94de -> 8b68231e0


ignite-db-x - Removed code duplications.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5bde9b19
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5bde9b19
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5bde9b19

Branch: refs/heads/ignite-4652
Commit: 5bde9b19be9541f46485e92840740c3e338068e2
Parents: c134898
Author: Sergi Vladykin <sergi.vlady...@gmail.com>
Authored: Thu Feb 9 15:13:29 2017 +0300
Committer: Sergi Vladykin <sergi.vlady...@gmail.com>
Committed: Thu Feb 9 15:13:29 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/pagemem/PageMemory.java     |  4 --
 .../pagemem/impl/PageMemoryNoStoreImpl.java     | 22 +---------
 .../cache/IgniteCacheOffheapManagerImpl.java    | 44 -------------------
 .../cache/database/MetadataStorage.java         | 42 ------------------
 .../cache/database/tree/io/BPlusIO.java         | 12 ------
 .../apache/ignite/internal/util/GridUnsafe.java | 45 ++++++++++++++++++--
 .../processors/database/BPlusTreeSelfTest.java  | 11 -----
 .../unsafe/GridUnsafeMemorySelfTest.java        | 35 +++++++++++++++
 .../query/h2/database/io/H2InnerIO.java         | 10 -----
 .../query/h2/database/io/H2LeafIO.java          | 10 -----
 10 files changed, 79 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
index 6bd2ad0..6333ff9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
@@ -18,16 +18,12 @@
 package org.apache.ignite.internal.pagemem;
 
 import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.lifecycle.LifecycleAware;
 
 /**
  */
 public interface PageMemory extends LifecycleAware, PageIdAllocator {
-    /** */
-    public static final ByteOrder NATIVE_BYTE_ORDER = ByteOrder.nativeOrder();
-
     /**
      * Gets the page associated with the given page ID. Each page obtained 
with this method must be released by
      * calling {@link #releasePage(Page)}. This method will allocate page with 
given ID if it doesn't exist.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index 64b7c64..05fce3d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@ -37,8 +37,8 @@ import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.OffheapReadWriteLock;
 import org.apache.ignite.internal.util.offheap.GridOffHeapOutOfMemoryException;
 import org.apache.ignite.lifecycle.LifecycleAware;
-import sun.misc.JavaNioAccess;
-import sun.misc.SharedSecrets;
+
+import static org.apache.ignite.internal.util.GridUnsafe.wrapPointer;
 
 /**
  * Page header structure is described by the following diagram.
@@ -99,9 +99,6 @@ public class PageMemoryNoStoreImpl implements PageMemory {
     /** Page size. */
     private int sysPageSize;
 
-    /** Direct byte buffer factory. */
-    private JavaNioAccess nioAccess;
-
     /** */
     private final IgniteLogger log;
 
@@ -168,8 +165,6 @@ public class PageMemoryNoStoreImpl implements PageMemory {
 
         DirectMemory memory = directMemoryProvider.memory();
 
-        nioAccess = SharedSecrets.getJavaNioAccess();
-
         segments = new Segment[memory.regions().size()];
 
         for (int i = 0; i < segments.length; i++) {
@@ -407,19 +402,6 @@ public class PageMemoryNoStoreImpl implements PageMemory {
     }
 
     /**
-     * @param ptr Pointer to wrap.
-     * @param len Memory location length.
-     * @return Wrapped buffer.
-     */
-    ByteBuffer wrapPointer(long ptr, int len) {
-        ByteBuffer buf = nioAccess.newDirectByteBuffer(ptr, len, null);
-
-        buf.order(NATIVE_BYTE_ORDER);
-
-        return buf;
-    }
-
-    /**
      * Reads page ID from the page at the given absolute position.
      *
      * @param absPtr Absolute memory pointer to the page header.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index e1ea6d1..531665c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import java.nio.ByteBuffer;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Set;
@@ -1460,17 +1459,6 @@ public class IgniteCacheOffheapManagerImpl extends 
GridCacheManagerAdapter imple
     }
 
     /**
-     * @param buf Buffer.
-     * @param off Offset.
-     * @param link Link.
-     * @param hash Hash.
-     */
-    private static void store0(ByteBuffer buf, int off, long link, int hash) {
-        buf.putLong(off, link);
-        buf.putInt(off + 8, hash);
-    }
-
-    /**
      * @param pageAddr Page address.
      * @param off Offset.
      * @param link Link.
@@ -1517,13 +1505,6 @@ public class IgniteCacheOffheapManagerImpl extends 
GridCacheManagerAdapter imple
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, 
CacheSearchRow row) throws IgniteCheckedException {
-            assert row.link() != 0;
-
-            store0(buf, off, row.link(), row.hash());
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, 
CacheSearchRow row) {
             assert row.link() != 0;
 
@@ -1577,13 +1558,6 @@ public class IgniteCacheOffheapManagerImpl extends 
GridCacheManagerAdapter imple
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, 
CacheSearchRow row) throws IgniteCheckedException {
-            assert row.link() != 0;
-
-            store0(buf, off, row.link(), row.hash());
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, 
CacheSearchRow row) {
             assert row.link() != 0;
 
@@ -1767,15 +1741,6 @@ public class IgniteCacheOffheapManagerImpl extends 
GridCacheManagerAdapter imple
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, 
PendingRow row) throws IgniteCheckedException {
-            assert row.link != 0;
-            assert row.expireTime != 0;
-
-            buf.putLong(off, row.expireTime);
-            buf.putLong(off + 8, row.link);
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, PendingRow 
row) throws IgniteCheckedException {
             assert row.link != 0;
             assert row.expireTime != 0;
@@ -1835,15 +1800,6 @@ public class IgniteCacheOffheapManagerImpl extends 
GridCacheManagerAdapter imple
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, 
PendingRow row) throws IgniteCheckedException {
-            assert row.link != 0;
-            assert row.expireTime != 0;
-
-            buf.putLong(off, row.expireTime);
-            buf.putLong(off + 8, row.link);
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, PendingRow 
row) throws IgniteCheckedException {
             assert row.link != 0;
             assert row.expireTime != 0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
index 34bd280..faf7608 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.database;
 
-import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
 import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCheckedException;
@@ -247,37 +246,6 @@ public class MetadataStorage implements MetaStore {
     /**
      * Store row to buffer.
      *
-     * @param buf Buffer.
-     * @param off Offset in buf.
-     * @param row Row to store.
-     */
-    private static void storeRow(
-        final ByteBuffer buf,
-        final int off,
-        final IndexItem row
-    ) {
-        int origPos = buf.position();
-
-        try {
-            buf.position(off);
-
-            // Index name length.
-            buf.put((byte)row.idxName.length);
-
-            // Index name.
-            buf.put(row.idxName);
-
-            // Page ID.
-            buf.putLong(row.pageId);
-        }
-        finally {
-            buf.position(origPos);
-        }
-    }
-
-    /**
-     * Store row to buffer.
-     *
      * @param pageAddr Page address.
      * @param off Offset in buf.
      * @param row Row to store.
@@ -379,11 +347,6 @@ public class MetadataStorage implements MetaStore {
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, IndexItem 
row) throws IgniteCheckedException {
-            storeRow(buf, off, row);
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, IndexItem 
row) throws IgniteCheckedException {
             storeRow(pageAddr, off, row);
         }
@@ -425,11 +388,6 @@ public class MetadataStorage implements MetaStore {
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, IndexItem 
row) throws IgniteCheckedException {
-            storeRow(buf, off, row);
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long buf, int off, IndexItem row) 
throws IgniteCheckedException {
             storeRow(buf, off, row);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/BPlusIO.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/BPlusIO.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/BPlusIO.java
index c34296a..0cf1385 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/BPlusIO.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/BPlusIO.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.database.tree.io;
 
-import java.nio.ByteBuffer;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.processors.cache.database.tree.BPlusTree;
@@ -198,17 +197,6 @@ public abstract class BPlusIO<L> extends PageIO {
      */
     public abstract void storeByOffset(long pageAddr, int off, L row) throws 
IgniteCheckedException;
 
-
-    /**
-     * Store the needed info about the row in the page. Leaf and inner pages 
can store different info.
-     *
-     * @param buf Buffer.
-     * @param off Offset in bytes.
-     * @param row Lookup or full row.
-     * @throws IgniteCheckedException If failed.
-     */
-    public abstract void storeByOffset(ByteBuffer buf, int off, L row) throws 
IgniteCheckedException;
-
     /**
      * Store row info from the given source.
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/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 bbbf22b..0add64d 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
@@ -23,8 +23,9 @@ import java.nio.ByteOrder;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-
 import org.apache.ignite.IgniteSystemProperties;
+import sun.misc.JavaNioAccess;
+import sun.misc.SharedSecrets;
 import sun.misc.Unsafe;
 import sun.nio.ch.DirectBuffer;
 
@@ -47,6 +48,12 @@ import sun.nio.ch.DirectBuffer;
  * </p>
  */
 public abstract class GridUnsafe {
+    /** */
+    public static final ByteOrder NATIVE_BYTE_ORDER = ByteOrder.nativeOrder();
+
+    /** Direct byte buffer factory. */
+    private static final JavaNioAccess nioAccess = 
SharedSecrets.getJavaNioAccess();
+
     /** Unsafe. */
     private static final Unsafe UNSAFE = unsafe();
 
@@ -98,6 +105,40 @@ public abstract class GridUnsafe {
     }
 
     /**
+     * @param ptr Pointer to wrap.
+     * @param len Memory location length.
+     * @return Byte buffer wrapping the given memory.
+     */
+    public static ByteBuffer wrapPointer(long ptr, int len) {
+        ByteBuffer buf = nioAccess.newDirectByteBuffer(ptr, len, null);
+
+        assert buf instanceof DirectBuffer;
+
+        buf.order(NATIVE_BYTE_ORDER);
+
+        return buf;
+    }
+
+    /**
+     * @param len Length.
+     * @return Allocated direct buffer.
+     */
+    public static ByteBuffer allocateBuffer(int len) {
+        long ptr = allocateMemory(len);
+
+        return wrapPointer(ptr, len);
+    }
+
+    /**
+     * @param buf Direct buffer allocated by {@link #allocateBuffer(int)}.
+     */
+    public static void freeBuffer(ByteBuffer buf) {
+        long ptr = bufferAddress(buf);
+
+        freeMemory(ptr);
+    }
+
+    /**
      * Gets boolean value from object field.
      *
      * @param obj Object.
@@ -1613,8 +1654,6 @@ public abstract class GridUnsafe {
      * @return Buffer memory address.
      */
     public static long bufferAddress(ByteBuffer buf) {
-        assert buf instanceof DirectBuffer : buf;
-
         return ((DirectBuffer)buf).address();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/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 a2f1bdf..2d9c693 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
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.database;
 
-import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -1416,11 +1415,6 @@ public class BPlusTreeSelfTest extends 
GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, Long row) 
throws IgniteCheckedException {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, Long row) {
             checkNotRemoved(row);
 
@@ -1480,11 +1474,6 @@ public class BPlusTreeSelfTest extends 
GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void storeByOffset(ByteBuffer buf, int off, Long row) 
throws IgniteCheckedException {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
         @Override public void storeByOffset(long pageAddr, int off, Long row) {
             PageUtils.putLong(pageAddr, off, row);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
index 600098b..1452253 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.util.offheap.unsafe;
 
+import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -27,6 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReferenceArray;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.util.GridRandom;
+import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jsr166.LongAdder8;
@@ -35,6 +37,39 @@ import org.jsr166.LongAdder8;
  * Tests unsafe memory.
  */
 public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest {
+    /** */
+    public void testBuffers() {
+        ByteBuffer b1 = GridUnsafe.allocateBuffer(10);
+        ByteBuffer b2 = GridUnsafe.allocateBuffer(20);
+
+        assertEquals(GridUnsafe.NATIVE_BYTE_ORDER, b2.order());
+        assertTrue(b2.isDirect());
+        assertEquals(20, b2.capacity());
+        assertEquals(20, b2.limit());
+        assertEquals(0, b2.position());
+
+        assertEquals(GridUnsafe.NATIVE_BYTE_ORDER, b1.order());
+        assertTrue(b1.isDirect());
+        assertEquals(10, b1.capacity());
+        assertEquals(10, b1.limit());
+        assertEquals(0, b1.position());
+
+        b1.putLong(1L);
+        b1.putShort((short)7);
+
+        b2.putLong(2L);
+
+        GridUnsafe.freeBuffer(b1);
+
+        b2.putLong(3L);
+        b2.putInt(9);
+
+        for (int i = 0; i <= 16; i++)
+            b2.putInt(i, 100500);
+
+        GridUnsafe.freeBuffer(b2);
+    }
+
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/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 f697121..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
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.query.h2.database.io;
 
-import java.nio.ByteBuffer;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.processors.cache.database.tree.BPlusTree;
@@ -45,15 +44,6 @@ public class H2InnerIO extends BPlusInnerIO<SearchRow> 
implements H2RowLinkIO {
     }
 
     /** {@inheritDoc} */
-    @Override public void storeByOffset(ByteBuffer buf, int off, SearchRow 
row) {
-        GridH2Row row0 = (GridH2Row)row;
-
-        assert row0.link != 0;
-
-        buf.putLong(off, row0.link);
-    }
-
-    /** {@inheritDoc} */
     @Override public void storeByOffset(long pageAddr, int off, SearchRow row) 
{
         GridH2Row row0 = (GridH2Row)row;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5bde9b19/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 26cbdc5..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
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.query.h2.database.io;
 
-import java.nio.ByteBuffer;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.processors.cache.database.tree.BPlusTree;
@@ -45,15 +44,6 @@ public class H2LeafIO extends BPlusLeafIO<SearchRow> 
implements H2RowLinkIO {
     }
 
     /** {@inheritDoc} */
-    @Override public void storeByOffset(ByteBuffer buf, int off, SearchRow 
row) {
-        GridH2Row row0 = (GridH2Row)row;
-
-        assert row0.link != 0;
-
-        buf.putLong(off, row0.link);
-    }
-
-    /** {@inheritDoc} */
     @Override public void storeByOffset(long pageAddr, int off, SearchRow row) 
{
         GridH2Row row0 = (GridH2Row)row;
 

Reply via email to