1 | /* |
2 | * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, |
3 | * and the EPL 1.0 (http://h2database.com/html/license.html). |
4 | * Initial Developer: H2 Group |
5 | */ |
6 | package org.h2.index; |
7 | |
8 | |
9 | /** |
10 | * A page store index. |
11 | */ |
12 | public abstract class PageIndex extends BaseIndex { |
13 | |
14 | /** |
15 | * The root page of this index. |
16 | */ |
17 | protected int rootPageId; |
18 | |
19 | private boolean sortedInsertMode; |
20 | |
21 | /** |
22 | * Get the root page of this index. |
23 | * |
24 | * @return the root page id |
25 | */ |
26 | public int getRootPageId() { |
27 | return rootPageId; |
28 | } |
29 | |
30 | /** |
31 | * Write back the row count if it has changed. |
32 | */ |
33 | public abstract void writeRowCount(); |
34 | |
35 | @Override |
36 | public void setSortedInsertMode(boolean sortedInsertMode) { |
37 | this.sortedInsertMode = sortedInsertMode; |
38 | } |
39 | |
40 | boolean isSortedInsertMode() { |
41 | return sortedInsertMode; |
42 | } |
43 | |
44 | } |