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