提交 4feff806 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting.

上级 0458f3d4
...@@ -23,25 +23,26 @@ import java.util.HashMap; ...@@ -23,25 +23,26 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
import java.util.TimeZone; import java.util.TimeZone;
import java.util.Map.Entry;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.message.TraceSystem; import org.h2.message.TraceSystem;
import org.h2.server.Service; import org.h2.server.Service;
import org.h2.server.ShutdownHandler; import org.h2.server.ShutdownHandler;
import org.h2.store.fs.FileUtils; import org.h2.store.fs.FileUtils;
import org.h2.util.StringUtils;
import org.h2.util.Tool;
import org.h2.util.Utils;
import org.h2.util.IOUtils; import org.h2.util.IOUtils;
import org.h2.util.JdbcUtils; import org.h2.util.JdbcUtils;
import org.h2.util.MathUtils; import org.h2.util.MathUtils;
import org.h2.util.NetUtils; import org.h2.util.NetUtils;
import org.h2.util.New; import org.h2.util.New;
import org.h2.util.SortedProperties; import org.h2.util.SortedProperties;
import org.h2.util.StringUtils;
import org.h2.util.Tool;
import org.h2.util.Utils;
/** /**
* The web server is a simple standalone HTTP server that implements the H2 * The web server is a simple standalone HTTP server that implements the H2
......
...@@ -155,7 +155,7 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -155,7 +155,7 @@ public class LobStorageBackend implements LobStorageInterface {
/** /**
* Remove all LOBs for this table. * Remove all LOBs for this table.
* *
* @param tableId the table id * @param tableId the table id
*/ */
public void removeAllForTable(int tableId) { public void removeAllForTable(int tableId) {
...@@ -184,13 +184,14 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -184,13 +184,14 @@ public class LobStorageBackend implements LobStorageInterface {
/** /**
* Read a block of data from the given LOB. * Read a block of data from the given LOB.
* *
* @param lob the lob id * @param lob the lob id
* @param seq the block sequence number * @param seq the block sequence number
* @return the block (expanded if stored compressed) * @return the block (expanded if stored compressed)
*/ */
byte[] readBlock(long lob, int seq) throws SQLException { byte[] readBlock(long lob, int seq) throws SQLException {
// we have to take the lock on the session before the lock on the database to prevent ABBA deadlocks // we have to take the lock on the session
// before the lock on the database to prevent ABBA deadlocks
synchronized (conn.getSession()) { synchronized (conn.getSession()) {
synchronized (database) { synchronized (database) {
String sql = "SELECT COMPRESSED, DATA FROM " + LOB_MAP + " M " + String sql = "SELECT COMPRESSED, DATA FROM " + LOB_MAP + " M " +
...@@ -218,7 +219,7 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -218,7 +219,7 @@ public class LobStorageBackend implements LobStorageInterface {
* Retrieve the sequence id and position that is smaller than the requested * Retrieve the sequence id and position that is smaller than the requested
* position. Those values can be used to quickly skip to a given position * position. Those values can be used to quickly skip to a given position
* without having to read all data. * without having to read all data.
* *
* @param lob the lob * @param lob the lob
* @param pos the required position * @param pos the required position
* @return null if the data is not available, or an array of two elements: * @return null if the data is not available, or an array of two elements:
...@@ -228,7 +229,7 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -228,7 +229,7 @@ public class LobStorageBackend implements LobStorageInterface {
synchronized (conn.getSession()) { synchronized (conn.getSession()) {
synchronized (database) { synchronized (database) {
String sql = "SELECT MAX(SEQ), MAX(POS) FROM " + LOB_MAP + String sql = "SELECT MAX(SEQ), MAX(POS) FROM " + LOB_MAP +
" WHERE LOB = ? AND POS < ?"; " WHERE LOB = ? AND POS < ?";
PreparedStatement prep = prepare(sql); PreparedStatement prep = prepare(sql);
prep.setLong(1, lob); prep.setLong(1, lob);
prep.setLong(2, pos); prep.setLong(2, pos);
...@@ -481,7 +482,7 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -481,7 +482,7 @@ public class LobStorageBackend implements LobStorageInterface {
/** /**
* Store a block in the LOB storage. * Store a block in the LOB storage.
* *
* @param lobId the lob id * @param lobId the lob id
* @param seq the sequence number * @param seq the sequence number
* @param pos the position within the lob * @param pos the position within the lob
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论