提交 89225438 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting, documentation.

上级 ebbc5658
......@@ -103,7 +103,7 @@ public class Profiler implements Runnable {
new Profiler().run(args);
}
void run(String... args) {
private void run(String... args) {
if (args.length == 0) {
System.out.println("Show profiling data");
System.out.println("Usage: " + getClass().getName() + " <pid>");
......@@ -367,7 +367,7 @@ public class Profiler implements Runnable {
return getTopTraces(count);
}
public String getTopTraces(int count) {
private String getTopTraces(int count) {
StringBuilder buff = new StringBuilder();
buff.append("Profiler: top ").append(count).append(" stack trace(s) of ").append(time).
append(" ms:").append(LINE_SEPARATOR);
......
......@@ -243,6 +243,12 @@ public class ObjectType implements DataType {
return TYPE_SERIALIZED_OBJECT;
}
/**
* Switch the last remembered type to match the type of the given object.
*
* @param obj the object
* @return the auto-detected type used
*/
AutoDetectDataType switchType(Object obj) {
int typeId = getTypeId(obj);
AutoDetectDataType l = last;
......@@ -362,10 +368,23 @@ public class ObjectType implements DataType {
throw new RuntimeException();
}
/**
* Get the type for the given object.
*
* @param o the object
* @return the type
*/
AutoDetectDataType getType(Object o) {
return base.switchType(o);
}
/**
* Read an object from the buffer.
*
* @param buff the buffer
* @param tag the first byte of the object (usually the type)
* @return the read object
*/
abstract Object read(ByteBuffer buff, int tag);
@Override
......
......@@ -785,7 +785,7 @@ public class TestMVStore extends TestBase {
s.close();
s.close();
}
private void testSimple() {
String fileName = getBaseDir() + "/testSimple.h3";
FileUtils.delete(fileName);
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"><p>
Classes related to caching.
</p></body></html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论