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

Fix Javadocs

上级 97b7586c
...@@ -1637,6 +1637,8 @@ public class JdbcConnection extends TraceObject implements Connection, ...@@ -1637,6 +1637,8 @@ public class JdbcConnection extends TraceObject implements Connection,
/** /**
* Create a new Array object. * Create a new Array object.
* *
* @param typeName the type name
* @param elements the values
* @return the array * @return the array
*/ */
@Override @Override
......
...@@ -367,6 +367,7 @@ public class TraceObject { ...@@ -367,6 +367,7 @@ public class TraceObject {
* Get a SQL exception meaning this feature is not supported. * Get a SQL exception meaning this feature is not supported.
* *
* @param message the message * @param message the message
* @return the SQL exception
*/ */
protected SQLException unsupported(String message) { protected SQLException unsupported(String message) {
try { try {
......
...@@ -34,7 +34,7 @@ public class MVStoreTool { ...@@ -34,7 +34,7 @@ public class MVStoreTool {
/** /**
* Runs this tool. * Runs this tool.
* Options are case sensitive. Supported options are: * Options are case sensitive. Supported options are:
* <table> * <table summary="command line options">
* <tr><td>[-dump &lt;fileName&gt;]</td> * <tr><td>[-dump &lt;fileName&gt;]</td>
* <td>Dump the contends of the file</td></tr> * <td>Dump the contends of the file</td></tr>
* <tr><td>[-info &lt;fileName&gt;]</td> * <tr><td>[-info &lt;fileName&gt;]</td>
......
...@@ -458,6 +458,12 @@ class FileMemData { ...@@ -458,6 +458,12 @@ class FileMemData {
lastModified = System.currentTimeMillis(); lastModified = System.currentTimeMillis();
} }
/**
* Get the page if it exists.
*
* @param page the page id
* @return the byte array, or null
*/
byte[] getPage(int page) { byte[] getPage(int page) {
AtomicReference<byte[]>[] b = buffers; AtomicReference<byte[]>[] b = buffers;
if (page >= b.length) { if (page >= b.length) {
...@@ -466,6 +472,15 @@ class FileMemData { ...@@ -466,6 +472,15 @@ class FileMemData {
return b[page].get(); 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) { void setPage(int page, byte[] oldData, byte[] newData, boolean force) {
AtomicReference<byte[]>[] b = buffers; AtomicReference<byte[]>[] b = buffers;
if (page >= b.length) { if (page >= b.length) {
...@@ -607,7 +622,6 @@ class FileMemData { ...@@ -607,7 +622,6 @@ class FileMemData {
* Compress the data in a byte array. * Compress the data in a byte array.
* *
* @param page which page to compress * @param page which page to compress
* @param old the page array
*/ */
void compress(int page) { void compress(int page) {
byte[] old = getPage(page); byte[] old = getPage(page);
......
...@@ -33,6 +33,10 @@ public class FilePathNioMem extends FilePath { ...@@ -33,6 +33,10 @@ public class FilePathNioMem extends FilePath {
private static final TreeMap<String, FileNioMemData> MEMORY_FILES = private static final TreeMap<String, FileNioMemData> MEMORY_FILES =
new TreeMap<String, FileNioMemData>(); new TreeMap<String, FileNioMemData>();
/**
* The percentage of uncompressed (cached) entries.
*/
float compressLaterCachePercent = 1; float compressLaterCachePercent = 1;
@Override @Override
...@@ -432,6 +436,9 @@ class FileNioMemData { ...@@ -432,6 +436,9 @@ class FileNioMemData {
} }
}; };
/**
* The hash code of the name.
*/
final int nameHashCode; final int nameHashCode;
private final CompressLaterCache<CompressItem, CompressItem> compressLaterCache = private final CompressLaterCache<CompressItem, CompressItem> compressLaterCache =
......
...@@ -26,6 +26,12 @@ public final class IndexHints { ...@@ -26,6 +26,12 @@ public final class IndexHints {
this.allowedIndexes = allowedIndexes; 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) { public static IndexHints createUseIndexHints(LinkedHashSet<String> allowedIndexes) {
return new IndexHints(allowedIndexes); return new IndexHints(allowedIndexes);
} }
...@@ -39,6 +45,12 @@ public final class IndexHints { ...@@ -39,6 +45,12 @@ public final class IndexHints {
return "IndexHints{allowedIndexes=" + allowedIndexes + '}'; 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) { public boolean allowIndex(Index index) {
return allowedIndexes.contains(index.getName()); return allowedIndexes.contains(index.getName());
} }
......
...@@ -613,7 +613,7 @@ public class StringUtils { ...@@ -613,7 +613,7 @@ public class StringUtils {
* The data is indented with 4 spaces if it contains a newline character. * The data is indented with 4 spaces if it contains a newline character.
* *
* @param data the comment text * @param data the comment text
* @return <!-- data --> * @return &lt;!-- data --&gt;
*/ */
public static String xmlComment(String data) { public static String xmlComment(String data) {
int idx = 0; int idx = 0;
...@@ -634,10 +634,10 @@ public class StringUtils { ...@@ -634,10 +634,10 @@ public class StringUtils {
/** /**
* Converts the data to a CDATA element. * 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 * @param data the text data
* @return <![CDATA[data]]> * @return &lt;![CDATA[data]]&gt;
*/ */
public static String xmlCData(String data) { public static String xmlCData(String data) {
if (data.contains("]]>")) { if (data.contains("]]>")) {
...@@ -649,8 +649,8 @@ public class StringUtils { ...@@ -649,8 +649,8 @@ public class StringUtils {
} }
/** /**
* Returns <?xml version="1.0"?> * Returns &lt;?xml version="1.0"?&gt;
* @return <?xml version="1.0"?> * @return &lt;?xml version="1.0"?&gt;
*/ */
public static String xmlStartDoc() { public static String xmlStartDoc() {
return "<?xml version=\"1.0\"?>\n"; return "<?xml version=\"1.0\"?>\n";
......
...@@ -68,6 +68,11 @@ public class ThreadDeadlockDetector { ...@@ -68,6 +68,11 @@ public class ThreadDeadlockDetector {
threadBean, deadlockedThreadIds); threadBean, deadlockedThreadIds);
} }
/**
* Dump all deadlocks (if any).
*
* @param msg the message
*/
public static void dumpAllThreadsAndLocks(String msg) { public static void dumpAllThreadsAndLocks(String msg) {
final ThreadMXBean threadBean = ManagementFactory.getThreadMXBean(); final ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
final long[] allThreadIds = threadBean.getAllThreadIds(); final long[] allThreadIds = threadBean.getAllThreadIds();
......
...@@ -22,6 +22,11 @@ public class TestUsingIndex extends TestBase { ...@@ -22,6 +22,11 @@ public class TestUsingIndex extends TestBase {
private Connection conn; private Connection conn;
private Statement stat; private Statement stat;
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception { public static void main(String... a) throws Exception {
TestBase.createCaller().init().test(); TestBase.createCaller().init().test();
} }
......
...@@ -12,6 +12,11 @@ import org.h2.tools.Recover; ...@@ -12,6 +12,11 @@ import org.h2.tools.Recover;
*/ */
public class RecoverLobTest extends TestBase { public class RecoverLobTest extends TestBase {
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception { public static void main(String... a) throws Exception {
TestBase.createCaller().init().test(); TestBase.createCaller().init().test();
} }
...@@ -31,7 +36,7 @@ public class RecoverLobTest extends TestBase { ...@@ -31,7 +36,7 @@ public class RecoverLobTest extends TestBase {
testRecoverClob(); testRecoverClob();
} }
public void testRecoverClob() throws Exception { private void testRecoverClob() throws Exception {
DeleteDbFiles.execute(getBaseDir(), "recovery", true); DeleteDbFiles.execute(getBaseDir(), "recovery", true);
Connection conn = getConnection("recovery"); Connection conn = getConnection("recovery");
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
......
...@@ -612,6 +612,7 @@ public class Build extends BuildBase { ...@@ -612,6 +612,7 @@ public class Build extends BuildBase {
javadoc("-sourcepath", "src/main" + javadoc("-sourcepath", "src/main" +
File.pathSeparator + "src/test" + File.pathSeparator + "src/test" +
File.pathSeparator + "src/tools", File.pathSeparator + "src/tools",
"-Xdoclint:none",
"-noindex", "-noindex",
"-tag", "h2.resource", "-tag", "h2.resource",
"-d", "docs/javadocImpl2", "-d", "docs/javadocImpl2",
......
...@@ -729,3 +729,9 @@ ema sch bodewig forbid compat calc midway prohibit measuring playing kostya ...@@ -729,3 +729,9 @@ ema sch bodewig forbid compat calc midway prohibit measuring playing kostya
pstmt rosenbaum pretending inverse safer lived blo sane othe multiplicative pstmt rosenbaum pretending inverse safer lived blo sane othe multiplicative
introduces bcd nave picking templating clamp temporal berlin intermittently introduces bcd nave picking templating clamp temporal berlin intermittently
pstat props bitget travis 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 { ...@@ -1096,6 +1096,8 @@ public class ArchiveTool {
/** /**
* Print the progress. * Print the progress.
*
* @param offset the offset since the last operation
*/ */
void printProgress(long offset) { void printProgress(long offset) {
current += offset; current += offset;
......
...@@ -18,7 +18,7 @@ import java.io.PrintWriter; ...@@ -18,7 +18,7 @@ import java.io.PrintWriter;
public class ThreadDumpFilter { public class ThreadDumpFilter {
/** /**
* Usage: java ThreadDumpFilter <log.txt >threadDump.txt * Usage: java ThreadDumpFilter &lt;log.txt &gt;threadDump.txt
* *
* @param a the file name * @param a the file name
*/ */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论