001/*
002 *  Licensed to the Apache Software Foundation (ASF) under one
003 *  or more contributor license agreements.  See the NOTICE file
004 *  distributed with this work for additional information
005 *  regarding copyright ownership.  The ASF licenses this file
006 *  to you under the Apache License, Version 2.0 (the
007 *  "License"); you may not use this file except in compliance
008 *  with the License.  You may obtain a copy of the License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 *  Unless required by applicable law or agreed to in writing,
013 *  software distributed under the License is distributed on an
014 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 *  KIND, either express or implied.  See the License for the
016 *  specific language governing permissions and limitations
017 *  under the License.
018 *
019 */
020package org.apache.directory.mavibot.btree;
021
022
023/**
024 * An enum to describe the B-tree type. We have three possible type :
025 * <ul>
026 * <li>IN_MEMORY : the B-tree will remain in memory, and won't be persisted on disk</li>
027 * <li>BACKED_ON_DISK : the B-tree is in memory, but will be persisted on disk</li>
028 * <li>PERSISTED : the B-tree is managed by a RecordManager, and some pages may
029 * be swapped out from memory on demand</li>
030 * <li>PERSISTED_SUB : The B-tree is a Persisted B-tree, but a Sub B-tree one</li>
031 * <li>PERSISTED_MANAGEMENT : This is a Persisted B-tree used to manage the other B-trees</li>
032 * </ul>
033 *
034 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
035 */
036public enum BTreeTypeEnum
037{
038    /** Pure in-memory B-tree, not persisted on disk */
039    IN_MEMORY,
040
041    /** Persisted B-tree */
042    PERSISTED,
043
044    /** Persisted sub B-tree */
045    PERSISTED_SUB,
046
047    /** Persisted Management B-tree */
048    BTREE_OF_BTREES,
049
050    /** Persisted Management B-tree */
051    COPIED_PAGES_BTREE,
052
053    /** In-memory B-tree but saved on disk */
054    BACKED_ON_DISK
055}