View Javadoc
1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License.
18   *
19   */
20  package org.apache.directory.mavibot.btree;
21  
22  
23  /**
24   * An enum to describe the B-tree type. We have three possible type :
25   * <ul>
26   * <li>IN_MEMORY : the B-tree will remain in memory, and won't be persisted on disk</li>
27   * <li>BACKED_ON_DISK : the B-tree is in memory, but will be persisted on disk</li>
28   * <li>PERSISTED : the B-tree is managed by a RecordManager, and some pages may
29   * be swapped out from memory on demand</li>
30   * <li>PERSISTED_SUB : The B-tree is a Persisted B-tree, but a Sub B-tree one</li>
31   * <li>PERSISTED_MANAGEMENT : This is a Persisted B-tree used to manage the other B-trees</li>
32   * </ul>
33   *
34   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
35   */
36  public enum BTreeTypeEnum
37  {
38      /** Pure in-memory B-tree, not persisted on disk */
39      IN_MEMORY,
40  
41      /** Persisted B-tree */
42      PERSISTED,
43  
44      /** Persisted sub B-tree */
45      PERSISTED_SUB,
46  
47      /** Persisted Management B-tree */
48      BTREE_OF_BTREES,
49  
50      /** Persisted Management B-tree */
51      COPIED_PAGES_BTREE,
52  
53      /** In-memory B-tree but saved on disk */
54      BACKED_ON_DISK
55  }