Skip to content

Commit

Permalink
Merge pull request h2database#3201 from andreitokar/javadoc
Browse files Browse the repository at this point in the history
Make Javadoc happy
  • Loading branch information
andreitokar authored Nov 5, 2021
2 parents 7966835 + e9035e3 commit 9ee083f
Show file tree
Hide file tree
Showing 23 changed files with 418 additions and 396 deletions.
4 changes: 2 additions & 2 deletions h2/src/main/org/h2/command/ddl/CreateLinkedTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setIfNotExists(boolean ifNotExists) {
/**
* Specify the number of rows fetched by the linked table command
*
* @param fetchSize
* @param fetchSize to set
*/
public void setFetchSize(int fetchSize) {
this.fetchSize = fetchSize;
Expand All @@ -75,7 +75,7 @@ public void setFetchSize(int fetchSize) {
/**
* Specify if the autocommit mode is activated or not
*
* @param mode
* @param mode to set
*/
public void setAutoCommit(boolean mode) {
this.autocommit= mode;
Expand Down
13 changes: 11 additions & 2 deletions h2/src/main/org/h2/command/dml/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,24 @@ public ResultInterface query(long maxrows) {
result.done();
return result;
}


/**
* Strip out the special annotations we use to help build the railroad/BNF diagrams
* @param s to process
* @return sanitized text
*/
public static String stripAnnotationsFromSyntax(String s) {
// SYNTAX column - Strip out the special annotations we use to
// help build the railroad/BNF diagrams.
return s.replaceAll("@c@ ", "").replaceAll("@h2@ ", "")
.replaceAll("@c@", "").replaceAll("@h2@", "").trim();
}

/** process the help text column we load from help.csv */
/**
* Sanitize value read from csv file (i.e. help.csv)
* @param s text to process
* @return text without wrapping quotes and trimmed
*/
public static String processHelpText(String s) {
int len = s.length();
int end = 0;
Expand Down
6 changes: 3 additions & 3 deletions h2/src/main/org/h2/mode/DefaultNullOrdering.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ private DefaultNullOrdering(int defaultAscNulls, int defaultDescNulls) {
}

/**
* Returns a sort type bit mask with {@link #NULLS_FIRST} or
* {@link #NULLS_LAST} explicitly set
* Returns a sort type bit mask with {@link org.h2.result.SortOrder#NULLS_FIRST} or
* {@link org.h2.result.SortOrder#NULLS_LAST} explicitly set
*
* @param sortType
* sort type bit mask
* @return bit mask with {@link #NULLS_FIRST} or {@link #NULLS_LAST}
* @return bit mask with {@link org.h2.result.SortOrder#NULLS_FIRST} or {@link org.h2.result.SortOrder#NULLS_LAST}
* explicitly set
*/
public int addExplicitNullOrdering(int sortType) {
Expand Down
2 changes: 1 addition & 1 deletion h2/src/main/org/h2/mvstore/MVMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ final void setRootPos(long rootPos, long version) {
if (root.map != this) {
// this can only happen on concurrent opening of existing map,
// when second thread picks up some cached page already owned by
// the first map's instantiation (both instantiations share same id)
// the first map's instantiation (both maps share the same id)
assert id == root.map.id;
// since it is unknown which one will win the race,
// let each map instance to have it's own copy
Expand Down
19 changes: 16 additions & 3 deletions h2/src/main/org/h2/mvstore/db/LobStorageMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,20 @@ public final class LobStorageMap implements LobStorageInterface
private final StreamStore streamStore;


/**
* Open map used to store LOB metadata
* @param txStore containing map
* @return MVMap instance
*/
public static MVMap<Long, LobStorageMap.BlobMeta> openLobMap(TransactionStore txStore) {
return txStore.openMap("lobMap", LongDataType.INSTANCE, LobStorageMap.BlobMeta.Type.INSTANCE);
}

/**
* Open map used to store LOB data
* @param txStore containing map
* @return MVMap instance
*/
public static MVMap<Long, byte[]> openLobDataMap(TransactionStore txStore) {
return txStore.openMap("lobData", LongDataType.INSTANCE, ByteArrayDataType.INSTANCE);
}
Expand Down Expand Up @@ -498,10 +508,13 @@ public BlobReference[] createStorage(int size) {

public static final class BlobMeta
{
/**
* Stream identifier. It is used as a key in LOB data map.
*/
public final byte[] streamStoreId;
public final int tableId;
public final long byteCount;
public final long hash;
final int tableId;
final long byteCount;
final long hash;

public BlobMeta(byte[] streamStoreId, int tableId, long byteCount, long hash) {
this.streamStoreId = streamStoreId;
Expand Down
Loading

0 comments on commit 9ee083f

Please sign in to comment.