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 2006-2008 Sun Microsystems, Inc. 015 * Portions Copyright 2015-2016 ForgeRock AS. 016 */ 017package org.opends.server.api; 018 019import org.opends.server.types.LDIFExportConfig; 020 021/** 022 * This interface defines a set of methods that may be used to notify 023 * various Directory Server components whenever an LDIF export task is 024 * about to begin or has just completed. Note that these methods will 025 * only be invoked for the LDIF export task and not for offline LDIF 026 * export processing. 027 */ 028@org.opends.server.types.PublicAPI( 029 stability=org.opends.server.types.StabilityLevel.VOLATILE, 030 mayInstantiate=false, 031 mayExtend=true, 032 mayInvoke=false) 033public interface ExportTaskListener 034{ 035 /** 036 * Performs any processing that might be necessary just before the 037 * server begins processing on an LDIF export task. This may 038 * include flushing any outstanding writes to disk so they are 039 * included in the export and/or pausing interaction with the 040 * provided backend while the export is in progress. 041 * 042 * @param backend The backend to be exported. 043 * @param config Configuration information about the LDIF export 044 * to be performed. 045 */ 046 void processExportBegin(Backend<?> backend, LDIFExportConfig config); 047 048 /** 049 * Performs any processing that might be necessary after the server 050 * has completed processing on an LDIF export task. Note that this 051 * will always be called when export processing completes, 052 * regardless of whether it was successful. 053 * 054 * @param backend The backend that was exported. 055 * @param config Configuration information about the LDIF 056 * export that was performed. 057 * @param successful Indicates whether the export operation 058 * completed successfully. 059 */ 060 void processExportEnd(Backend<?> backend, LDIFExportConfig config, boolean successful); 061}