提交 5d727252 authored 作者: Thomas Mueller's avatar Thomas Mueller

MVStore: simpler API

上级 5f5eb72d
...@@ -1261,7 +1261,6 @@ public class Database implements DataHandler { ...@@ -1261,7 +1261,6 @@ public class Database implements DataHandler {
reconnectModified(false); reconnectModified(false);
if (mvStore != null) { if (mvStore != null) {
if (!readOnly && compactMode != 0) { if (!readOnly && compactMode != 0) {
mvStore.store();
mvStore.compactFile(dbSettings.maxCompactTime); mvStore.compactFile(dbSettings.maxCompactTime);
} else { } else {
mvStore.close(dbSettings.maxCompactTime); mvStore.close(dbSettings.maxCompactTime);
...@@ -1787,7 +1786,7 @@ public class Database implements DataHandler { ...@@ -1787,7 +1786,7 @@ public class Database implements DataHandler {
} }
if (mvStore != null) { if (mvStore != null) {
int millis = value < 0 ? 0 : value; int millis = value < 0 ? 0 : value;
mvStore.getStore().setWriteDelay(millis); mvStore.getStore().setAutoCommitDelay(millis);
} }
} }
...@@ -1892,7 +1891,7 @@ public class Database implements DataHandler { ...@@ -1892,7 +1891,7 @@ public class Database implements DataHandler {
} }
if (mvStore != null) { if (mvStore != null) {
try { try {
mvStore.store(); mvStore.flush();
} catch (RuntimeException e) { } catch (RuntimeException e) {
backgroundException = DbException.convert(e); backgroundException = DbException.convert(e);
throw e; throw e;
...@@ -2407,7 +2406,7 @@ public class Database implements DataHandler { ...@@ -2407,7 +2406,7 @@ public class Database implements DataHandler {
} }
} }
if (mvStore != null) { if (mvStore != null) {
mvStore.store(); mvStore.flush();
} }
} }
getTempFileDeleter().deleteUnused(); getTempFileDeleter().deleteUnused();
...@@ -2505,7 +2504,7 @@ public class Database implements DataHandler { ...@@ -2505,7 +2504,7 @@ public class Database implements DataHandler {
public Session getLobSession() { public Session getLobSession() {
return lobSession; return lobSession;
} }
public void setLogMode(int log) { public void setLogMode(int log) {
if (log < 0 || log > 2) { if (log < 0 || log > 2) {
throw DbException.getInvalidValueException("LOG", log); throw DbException.getInvalidValueException("LOG", log);
......
...@@ -102,10 +102,10 @@ public class SpatialKey { ...@@ -102,10 +102,10 @@ public class SpatialKey {
} }
return equalsIgnoringId(o); return equalsIgnoringId(o);
} }
/** /**
* Check whether two objects are equals, but do not compare the id fields. * Check whether two objects are equals, but do not compare the id fields.
* *
* @param o the other key * @param o the other key
* @return true if the contents are the same * @return true if the contents are the same
*/ */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论