| | |
| | | * of the entry containers. |
| | | */ |
| | | public class RootContainer |
| | | implements ConfigurationChangeListener<LocalDBBackendCfg> |
| | | implements org.opends.server.backends.pluggable.RootContainer<EntryContainer>, |
| | | ConfigurationChangeListener<LocalDBBackendCfg> |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | |
| | | /** The database environment monitor for this JE environment. */ |
| | | private DatabaseEnvironmentMonitor monitor; |
| | | |
| | | /** The base DNs contained in this entryContainer. */ |
| | | /** The base DNs contained in this root container. */ |
| | | private final ConcurrentHashMap<DN, EntryContainer> entryContainers = new ConcurrentHashMap<DN, EntryContainer>(); |
| | | |
| | | /** The cached value of the next entry identifier to be assigned. */ |
| | |
| | | public EntryContainer unregisterEntryContainer(DN baseDN) |
| | | { |
| | | return entryContainers.remove(baseDN); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | if (timeLimit > 0) |
| | | { |
| | | // Get a list of all the databases used by the backend. |
| | | ArrayList<DatabaseContainer> dbList = |
| | | new ArrayList<DatabaseContainer>(); |
| | | ArrayList<DatabaseContainer> dbList = new ArrayList<DatabaseContainer>(); |
| | | for (EntryContainer ec : entryContainers.values()) |
| | | { |
| | | ec.sharedLock.lock(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Close the root entryContainer. |
| | | * Closes this root container. |
| | | * |
| | | * @throws DatabaseException If an error occurs while attempting to close |
| | | * the entryContainer. |
| | | * the root container. |
| | | */ |
| | | public void close() throws DatabaseException |
| | | { |
| | |
| | | return entryContainers.values(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Map<DN, EntryContainer> getSuffixContainers() |
| | | { |
| | | return entryContainers; |
| | | } |
| | | |
| | | /** |
| | | * Returns all the baseDNs this root container stores. |
| | | * |