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

Remove unused code.

上级 8bd4d361
......@@ -21,7 +21,6 @@ import org.h2.engine.Database;
import org.h2.engine.Session;
import org.h2.expression.Expression;
import org.h2.message.Message;
import org.h2.message.Trace;
import org.h2.security.SHA256;
import org.h2.store.DataHandler;
import org.h2.store.FileStore;
......
......@@ -10,7 +10,6 @@ import java.sql.SQLException;
import org.h2.command.Prepared;
import org.h2.engine.Database;
import org.h2.engine.Session;
import org.h2.log.LogSystem;
import org.h2.message.Message;
import org.h2.result.ResultInterface;
......
......@@ -141,7 +141,6 @@ public class Database implements DataHandler {
private String lobCompressionAlgorithm;
private boolean optimizeReuseResults = true;
private String cacheType;
private boolean indexSummaryValid = true;
private String accessModeLog, accessModeData;
private boolean referentialIntegrity = true;
private boolean multiVersion;
......@@ -1068,7 +1067,6 @@ public class Database implements DataHandler {
meta.close(systemSession);
systemSession.commit(true);
}
indexSummaryValid = true;
}
} catch (SQLException e) {
traceSystem.getTrace(Trace.DATABASE).error("close", e);
......
......@@ -8,7 +8,6 @@ package org.h2.store;
import java.sql.SQLException;
import org.h2.message.Trace;
import org.h2.util.SmallLRUCache;
import org.h2.util.TempFileDeleter;
import org.h2.value.Value;
......
......@@ -14,7 +14,6 @@ import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.message.Message;
import org.h2.message.Trace;
import org.h2.security.SecureFileStore;
import org.h2.store.fs.FileObject;
import org.h2.store.fs.FileSystem;
......
......@@ -35,7 +35,6 @@ import org.h2.engine.Constants;
import org.h2.engine.DbObject;
import org.h2.engine.MetaRecord;
import org.h2.message.Message;
import org.h2.message.Trace;
import org.h2.result.Row;
import org.h2.result.SimpleRow;
import org.h2.security.SHA256;
......
......@@ -49,15 +49,12 @@ public class CacheLRU implements Cache {
*/
public static Cache getCache(CacheWriter writer, String cacheType, int cacheSize) throws SQLException {
Map<Integer, CacheObject> secondLevel = null;
String prefix = null;
if (cacheType.startsWith("SOFT_")) {
secondLevel = new SoftHashMap<Integer, CacheObject>();
cacheType = cacheType.substring("SOFT_".length());
prefix = "SOFT_";
} else if (cacheType.startsWith("WEAK_")) {
secondLevel = new WeakHashMap<Integer, CacheObject>();
cacheType = cacheType.substring("WEAK_".length());
prefix = "WEAK_";
}
Cache cache;
if ("TQ".equals(cacheType)) {
......@@ -69,7 +66,7 @@ public class CacheLRU implements Cache {
throw Message.getInvalidValueException(cacheType, "CACHE_TYPE");
}
if (secondLevel != null) {
cache = new CacheSecondLevel(cache, prefix, secondLevel);
cache = new CacheSecondLevel(cache, secondLevel);
}
return cache;
}
......
......@@ -16,12 +16,10 @@ import java.util.Map;
class CacheSecondLevel implements Cache {
private final Cache baseCache;
private final String prefix;
private final Map<Integer, CacheObject> map;
CacheSecondLevel(Cache cache, String prefix, Map<Integer, CacheObject> map) {
CacheSecondLevel(Cache cache, Map<Integer, CacheObject> map) {
this.baseCache = cache;
this.prefix = prefix;
this.map = map;
}
......
......@@ -14,8 +14,6 @@ import java.io.RandomAccessFile;
import java.sql.SQLException;
import org.h2.constant.SysProperties;
import org.h2.message.Message;
import org.h2.store.fs.FileObject;
import org.h2.store.fs.FileSystem;
/**
......
......@@ -16,7 +16,6 @@ import java.util.HashSet;
import org.h2.api.Trigger;
import org.h2.test.TestBase;
import org.h2.util.New;
/**
* Tests for trigger and constraints.
......
......@@ -12,7 +12,6 @@ import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import org.h2.constant.SysProperties;
import org.h2.message.Trace;
import org.h2.store.Data;
import org.h2.store.DataHandler;
import org.h2.store.DataPage;
......
......@@ -7,9 +7,7 @@
package org.h2.test.unit;
import java.util.Random;
import org.h2.constant.SysProperties;
import org.h2.message.Trace;
import org.h2.store.DataHandler;
import org.h2.store.FileStore;
import org.h2.test.TestBase;
......
......@@ -10,9 +10,7 @@ import java.sql.SQLException;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Random;
import org.h2.constant.SysProperties;
import org.h2.message.Trace;
import org.h2.store.DataHandler;
import org.h2.store.FileStore;
import org.h2.test.TestBase;
......
......@@ -14,11 +14,9 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.Random;
import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.message.Message;
import org.h2.message.Trace;
import org.h2.store.DataHandler;
import org.h2.store.FileStore;
import org.h2.test.TestBase;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论