提交 2d330b23 authored 作者: noelgrandin's avatar noelgrandin

rename PageStore#removeRecord to removeFromCache, makes the other code much easier to understand

上级 33cde2d9
......@@ -206,7 +206,7 @@ public abstract class PageBtree extends Page {
void setPageId(int id) {
changeCount = index.getPageStore().getChangeCount();
written = false;
index.getPageStore().removeRecord(getPos());
index.getPageStore().removeFromCache(getPos());
setPos(id);
index.getPageStore().logUndo(this, null);
remapChildren();
......
......@@ -271,7 +271,7 @@ public class PageBtreeIndex extends PageIndex {
PageBtree root = getPage(rootPageId);
root.freeRecursive();
root = PageBtreeLeaf.create(this, rootPageId, PageBtree.ROOT);
store.removeRecord(rootPageId);
store.removeFromCache(rootPageId);
store.update(root);
rowCount = 0;
} finally {
......
......@@ -162,7 +162,7 @@ abstract class PageData extends Page {
*/
void setPageId(int id) {
int old = getPos();
index.getPageStore().removeRecord(getPos());
index.getPageStore().removeFromCache(getPos());
setPos(id);
index.getPageStore().logUndo(this, null);
remapChildren(old);
......
......@@ -391,7 +391,7 @@ public class PageDataIndex extends PageIndex {
PageData root = getPage(rootPageId, 0);
root.freeRecursive();
root = PageDataLeaf.create(this, rootPageId, PageData.ROOT);
store.removeRecord(rootPageId);
store.removeFromCache(rootPageId);
store.update(root);
rowCount = 0;
lastKey = 0;
......
......@@ -1339,7 +1339,7 @@ public class PageStore implements CacheWriter {
*
* @param pageId the page id
*/
public synchronized void removeRecord(int pageId) {
public synchronized void removeFromCache(int pageId) {
cache.remove(pageId);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论