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