提交 1284d1b5 authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Fix Javadocs

上级 97b7586c
......@@ -1637,6 +1637,8 @@ public class JdbcConnection extends TraceObject implements Connection,
/**
* Create a new Array object.
*
* @param typeName the type name
* @param elements the values
* @return the array
*/
@Override
......
......@@ -367,6 +367,7 @@ public class TraceObject {
* Get a SQL exception meaning this feature is not supported.
*
* @param message the message
* @return the SQL exception
*/
protected SQLException unsupported(String message) {
try {
......
......@@ -34,7 +34,7 @@ public class MVStoreTool {
/**
* Runs this tool.
* Options are case sensitive. Supported options are:
* <table>
* <table summary="command line options">
* <tr><td>[-dump &lt;fileName&gt;]</td>
* <td>Dump the contends of the file</td></tr>
* <tr><td>[-info &lt;fileName&gt;]</td>
......
......@@ -458,6 +458,12 @@ class FileMemData {
lastModified = System.currentTimeMillis();
}
/**
* Get the page if it exists.
*
* @param page the page id
* @return the byte array, or null
*/
byte[] getPage(int page) {
AtomicReference<byte[]>[] b = buffers;
if (page >= b.length) {
......@@ -466,6 +472,15 @@ class FileMemData {
return b[page].get();
}
/**
* Set the page data.
*
* @param page the page id
* @param oldData the old data
* @param newData the new data
* @param force whether the data should be overwritten even if the old data
* doesn't match
*/
void setPage(int page, byte[] oldData, byte[] newData, boolean force) {
AtomicReference<byte[]>[] b = buffers;
if (page >= b.length) {
......@@ -607,7 +622,6 @@ class FileMemData {
* Compress the data in a byte array.
*
* @param page which page to compress
* @param old the page array
*/
void compress(int page) {
byte[] old = getPage(page);
......
......@@ -33,6 +33,10 @@ public class FilePathNioMem extends FilePath {
private static final TreeMap<String, FileNioMemData> MEMORY_FILES =
new TreeMap<String, FileNioMemData>();
/**
* The percentage of uncompressed (cached) entries.
*/
float compressLaterCachePercent = 1;
@Override
......@@ -432,6 +436,9 @@ class FileNioMemData {
}
};
/**
* The hash code of the name.
*/
final int nameHashCode;
private final CompressLaterCache<CompressItem, CompressItem> compressLaterCache =
......
......@@ -26,6 +26,12 @@ public final class IndexHints {
this.allowedIndexes = allowedIndexes;
}
/**
* Create an index hint object.
*
* @param allowedIndexes the set of allowed indexes
* @return the hint object
*/
public static IndexHints createUseIndexHints(LinkedHashSet<String> allowedIndexes) {
return new IndexHints(allowedIndexes);
}
......@@ -39,6 +45,12 @@ public final class IndexHints {
return "IndexHints{allowedIndexes=" + allowedIndexes + '}';
}
/**
* Allow an index to be used.
*
* @param index the index
* @return whether it was already allowed
*/
public boolean allowIndex(Index index) {
return allowedIndexes.contains(index.getName());
}
......
......@@ -613,7 +613,7 @@ public class StringUtils {
* The data is indented with 4 spaces if it contains a newline character.
*
* @param data the comment text
* @return <!-- data -->
* @return &lt;!-- data --&gt;
*/
public static String xmlComment(String data) {
int idx = 0;
......@@ -634,10 +634,10 @@ public class StringUtils {
/**
* Converts the data to a CDATA element.
* If the data contains ']]>', it is escaped as a text element.
* If the data contains ']]&gt;', it is escaped as a text element.
*
* @param data the text data
* @return <![CDATA[data]]>
* @return &lt;![CDATA[data]]&gt;
*/
public static String xmlCData(String data) {
if (data.contains("]]>")) {
......@@ -649,8 +649,8 @@ public class StringUtils {
}
/**
* Returns <?xml version="1.0"?>
* @return <?xml version="1.0"?>
* Returns &lt;?xml version="1.0"?&gt;
* @return &lt;?xml version="1.0"?&gt;
*/
public static String xmlStartDoc() {
return "<?xml version=\"1.0\"?>\n";
......
......@@ -68,6 +68,11 @@ public class ThreadDeadlockDetector {
threadBean, deadlockedThreadIds);
}
/**
* Dump all deadlocks (if any).
*
* @param msg the message
*/
public static void dumpAllThreadsAndLocks(String msg) {
final ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
final long[] allThreadIds = threadBean.getAllThreadIds();
......
......@@ -22,6 +22,11 @@ public class TestUsingIndex extends TestBase {
private Connection conn;
private Statement stat;
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
TestBase.createCaller().init().test();
}
......
......@@ -12,6 +12,11 @@ import org.h2.tools.Recover;
*/
public class RecoverLobTest extends TestBase {
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
TestBase.createCaller().init().test();
}
......@@ -31,7 +36,7 @@ public class RecoverLobTest extends TestBase {
testRecoverClob();
}
public void testRecoverClob() throws Exception {
private void testRecoverClob() throws Exception {
DeleteDbFiles.execute(getBaseDir(), "recovery", true);
Connection conn = getConnection("recovery");
Statement stat = conn.createStatement();
......
......@@ -612,6 +612,7 @@ public class Build extends BuildBase {
javadoc("-sourcepath", "src/main" +
File.pathSeparator + "src/test" +
File.pathSeparator + "src/tools",
"-Xdoclint:none",
"-noindex",
"-tag", "h2.resource",
"-d", "docs/javadocImpl2",
......
......@@ -728,4 +728,10 @@ experiment throughout staging booth akkuzin observed maxinplace russian
ema sch bodewig forbid compat calc midway prohibit measuring playing kostya
pstmt rosenbaum pretending inverse safer lived blo sane othe multiplicative
introduces bcd nave picking templating clamp temporal berlin intermittently
pstat props bitget travis
\ No newline at end of file
pstat props bitget travis
toto anatolii callables spurious disregard uniqueidentifier promoted oom doesnt
optimisations roughly contractid succeeding tran fixme iters ovain orgid chosen
arbonaut exposing obscure determined turkey buildings indexhints acct
choosing optimise arte preparator katzyn bla jenkins tot artes pgserver npe
suffers closeablem mni significance vise identiy vitalus aka ilike uppercasing reentrant
......@@ -1096,6 +1096,8 @@ public class ArchiveTool {
/**
* Print the progress.
*
* @param offset the offset since the last operation
*/
void printProgress(long offset) {
current += offset;
......
......@@ -18,7 +18,7 @@ import java.io.PrintWriter;
public class ThreadDumpFilter {
/**
* Usage: java ThreadDumpFilter <log.txt >threadDump.txt
* Usage: java ThreadDumpFilter &lt;log.txt &gt;threadDump.txt
*
* @param a the file name
*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论