Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
7cb0c93e
提交
7cb0c93e
authored
11月 13, 2013
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation
上级
2c22a10e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
2051 行增加
和
2018 行删除
+2051
-2018
mvstore.html
h2/src/docsrc/html/mvstore.html
+9
-22
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+687
-669
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+687
-669
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+662
-656
_messages_en.prop
h2/src/docsrc/textbase/_messages_en.prop
+3
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+3
-1
没有找到文件。
h2/src/docsrc/html/mvstore.html
浏览文件 @
7cb0c93e
...
...
@@ -62,7 +62,7 @@ But it can be also directly within an application, without using JDBC or SQL.
</li><li>
Old versions of the data can be read concurrently with all other operations.
</li><li>
Transaction are supported (including concurrent transactions and 2-phase commit).
</li><li>
The tool is very modular.
It supports pluggable data types
/
serialization,
It supports pluggable data types
and
serialization,
pluggable storage (to a file, to off-heap memory),
pluggable map implementations (B-tree, R-tree, concurrent B-tree currently),
BLOB storage,
...
...
@@ -86,10 +86,7 @@ MVMap<Integer, String> map = s.openMap("data");
map.put(1, "Hello World");
System.out.println(map.get(1));
// mark the changes as committed
s.commit();
// close the store (this will store committed changes)
// close the store (this will store changes)
s.close();
</pre>
...
...
@@ -101,6 +98,7 @@ The following code contains all supported configuration options:
</p>
<pre>
MVStore s = new MVStore.Builder().
autoCommitDisabled().
backgroundExceptionListener(listener).
cacheSize(10).
compressData().
...
...
@@ -109,11 +107,10 @@ MVStore s = new MVStore.Builder().
fileStore(new FileStore()).
pageSplitSize(6 * 1024).
readOnly().
writeBufferSize(8).
writeDelay(100).
open();
</pre>
<ul><li>
backgroundExceptionListener: a listener for
<ul><li>
autoCommitDisabled(): to disable auto-commit.
</li><li>
backgroundExceptionListener: a listener for
exceptions that could occur while writing in the background.
</li><li>
cacheSize: the cache size in MB.
</li><li>
compressData: compress the data when storing.
...
...
@@ -122,9 +119,6 @@ MVStore s = new MVStore.Builder().
</li><li>
fileStore: the storage implementation to use.
</li><li>
pageSplitSize: the point where pages are split.
</li><li>
readOnly: open the file in read-only mode.
</li><li>
writeBufferSize: the size of the write buffer in MB.
</li><li>
writeDelay: the maximum delay in milliseconds
until committed changes are stored in the background.
</li></ul>
<h2
id=
"r_tree"
>
R-Tree
</h2>
...
...
@@ -185,15 +179,11 @@ the key of the map must also contain the primary key).
<h3
id=
"versions"
>
Versions
</h3>
<p>
Multiple versions are supported.
A version is a snapshot of all the data of all maps at a given point in time.
Versions are not immediately persisted; instead, only the version counter is incremented.
If there is a change after switching to a new version, a snapshot of the old version is kept in memory,
so that it can still be read.
Old persisted versions are readable until the old data was explicitly overwritten.
Creating a snapshot is fast: only the pages that are changed after a snapshot are copied.
Old versions are readable until the old data was explicitly overwritten.
Creating a snapshot is fast: only those pages that are changed after a snapshot are copied.
This behavior is also called COW (copy on write).
Rollback
is supported (rollback to any old in-memory version or an old persisted version)
.
Rollback
to an old version is supported
.
</p><p>
The following sample code show how to create a store, open a map, add some data,
and access the current and an old version:
...
...
@@ -210,7 +200,7 @@ map.put(2, "World");
long oldVersion = s.getCurrentVersion();
// from now on, the old version is read-only
s.
incrementVersion
();
s.
commit
();
// more changes, in the new version
// changes can be rolled back if required
...
...
@@ -222,9 +212,6 @@ map.remove(2);
MVMap
<
Integer, String
>
oldMap =
map.openVersion(oldVersion);
// mark the changes as committed
s.commit();
// print the old version (can be done
// concurrently with further modifications)
// this will print "Hello" and "World":
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
7cb0c93e
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
7cb0c93e
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
7cb0c93e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
h2/src/docsrc/textbase/_messages_en.prop
浏览文件 @
7cb0c93e
...
...
@@ -33,8 +33,10 @@
90002=Method is only allowed for a query. Use execute or executeUpdate instead of executeQuery
90003=Hexadecimal string with odd number of characters: {0}
90004=Hexadecimal string contains non-hex character: {0}
90006=Sequence {0} has run out of numbers
90007=The object is already closed
90008=Invalid value {0} for parameter {1}
90009=Unable to create or alter sequence {0} because of invalid attributes (start value {1}, min value {2}, max value {3}, increment {4})
90012=Parameter {0} is not set
90013=Database {0} not found
90014=Error parsing {0}
...
...
@@ -104,7 +106,7 @@
90082=Sequence {0} belongs to a table
90083=Column may be referenced by {0}
90084=Cannot drop last column {0}
90085=Index {0} belongs to
a constraint
90085=Index {0} belongs to
constraint {1}
90086=Class {0} not found
90087=Method {0} not found
90088=Unknown mode {0}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
7cb0c93e
...
...
@@ -742,4 +742,6 @@ layers waited descent spliced abstracts planning interest among sliced
lives pauses allocates kicks introduction straightforward getenv
ordinate tweaking fetching rfe yates cookie btrfs cookies
nocycle nomaxvalue nominvalue cycling proceed prospective exhausted contingent
validities hang degenerates freezes
\ No newline at end of file
validities hang degenerates freezes
reverting gredler blanked koc cemo jump
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论