001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2014-2016 ForgeRock AS. 015 */ 016package org.opends.server.backends.pluggable; 017 018import java.io.Closeable; 019 020import org.forgerock.opendj.ldap.DN; 021 022/** 023 * Container for a whole suffix environment which stores all entries from the 024 * subtree of the suffix' baseDN. A suffix container has a set of key-value 025 * stores a.k.a indexes. It stores entries in these key-values stores and 026 * maintain the indexes all in sync on updates. 027 */ 028public interface SuffixContainer extends Closeable 029{ 030 /** The name of the index associating normalized DNs to ids. LDAP DNs uniquely identify entries. */ 031 String DN2ID_INDEX_NAME = "dn2id"; 032 /** 033 * The name of the index associating entry ids to entries. Entry ids are 034 * monotonically increasing unique longs and entries are serialized versions 035 * of LDAP entries. 036 */ 037 String ID2ENTRY_INDEX_NAME = "id2entry"; 038 /** 039 * The name of the index associating an entry id to the entry id set of all 040 * its children, i.e. its immediate children. 041 */ 042 String ID2CHILDREN_INDEX_NAME = "id2children"; 043 /** The name of the index associating an entry id to the number of immediate children below it. */ 044 String ID2CHILDREN_COUNT_NAME = "id2childrencount"; 045 /** 046 * The name of the index associating an entry id to the entry id set of all 047 * its subordinates, i.e. the children, grand-children, grand-grand-children, 048 * .... 049 */ 050 String ID2SUBTREE_INDEX_NAME = "id2subtree"; 051 /** The name of the index associating normalized DNs to normalized URIs. */ 052 String REFERRAL_INDEX_NAME = "referral"; 053 /** 054 * The name of the index which associates indexes with their trust state, i.e. 055 * does the index needs to be rebuilt ? 056 */ 057 String STATE_INDEX_NAME = "state"; 058 /** The attribute used to return a search index debug string to the client. */ 059 String ATTR_DEBUG_SEARCH_INDEX = "debugsearchindex"; 060 061 /** 062 * Returns the baseDN that this suffix container is responsible for. 063 * 064 * @return the baseDN that this suffix container is responsible for 065 */ 066 DN getBaseDN(); 067}