提交 798a5049 authored 作者: Thomas Mueller's avatar Thomas Mueller

The cache types WEAK_* and TQ are no longer supported.

上级 d71707d5
...@@ -9,7 +9,6 @@ package org.h2.util; ...@@ -9,7 +9,6 @@ package org.h2.util;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.WeakHashMap;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -52,15 +51,9 @@ public class CacheLRU implements Cache { ...@@ -52,15 +51,9 @@ public class CacheLRU implements Cache {
if (cacheType.startsWith("SOFT_")) { if (cacheType.startsWith("SOFT_")) {
secondLevel = new SoftHashMap<Integer, CacheObject>(); secondLevel = new SoftHashMap<Integer, CacheObject>();
cacheType = cacheType.substring("SOFT_".length()); cacheType = cacheType.substring("SOFT_".length());
} else if (cacheType.startsWith("WEAK_")) {
secondLevel = new WeakHashMap<Integer, CacheObject>();
cacheType = cacheType.substring("WEAK_".length());
} }
Cache cache; Cache cache;
if ("TQ".equals(cacheType)) { if (CacheLRU.TYPE_NAME.equals(cacheType)) {
// for backward compatibility - actually using LRU not TQ
cache = new CacheLRU(writer, cacheSize);
} else if (CacheLRU.TYPE_NAME.equals(cacheType)) {
cache = new CacheLRU(writer, cacheSize); cache = new CacheLRU(writer, cacheSize);
} else { } else {
throw DbException.getInvalidValueException(cacheType, "CACHE_TYPE"); throw DbException.getInvalidValueException(cacheType, "CACHE_TYPE");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论