ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [32/50] [abbrv] ignite git commit: ignite-db - freeSpace
Date Tue, 19 Apr 2016 12:58:49 GMT
ignite-db - freeSpace


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

Branch: refs/heads/ignite-db-x-10884
Commit: 476cccf014d22c40ac72ddd3f550a5ad1a78792b
Parents: 08cd76a
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Thu Apr 14 01:44:26 2016 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Thu Apr 14 01:44:26 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/database/freelist/io/FreeIO.java         | 7 +++++++
 .../processors/cache/database/freelist/io/FreeInnerIO.java    | 7 +++++++
 .../processors/cache/database/freelist/io/FreeLeafIO.java     | 7 +++++++
 3 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/476cccf0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeIO.java
index bc78ad6..de28b22 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeIO.java
@@ -29,4 +29,11 @@ public interface FreeIO {
      * @return Dispersed free space.
      */
     public int dispersedFreeSpace(ByteBuffer buf, int idx);
+
+    /**
+     * @param buf Buffer.
+     * @param idx Index.
+     * @return Free space.
+     */
+    public short freeSpace(ByteBuffer buf, int idx);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/476cccf0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeInnerIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeInnerIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeInnerIO.java
index 248bc82..bfaaaa2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeInnerIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeInnerIO.java
@@ -52,6 +52,13 @@ public class FreeInnerIO extends BPlusInnerIO<FreeItem> implements
FreeIO {
     }
 
     /** {@inheritDoc} */
+    @Override public short freeSpace(ByteBuffer buf, int idx) {
+        int off = offset(idx, SHIFT_LINK);
+
+        return buf.getShort(off);
+    }
+
+    /** {@inheritDoc} */
     @Override public FreeItem getLookupRow(BPlusTree<FreeItem, ?> tree, ByteBuffer
buf, int idx) {
         int off = offset(idx, SHIFT_LINK);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/476cccf0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeLeafIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeLeafIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeLeafIO.java
index 85d7b61..4062800 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeLeafIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/io/FreeLeafIO.java
@@ -56,6 +56,13 @@ public class FreeLeafIO extends BPlusLeafIO<FreeItem> implements
FreeIO {
     }
 
     /** {@inheritDoc} */
+    @Override public short freeSpace(ByteBuffer buf, int idx) {
+        int off = offset(idx);
+
+        return buf.getShort(off);
+    }
+
+    /** {@inheritDoc} */
     @Override public FreeItem getLookupRow(BPlusTree<FreeItem, ?> tree, ByteBuffer
buf, int idx) {
         int off = offset(idx);
 


Mime
View raw message