Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
1f7ed15f
提交
1f7ed15f
authored
7月 23, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting.
上级
9abf5e1d
全部展开
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
914 行增加
和
861 行删除
+914
-861
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+287
-269
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+287
-269
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+275
-269
Database.java
h2/src/main/org/h2/engine/Database.java
+1
-1
SysProperties.java
h2/src/main/org/h2/engine/SysProperties.java
+8
-5
FileStore.java
h2/src/main/org/h2/mvstore/FileStore.java
+1
-1
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+6
-5
MVStoreTool.java
h2/src/main/org/h2/mvstore/MVStoreTool.java
+6
-5
MVSecondaryIndex.java
h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java
+1
-1
FilePath.java
h2/src/main/org/h2/store/fs/FilePath.java
+2
-2
FilePathDisk.java
h2/src/main/org/h2/store/fs/FilePathDisk.java
+2
-1
FilePathMem.java
h2/src/main/org/h2/store/fs/FilePathMem.java
+1
-1
FilePathNioMem.java
h2/src/main/org/h2/store/fs/FilePathNioMem.java
+1
-1
FileUtils.java
h2/src/main/org/h2/store/fs/FileUtils.java
+3
-3
Utils.java
h2/src/main/org/h2/util/Utils.java
+9
-6
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+3
-3
TestMVStoreTool.java
h2/src/test/org/h2/test/store/TestMVStoreTool.java
+4
-3
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+16
-16
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-0
没有找到文件。
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
1f7ed15f
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
1f7ed15f
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
1f7ed15f
差异被折叠。
点击展开。
h2/src/main/org/h2/engine/Database.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/engine/SysProperties.java
浏览文件 @
1f7ed15f
...
...
@@ -250,7 +250,8 @@ public class SysProperties {
Utils
.
getProperty
(
"h2.maxReconnect"
,
3
);
/**
* System property <code>h2.maxMemoryRows</code> (default: 40000 per GB of available RAM).<br />
* System property <code>h2.maxMemoryRows</code>
* (default: 40000 per GB of available RAM).<br />
* The default maximum number of rows to be kept in memory in a result set.
*/
public
static
final
int
MAX_MEMORY_ROWS
=
...
...
@@ -536,8 +537,10 @@ public class SysProperties {
}
/**
* This method attempts to auto-scale some of our properties to take advantage of more powerful machines out of the box.
* We assume that our default properties are set correctly for approx. 1G of memory, and scale them up if we have more.
* This method attempts to auto-scale some of our properties to take
* advantage of more powerful machines out of the box. We assume that our
* default properties are set correctly for approx. 1G of memory, and scale
* them up if we have more.
*/
private
static
int
getAutoScaledForMemoryProperty
(
String
key
,
int
defaultValue
)
{
String
s
=
Utils
.
getProperty
(
key
,
null
);
...
...
h2/src/main/org/h2/mvstore/FileStore.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
1f7ed15f
...
...
@@ -1371,7 +1371,8 @@ public class MVStore {
* Chunks are overwritten irrespective of the current retention time. Before
* overwriting chunks and before resizing the file, syncFile() is called.
*
* @param targetFillRate do nothing if the file store fill rate is higher than this
* @param targetFillRate do nothing if the file store fill rate is higher
* than this
* @param moveSize the number of bytes to move
* @return if anything was written
*/
...
...
h2/src/main/org/h2/mvstore/MVStoreTool.java
浏览文件 @
1f7ed15f
...
...
@@ -363,6 +363,7 @@ public class MVStoreTool {
*
* @param sourceFileName the name of the source store
* @param targetFileName the name of the target store
* @param compress whether to compress the data
*/
public
static
void
compact
(
String
sourceFileName
,
String
targetFileName
,
boolean
compress
)
{
MVStore
source
=
new
MVStore
.
Builder
().
...
...
h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/store/fs/FilePath.java
浏览文件 @
1f7ed15f
...
...
@@ -124,8 +124,8 @@ public abstract class FilePath {
* Rename a file if this is allowed.
*
* @param newName the new fully qualified file name
* @param atomicReplace whether the move should be atomic, and the target
file
* should be replaced if it exists and replacing is possible
* @param atomicReplace whether the move should be atomic, and the target
*
file
should be replaced if it exists and replacing is possible
*/
public
abstract
void
moveTo
(
FilePath
newName
,
boolean
atomicReplace
);
...
...
h2/src/main/org/h2/store/fs/FilePathDisk.java
浏览文件 @
1f7ed15f
...
...
@@ -90,7 +90,8 @@ public class FilePathDisk extends FilePath {
name
+
" (not found)"
,
newName
.
name
);
}
// Java 7: use java.nio.file.Files.move(Path source, Path target, CopyOption... options)
// Java 7: use java.nio.file.Files.move(Path source, Path target,
// CopyOption... options)
// with CopyOptions "REPLACE_EXISTING" and "ATOMIC_MOVE".
if
(
atomicReplace
)
{
boolean
ok
=
oldFile
.
renameTo
(
newFile
);
...
...
h2/src/main/org/h2/store/fs/FilePathMem.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/store/fs/FilePathNioMem.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/store/fs/FileUtils.java
浏览文件 @
1f7ed15f
h2/src/main/org/h2/util/Utils.java
浏览文件 @
1f7ed15f
...
...
@@ -739,7 +739,8 @@ public class Utils {
/**
* Scale the value with the available memory. If 1 GB of RAM is available,
* the value is returned, if 2 GB are available, then twice the value, and so on.
* the value is returned, if 2 GB are available, then twice the value, and
* so on.
*
* @param value the value to scale
* @return the scaled value
...
...
@@ -753,8 +754,10 @@ public class Utils {
try
{
OperatingSystemMXBean
mxBean
=
ManagementFactory
.
getOperatingSystemMXBean
();
// this method is only available on the class com.sun.management.OperatingSystemMXBean, which mxBean
// is an instance of under the Oracle JDK, but it is not present on Android and other JDK's
// this method is only available on the class
// com.sun.management.OperatingSystemMXBean, which mxBean
// is an instance of under the Oracle JDK, but it is not present on
// Android and other JDK's
Method
method
=
Class
.
forName
(
"com.sun.management.OperatingSystemMXBean"
).
getMethod
(
"getTotalPhysicalMemorySize"
);
...
...
h2/src/test/org/h2/test/store/TestMVStore.java
浏览文件 @
1f7ed15f
h2/src/test/org/h2/test/store/TestMVStoreTool.java
浏览文件 @
1f7ed15f
...
...
@@ -92,7 +92,8 @@ public class TestMVStoreTool extends TestBase {
long
size1
=
FileUtils
.
size
(
fileName
);
long
size2
=
FileUtils
.
size
(
fileName
+
".new"
);
long
size3
=
FileUtils
.
size
(
fileName
+
".new.compress"
);
assertTrue
(
"size1: "
+
size1
+
" size2: "
+
size2
+
" size3: "
+
size3
,
size2
<
size1
&&
size3
<
size2
);
assertTrue
(
"size1: "
+
size1
+
" size2: "
+
size2
+
" size3: "
+
size3
,
size2
<
size1
&&
size3
<
size2
);
MVStoreTool
.
compact
(
fileName
,
false
);
assertEquals
(
size2
,
FileUtils
.
size
(
fileName
));
MVStoreTool
.
compact
(
fileName
,
true
);
...
...
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
1f7ed15f
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
1f7ed15f
...
...
@@ -761,3 +761,4 @@ reinstated uninteresting dead defendant doctrines beat factual fair suspended
exploit noise ongoing disclaimers shrinks remedy party desirable timely construe
deque synchronizers affero kevent nikolaj hohmuth grajcar jens fogh hostnames
operate resized jni yjp ownable starvation reaper biased introduce epoll hangs
compaction aggressive powerful
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论