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 2008 Sun Microsystems, Inc.
015 * Portions Copyright 2015 ForgeRock AS.
016 */
017package org.opends.server.api;
018
019
020
021/**
022 * This interface defines a set of methods that may be used by server
023 * components to perform any processing that they might find necessary
024 * whenever a backend is initialized and/or finalized.
025 */
026@org.opends.server.types.PublicAPI(
027     stability=org.opends.server.types.StabilityLevel.VOLATILE,
028     mayInstantiate=false,
029     mayExtend=true,
030     mayInvoke=false)
031public interface BackendInitializationListener
032{
033  /**
034   * Performs any processing that may be required whenever a backend
035   * is initialized for use in the Directory Server.  This method will
036   * be invoked after the backend has been initialized but before it
037   * has been put into service.
038   *
039   * @param  backend  The backend that has been initialized and is
040   *                  about to be put into service.
041   */
042  void performBackendPreInitializationProcessing(Backend<?> backend);
043
044  /**
045   * Performs any processing that may be required
046   * after the Initialisation cycle has been completed, that is
047   * all listeners have received the initialisation event, and the
048   * backend has been put into service,.
049   *
050   * @param  backend  The backend that has been initialized and has been
051   *                  put into service.
052   */
053  void performBackendPostInitializationProcessing(Backend<?> backend);
054
055  /**
056   * Performs any processing that may be required before starting
057   * the finalisation cycle, that is invoked before any listener receive
058   * the Finalization event.
059   *
060   * @param  backend  The backend that is about to be finalized.
061   */
062  void performBackendPreFinalizationProcessing(Backend<?> backend);
063
064  /**
065   * Performs any processing that may be required whenever a backend
066   * is finalized.  This method will be invoked after the backend has
067   * been taken out of service but before it has been finalized.
068   *
069   * @param  backend  The backend that has been taken out of service
070   *                  and is about to be finalized.
071   */
072  void performBackendPostFinalizationProcessing(Backend<?> backend);
073
074}
075