Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
cf9a1427
提交
cf9a1427
authored
6月 22, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New experimental page store.
上级
0c909fff
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
78 行增加
和
18 行删除
+78
-18
PageBtree.java
h2/src/main/org/h2/index/PageBtree.java
+9
-0
PageData.java
h2/src/main/org/h2/index/PageData.java
+9
-0
PageDataLeafOverflow.java
h2/src/main/org/h2/index/PageDataLeafOverflow.java
+9
-0
PageDataNode.java
h2/src/main/org/h2/index/PageDataNode.java
+0
-1
PageFreeList.java
h2/src/main/org/h2/store/PageFreeList.java
+12
-2
PageLog.java
h2/src/main/org/h2/store/PageLog.java
+15
-15
PageStore.java
h2/src/main/org/h2/store/PageStore.java
+6
-0
PageStreamData.java
h2/src/main/org/h2/store/PageStreamData.java
+9
-0
PageStreamTrunk.java
h2/src/main/org/h2/store/PageStreamTrunk.java
+9
-0
没有找到文件。
h2/src/main/org/h2/index/PageBtree.java
浏览文件 @
cf9a1427
...
...
@@ -221,4 +221,13 @@ abstract class PageBtree extends Record {
}
}
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
index
.
getPageStore
().
getPageSize
()
>>
2
;
}
}
h2/src/main/org/h2/index/PageData.java
浏览文件 @
cf9a1427
...
...
@@ -188,4 +188,13 @@ abstract class PageData extends Record {
*/
abstract
Row
getRow
(
int
key
)
throws
SQLException
;
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
index
.
getPageStore
().
getPageSize
()
>>
2
;
}
}
h2/src/main/org/h2/index/PageDataLeafOverflow.java
浏览文件 @
cf9a1427
...
...
@@ -132,4 +132,13 @@ public class PageDataLeafOverflow extends Record {
return
"page["
+
getPos
()
+
"] data leaf overflow prev:"
+
previous
+
" next:"
+
next
;
}
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
leaf
.
getMemorySize
();
}
}
h2/src/main/org/h2/index/PageDataNode.java
浏览文件 @
cf9a1427
...
...
@@ -8,7 +8,6 @@ package org.h2.index;
import
java.sql.SQLException
;
import
org.h2.engine.Session
;
import
org.h2.message.Message
;
import
org.h2.result.Row
;
import
org.h2.store.DataPage
;
...
...
h2/src/main/org/h2/store/PageFreeList.java
浏览文件 @
cf9a1427
...
...
@@ -34,7 +34,7 @@ public class PageFreeList extends Record {
setPos
(
pageId
);
this
.
store
=
store
;
pageCount
=
(
store
.
getPageSize
()
-
DATA_START
)
*
8
;
used
.
set
(
pageId
);
used
.
set
(
0
);
}
/**
...
...
@@ -46,8 +46,9 @@ public class PageFreeList extends Record {
if
(
full
)
{
return
-
1
;
}
// TODO cache last result
int
free
=
used
.
nextClearBit
(
0
);
if
(
free
>
pageCount
)
{
if
(
free
>
=
pageCount
)
{
full
=
true
;
return
-
1
;
}
...
...
@@ -132,4 +133,13 @@ public class PageFreeList extends Record {
return
(
pageSize
-
DATA_START
)
*
8
;
}
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
store
.
getPageSize
()
>>
2
;
}
}
h2/src/main/org/h2/store/PageLog.java
浏览文件 @
cf9a1427
...
...
@@ -35,21 +35,6 @@ import org.h2.value.Value;
*/
public
class
PageLog
{
/**
* The recovery stage to undo changes (re-apply the backup).
*/
static
final
int
RECOVERY_STAGE_UNDO
=
0
;
/**
* The recovery stage to allocate pages used by the transaction log.
*/
static
final
int
RECOVERY_STAGE_ALLOCATE
=
1
;
/**
* The recovery stage to redo operations.
*/
static
final
int
RECOVERY_STAGE_REDO
=
2
;
/**
* No operation.
*/
...
...
@@ -85,6 +70,21 @@ public class PageLog {
*/
public
static
final
int
CHECKPOINT
=
5
;
/**
* The recovery stage to undo changes (re-apply the backup).
*/
static
final
int
RECOVERY_STAGE_UNDO
=
0
;
/**
* The recovery stage to allocate pages used by the transaction log.
*/
static
final
int
RECOVERY_STAGE_ALLOCATE
=
1
;
/**
* The recovery stage to redo operations.
*/
static
final
int
RECOVERY_STAGE_REDO
=
2
;
private
final
PageStore
store
;
private
int
pos
;
private
Trace
trace
;
...
...
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
cf9a1427
...
...
@@ -66,6 +66,8 @@ import org.h2.value.ValueString;
*/
public
class
PageStore
implements
CacheWriter
{
// TODO auto checkpoint
// TODO check memory usage
// TODO TestPowerOff
// TODO PageStore.openMetaIndex (desc and nulls first / last)
// TODO PageBtreeIndex.canGetFirstOrLast
...
...
@@ -106,6 +108,10 @@ public class PageStore implements CacheWriter {
// TODO SessionState.logId is no longer needed
// TODO PageData and PageBtree addRowTry: try to simplify
// TODO when removing DiskFile:
// remove CacheObject.blockCount
// remove Record.getMemorySize
/**
* The smallest possible page size.
*/
...
...
h2/src/main/org/h2/store/PageStreamData.java
浏览文件 @
cf9a1427
...
...
@@ -122,4 +122,13 @@ public class PageStreamData extends Record {
return
remaining
;
}
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
store
.
getPageSize
()
>>
2
;
}
}
\ No newline at end of file
h2/src/main/org/h2/store/PageStreamTrunk.java
浏览文件 @
cf9a1427
...
...
@@ -138,4 +138,13 @@ public class PageStreamTrunk extends Record {
store
.
writePage
(
getPos
(),
empty
);
}
/**
* Get the estimated memory size.
*
* @return number of double words (4 bytes)
*/
public
int
getMemorySize
()
{
return
store
.
getPageSize
()
>>
2
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论