Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
5e703674
提交
5e703674
authored
8月 31, 2012
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
A persistent multi-version map (work in progress) - rename to MVStore / MVMap
上级
d5cc1876
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
124 行增加
和
125 行删除
+124
-125
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+2
-2
RtreeMap.java
h2/src/test/org/h2/test/store/RtreeMap.java
+4
-4
SequenceMap.java
h2/src/test/org/h2/test/store/SequenceMap.java
+4
-4
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+51
-51
TestMapFactory.java
h2/src/test/org/h2/test/store/TestMapFactory.java
+3
-3
TestRtree.java
h2/src/test/org/h2/test/store/TestRtree.java
+6
-6
ChangeCursor.java
h2/src/tools/org/h2/dev/store/btree/ChangeCursor.java
+1
-1
Cursor.java
h2/src/tools/org/h2/dev/store/btree/Cursor.java
+2
-2
MVMap.java
h2/src/tools/org/h2/dev/store/btree/MVMap.java
+9
-9
MVStore.java
h2/src/tools/org/h2/dev/store/btree/MVStore.java
+35
-36
MapFactory.java
h2/src/tools/org/h2/dev/store/btree/MapFactory.java
+2
-2
Page.java
h2/src/tools/org/h2/dev/store/btree/Page.java
+5
-5
没有找到文件。
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
5e703674
...
@@ -105,7 +105,7 @@ import org.h2.test.server.TestWeb;
...
@@ -105,7 +105,7 @@ import org.h2.test.server.TestWeb;
import
org.h2.test.server.TestInit
;
import
org.h2.test.server.TestInit
;
import
org.h2.test.store.TestCacheLIRS
;
import
org.h2.test.store.TestCacheLIRS
;
import
org.h2.test.store.TestDataUtils
;
import
org.h2.test.store.TestDataUtils
;
import
org.h2.test.store.Test
BtreeMap
Store
;
import
org.h2.test.store.Test
MV
Store
;
import
org.h2.test.store.TestRtree
;
import
org.h2.test.store.TestRtree
;
import
org.h2.test.synth.TestBtreeIndex
;
import
org.h2.test.synth.TestBtreeIndex
;
import
org.h2.test.synth.TestCrashAPI
;
import
org.h2.test.synth.TestCrashAPI
;
...
@@ -665,7 +665,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -665,7 +665,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
private
void
testUnit
()
{
private
void
testUnit
()
{
// store
// store
new
Test
BtreeMap
Store
().
runTest
(
this
);
new
Test
MV
Store
().
runTest
(
this
);
new
TestCacheLIRS
().
runTest
(
this
);
new
TestCacheLIRS
().
runTest
(
this
);
new
TestDataUtils
().
runTest
(
this
);
new
TestDataUtils
().
runTest
(
this
);
new
TestRtree
().
runTest
(
this
);
new
TestRtree
().
runTest
(
this
);
...
...
h2/src/test/org/h2/test/store/RtreeMap.java
浏览文件 @
5e703674
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
package
org
.
h2
.
test
.
store
;
package
org
.
h2
.
test
.
store
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
org.h2.dev.store.btree.
Btree
Map
;
import
org.h2.dev.store.btree.
MV
Map
;
import
org.h2.dev.store.btree.
BtreeMap
Store
;
import
org.h2.dev.store.btree.
MV
Store
;
import
org.h2.dev.store.btree.Cursor
;
import
org.h2.dev.store.btree.Cursor
;
import
org.h2.dev.store.btree.CursorPos
;
import
org.h2.dev.store.btree.CursorPos
;
import
org.h2.dev.store.btree.DataType
;
import
org.h2.dev.store.btree.DataType
;
...
@@ -21,12 +21,12 @@ import org.h2.util.New;
...
@@ -21,12 +21,12 @@ import org.h2.util.New;
* @param <K> the key class
* @param <K> the key class
* @param <V> the value class
* @param <V> the value class
*/
*/
public
class
RtreeMap
<
K
,
V
>
extends
Btree
Map
<
K
,
V
>
{
public
class
RtreeMap
<
K
,
V
>
extends
MV
Map
<
K
,
V
>
{
private
final
SpatialType
keyType
;
private
final
SpatialType
keyType
;
private
boolean
quadraticSplit
;
private
boolean
quadraticSplit
;
RtreeMap
(
BtreeMap
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
RtreeMap
(
MV
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
long
createVersion
)
{
DataType
valueType
,
long
createVersion
)
{
super
(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
super
(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
this
.
keyType
=
(
SpatialType
)
keyType
;
this
.
keyType
=
(
SpatialType
)
keyType
;
...
...
h2/src/test/org/h2/test/store/SequenceMap.java
浏览文件 @
5e703674
...
@@ -9,8 +9,8 @@ package org.h2.test.store;
...
@@ -9,8 +9,8 @@ package org.h2.test.store;
import
java.util.AbstractSet
;
import
java.util.AbstractSet
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.Set
;
import
java.util.Set
;
import
org.h2.dev.store.btree.
Btree
Map
;
import
org.h2.dev.store.btree.
MV
Map
;
import
org.h2.dev.store.btree.
BtreeMap
Store
;
import
org.h2.dev.store.btree.
MV
Store
;
import
org.h2.dev.store.btree.DataType
;
import
org.h2.dev.store.btree.DataType
;
/**
/**
...
@@ -19,11 +19,11 @@ import org.h2.dev.store.btree.DataType;
...
@@ -19,11 +19,11 @@ import org.h2.dev.store.btree.DataType;
* @param <K> the key type
* @param <K> the key type
* @param <V> the key type
* @param <V> the key type
*/
*/
public
class
SequenceMap
<
K
,
V
>
extends
Btree
Map
<
K
,
V
>
{
public
class
SequenceMap
<
K
,
V
>
extends
MV
Map
<
K
,
V
>
{
int
min
=
1
,
max
=
10
;
int
min
=
1
,
max
=
10
;
SequenceMap
(
BtreeMap
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
SequenceMap
(
MV
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
long
createVersion
)
{
DataType
valueType
,
long
createVersion
)
{
super
(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
super
(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
setReadOnly
(
true
);
setReadOnly
(
true
);
...
...
h2/src/test/org/h2/test/store/Test
BtreeMap
Store.java
→
h2/src/test/org/h2/test/store/Test
MV
Store.java
浏览文件 @
5e703674
差异被折叠。
点击展开。
h2/src/test/org/h2/test/store/TestMapFactory.java
浏览文件 @
5e703674
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
*/
*/
package
org
.
h2
.
test
.
store
;
package
org
.
h2
.
test
.
store
;
import
org.h2.dev.store.btree.
Btree
Map
;
import
org.h2.dev.store.btree.
MV
Map
;
import
org.h2.dev.store.btree.
BtreeMap
Store
;
import
org.h2.dev.store.btree.
MV
Store
;
import
org.h2.dev.store.btree.DataType
;
import
org.h2.dev.store.btree.DataType
;
import
org.h2.dev.store.btree.MapFactory
;
import
org.h2.dev.store.btree.MapFactory
;
import
org.h2.dev.store.btree.StringType
;
import
org.h2.dev.store.btree.StringType
;
...
@@ -17,7 +17,7 @@ import org.h2.dev.store.btree.StringType;
...
@@ -17,7 +17,7 @@ import org.h2.dev.store.btree.StringType;
public
class
TestMapFactory
implements
MapFactory
{
public
class
TestMapFactory
implements
MapFactory
{
@Override
@Override
public
<
K
,
V
>
BtreeMap
<
K
,
V
>
buildMap
(
String
mapType
,
BtreeMap
Store
store
,
public
<
K
,
V
>
MVMap
<
K
,
V
>
buildMap
(
String
mapType
,
MV
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
long
createVersion
)
{
long
createVersion
)
{
if
(
mapType
.
equals
(
"s"
))
{
if
(
mapType
.
equals
(
"s"
))
{
...
...
h2/src/test/org/h2/test/store/TestRtree.java
浏览文件 @
5e703674
...
@@ -14,7 +14,7 @@ import java.util.Random;
...
@@ -14,7 +14,7 @@ import java.util.Random;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageWriter
;
import
javax.imageio.ImageWriter
;
import
javax.imageio.stream.FileImageOutputStream
;
import
javax.imageio.stream.FileImageOutputStream
;
import
org.h2.dev.store.btree.
BtreeMap
Store
;
import
org.h2.dev.store.btree.
MV
Store
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
import
org.h2.util.New
;
import
org.h2.util.New
;
...
@@ -22,7 +22,7 @@ import org.h2.util.New;
...
@@ -22,7 +22,7 @@ import org.h2.util.New;
/**
/**
* Tests the r-tree.
* Tests the r-tree.
*/
*/
public
class
TestRtree
extends
Test
BtreeMap
Store
{
public
class
TestRtree
extends
Test
MV
Store
{
/**
/**
* Run just this test.
* Run just this test.
...
@@ -43,7 +43,7 @@ public class TestRtree extends TestBtreeMapStore {
...
@@ -43,7 +43,7 @@ public class TestRtree extends TestBtreeMapStore {
private
void
testRtreeMany
()
{
private
void
testRtreeMany
()
{
String
fileName
=
getBaseDir
()
+
"/testRtree.h3"
;
String
fileName
=
getBaseDir
()
+
"/testRtree.h3"
;
FileUtils
.
delete
(
fileName
);
FileUtils
.
delete
(
fileName
);
BtreeMap
Store
s
;
MV
Store
s
;
s
=
openStore
(
fileName
);
s
=
openStore
(
fileName
);
// s.setMaxPageSize(50);
// s.setMaxPageSize(50);
RtreeMap
<
SpatialKey
,
String
>
r
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
RtreeMap
<
SpatialKey
,
String
>
r
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
...
@@ -106,7 +106,7 @@ public class TestRtree extends TestBtreeMapStore {
...
@@ -106,7 +106,7 @@ public class TestRtree extends TestBtreeMapStore {
private
void
testRtree
()
{
private
void
testRtree
()
{
String
fileName
=
getBaseDir
()
+
"/testRtree.h3"
;
String
fileName
=
getBaseDir
()
+
"/testRtree.h3"
;
FileUtils
.
delete
(
fileName
);
FileUtils
.
delete
(
fileName
);
BtreeMap
Store
s
;
MV
Store
s
;
s
=
openStore
(
fileName
);
s
=
openStore
(
fileName
);
RtreeMap
<
SpatialKey
,
String
>
r
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
RtreeMap
<
SpatialKey
,
String
>
r
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
add
(
r
,
"Bern"
,
46.57
,
7.27
,
124381
);
add
(
r
,
"Bern"
,
46.57
,
7.27
,
124381
);
...
@@ -198,7 +198,7 @@ public class TestRtree extends TestBtreeMapStore {
...
@@ -198,7 +198,7 @@ public class TestRtree extends TestBtreeMapStore {
private
void
testRandomRtree
()
{
private
void
testRandomRtree
()
{
String
fileName
=
getBaseDir
()
+
"/testRtreeRandom.h3"
;
String
fileName
=
getBaseDir
()
+
"/testRtreeRandom.h3"
;
FileUtils
.
delete
(
fileName
);
FileUtils
.
delete
(
fileName
);
BtreeMap
Store
s
=
openStore
(
fileName
);
MV
Store
s
=
openStore
(
fileName
);
RtreeMap
<
SpatialKey
,
String
>
m
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
RtreeMap
<
SpatialKey
,
String
>
m
=
s
.
openMap
(
"data"
,
"r"
,
"s2"
,
""
);
HashMap
<
SpatialKey
,
String
>
map
=
new
HashMap
<
SpatialKey
,
String
>();
HashMap
<
SpatialKey
,
String
>
map
=
new
HashMap
<
SpatialKey
,
String
>();
Random
rand
=
new
Random
(
1
);
Random
rand
=
new
Random
(
1
);
...
@@ -240,7 +240,7 @@ public class TestRtree extends TestBtreeMapStore {
...
@@ -240,7 +240,7 @@ public class TestRtree extends TestBtreeMapStore {
private
void
testCustomMapType
()
{
private
void
testCustomMapType
()
{
String
fileName
=
getBaseDir
()
+
"/testMapType.h3"
;
String
fileName
=
getBaseDir
()
+
"/testMapType.h3"
;
FileUtils
.
delete
(
fileName
);
FileUtils
.
delete
(
fileName
);
BtreeMap
Store
s
;
MV
Store
s
;
s
=
openStore
(
fileName
);
s
=
openStore
(
fileName
);
SequenceMap
<
Integer
,
String
>
seq
=
s
.
openMap
(
"data"
,
"s"
,
"i"
,
""
);
SequenceMap
<
Integer
,
String
>
seq
=
s
.
openMap
(
"data"
,
"s"
,
"i"
,
""
);
StringBuilder
buff
=
new
StringBuilder
();
StringBuilder
buff
=
new
StringBuilder
();
...
...
h2/src/tools/org/h2/dev/store/btree/ChangeCursor.java
浏览文件 @
5e703674
...
@@ -16,7 +16,7 @@ public class ChangeCursor<K, V> extends Cursor<K, V> {
...
@@ -16,7 +16,7 @@ public class ChangeCursor<K, V> extends Cursor<K, V> {
private
final
long
minVersion
;
private
final
long
minVersion
;
ChangeCursor
(
Btree
Map
<
K
,
V
>
map
,
long
minVersion
)
{
ChangeCursor
(
MV
Map
<
K
,
V
>
map
,
long
minVersion
)
{
super
(
map
);
super
(
map
);
this
.
minVersion
=
minVersion
;
this
.
minVersion
=
minVersion
;
}
}
...
...
h2/src/tools/org/h2/dev/store/btree/Cursor.java
浏览文件 @
5e703674
...
@@ -17,12 +17,12 @@ import java.util.Iterator;
...
@@ -17,12 +17,12 @@ import java.util.Iterator;
*/
*/
public
class
Cursor
<
K
,
V
>
implements
Iterator
<
K
>
{
public
class
Cursor
<
K
,
V
>
implements
Iterator
<
K
>
{
protected
final
Btree
Map
<
K
,
V
>
map
;
protected
final
MV
Map
<
K
,
V
>
map
;
protected
final
ArrayList
<
CursorPos
>
parents
=
new
ArrayList
<
CursorPos
>();
protected
final
ArrayList
<
CursorPos
>
parents
=
new
ArrayList
<
CursorPos
>();
protected
CursorPos
currentPos
;
protected
CursorPos
currentPos
;
protected
K
current
;
protected
K
current
;
Cursor
(
Btree
Map
<
K
,
V
>
map
)
{
Cursor
(
MV
Map
<
K
,
V
>
map
)
{
this
.
map
=
map
;
this
.
map
=
map
;
}
}
...
...
h2/src/tools/org/h2/dev/store/btree/
Btree
Map.java
→
h2/src/tools/org/h2/dev/store/btree/
MV
Map.java
浏览文件 @
5e703674
...
@@ -17,9 +17,9 @@ import java.util.TreeMap;
...
@@ -17,9 +17,9 @@ import java.util.TreeMap;
* @param <K> the key class
* @param <K> the key class
* @param <V> the value class
* @param <V> the value class
*/
*/
public
class
Btree
Map
<
K
,
V
>
{
public
class
MV
Map
<
K
,
V
>
{
protected
final
BtreeMap
Store
store
;
protected
final
MV
Store
store
;
protected
Page
root
;
protected
Page
root
;
private
final
int
id
;
private
final
int
id
;
...
@@ -36,7 +36,7 @@ public class BtreeMap<K, V> {
...
@@ -36,7 +36,7 @@ public class BtreeMap<K, V> {
private
boolean
closed
;
private
boolean
closed
;
private
boolean
readOnly
;
private
boolean
readOnly
;
protected
BtreeMap
(
BtreeMap
Store
store
,
int
id
,
String
name
,
protected
MVMap
(
MV
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
long
createVersion
)
{
DataType
keyType
,
DataType
valueType
,
long
createVersion
)
{
this
.
store
=
store
;
this
.
store
=
store
;
this
.
id
=
id
;
this
.
id
=
id
;
...
@@ -469,19 +469,19 @@ public class BtreeMap<K, V> {
...
@@ -469,19 +469,19 @@ public class BtreeMap<K, V> {
@Override
@Override
public
Iterator
<
K
>
iterator
()
{
public
Iterator
<
K
>
iterator
()
{
Cursor
<
K
,
V
>
c
=
new
Cursor
<
K
,
V
>(
Btree
Map
.
this
);
Cursor
<
K
,
V
>
c
=
new
Cursor
<
K
,
V
>(
MV
Map
.
this
);
c
.
start
(
root
,
null
);
c
.
start
(
root
,
null
);
return
c
;
return
c
;
}
}
@Override
@Override
public
int
size
()
{
public
int
size
()
{
return
Btree
Map
.
this
.
size
();
return
MV
Map
.
this
.
size
();
}
}
@Override
@Override
public
boolean
contains
(
Object
o
)
{
public
boolean
contains
(
Object
o
)
{
return
Btree
Map
.
this
.
containsKey
(
o
);
return
MV
Map
.
this
.
containsKey
(
o
);
}
}
};
};
...
@@ -505,7 +505,7 @@ public class BtreeMap<K, V> {
...
@@ -505,7 +505,7 @@ public class BtreeMap<K, V> {
return
name
;
return
name
;
}
}
BtreeMap
Store
getStore
()
{
MV
Store
getStore
()
{
return
store
;
return
store
;
}
}
...
@@ -597,7 +597,7 @@ public class BtreeMap<K, V> {
...
@@ -597,7 +597,7 @@ public class BtreeMap<K, V> {
store
.
removePage
(
p
.
getPos
());
store
.
removePage
(
p
.
getPos
());
}
}
public
Btree
Map
<
K
,
V
>
openVersion
(
long
version
)
{
public
MV
Map
<
K
,
V
>
openVersion
(
long
version
)
{
if
(
version
<
createVersion
)
{
if
(
version
<
createVersion
)
{
throw
new
IllegalArgumentException
(
"Unknown version"
);
throw
new
IllegalArgumentException
(
"Unknown version"
);
}
}
...
@@ -605,7 +605,7 @@ public class BtreeMap<K, V> {
...
@@ -605,7 +605,7 @@ public class BtreeMap<K, V> {
return
store
.
openMapVersion
(
version
,
name
);
return
store
.
openMapVersion
(
version
,
name
);
}
}
Page
root
=
oldRoots
.
get
(
version
);
Page
root
=
oldRoots
.
get
(
version
);
BtreeMap
<
K
,
V
>
m
=
new
Btree
Map
<
K
,
V
>(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
MVMap
<
K
,
V
>
m
=
new
MV
Map
<
K
,
V
>(
store
,
id
,
name
,
keyType
,
valueType
,
createVersion
);
m
.
readOnly
=
true
;
m
.
readOnly
=
true
;
m
.
root
=
root
;
m
.
root
=
root
;
return
m
;
return
m
;
...
...
h2/src/tools/org/h2/dev/store/btree/
BtreeMap
Store.java
→
h2/src/tools/org/h2/dev/store/btree/
MV
Store.java
浏览文件 @
5e703674
差异被折叠。
点击展开。
h2/src/tools/org/h2/dev/store/btree/MapFactory.java
浏览文件 @
5e703674
...
@@ -23,8 +23,8 @@ public interface MapFactory {
...
@@ -23,8 +23,8 @@ public interface MapFactory {
* @param createVersion when the map was created
* @param createVersion when the map was created
* @return the map
* @return the map
*/
*/
<
K
,
V
>
Btree
Map
<
K
,
V
>
buildMap
(
<
K
,
V
>
MV
Map
<
K
,
V
>
buildMap
(
String
mapType
,
BtreeMap
Store
store
,
int
id
,
String
name
,
String
mapType
,
MV
Store
store
,
int
id
,
String
name
,
DataType
keyType
,
DataType
valueType
,
long
createVersion
);
DataType
keyType
,
DataType
valueType
,
long
createVersion
);
/**
/**
...
...
h2/src/tools/org/h2/dev/store/btree/Page.java
浏览文件 @
5e703674
...
@@ -27,7 +27,7 @@ public class Page {
...
@@ -27,7 +27,7 @@ public class Page {
private
static
final
int
SHARED_KEYS
=
1
,
SHARED_VALUES
=
2
,
SHARED_CHILDREN
=
4
,
SHARED_COUNTS
=
8
;
private
static
final
int
SHARED_KEYS
=
1
,
SHARED_VALUES
=
2
,
SHARED_CHILDREN
=
4
,
SHARED_COUNTS
=
8
;
private
final
Btree
Map
<?,
?>
map
;
private
final
MV
Map
<?,
?>
map
;
private
final
long
version
;
private
final
long
version
;
private
long
pos
;
private
long
pos
;
private
long
totalCount
;
private
long
totalCount
;
...
@@ -49,7 +49,7 @@ public class Page {
...
@@ -49,7 +49,7 @@ public class Page {
private
Page
[]
childrenPages
;
private
Page
[]
childrenPages
;
private
long
[]
counts
;
private
long
[]
counts
;
private
Page
(
Btree
Map
<?,
?>
map
,
long
version
)
{
private
Page
(
MV
Map
<?,
?>
map
,
long
version
)
{
this
.
map
=
map
;
this
.
map
=
map
;
this
.
version
=
version
;
this
.
version
=
version
;
}
}
...
@@ -64,7 +64,7 @@ public class Page {
...
@@ -64,7 +64,7 @@ public class Page {
* @param children the children
* @param children the children
* @return the page
* @return the page
*/
*/
public
static
Page
create
(
Btree
Map
<?,
?>
map
,
long
version
,
public
static
Page
create
(
MV
Map
<?,
?>
map
,
long
version
,
int
keyCount
,
Object
[]
keys
,
int
keyCount
,
Object
[]
keys
,
Object
[]
values
,
long
[]
children
,
Page
[]
childrenPages
,
long
[]
counts
,
Object
[]
values
,
long
[]
children
,
Page
[]
childrenPages
,
long
[]
counts
,
long
totalCount
,
int
sharedFlags
)
{
long
totalCount
,
int
sharedFlags
)
{
...
@@ -89,7 +89,7 @@ public class Page {
...
@@ -89,7 +89,7 @@ public class Page {
* @param buff the source buffer
* @param buff the source buffer
* @return the page
* @return the page
*/
*/
static
Page
read
(
FileChannel
file
,
Btree
Map
<?,
?>
map
,
static
Page
read
(
FileChannel
file
,
MV
Map
<?,
?>
map
,
long
filePos
,
long
pos
)
{
long
filePos
,
long
pos
)
{
int
maxLength
=
DataUtils
.
getPageMaxLength
(
pos
),
length
=
maxLength
;
int
maxLength
=
DataUtils
.
getPageMaxLength
(
pos
),
length
=
maxLength
;
ByteBuffer
buff
;
ByteBuffer
buff
;
...
@@ -300,7 +300,7 @@ public class Page {
...
@@ -300,7 +300,7 @@ public class Page {
}
}
public
long
getTotalCount
()
{
public
long
getTotalCount
()
{
if
(
BtreeMap
Store
.
ASSERT
)
{
if
(
MV
Store
.
ASSERT
)
{
long
check
=
0
;
long
check
=
0
;
if
(
isLeaf
())
{
if
(
isLeaf
())
{
check
=
keyCount
;
check
=
keyCount
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论