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 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.forgerock.opendj.config.client; 027 028import static com.forgerock.opendj.ldap.AdminMessages.*; 029 030import org.forgerock.i18n.LocalizableMessage; 031import org.forgerock.opendj.config.OperationsException; 032 033/** 034 * This exception is thrown when a critical concurrent modification is detected 035 * by the client. This may be caused by another client application removing a 036 * managed object whilst it is being managed. 037 */ 038public class ConcurrentModificationException extends OperationsException { 039 040 /** 041 * Serialization ID. 042 */ 043 private static final long serialVersionUID = -1467024486347612820L; 044 045 /** 046 * Create a concurrent modification exception with a default message. 047 */ 048 public ConcurrentModificationException() { 049 super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get()); 050 } 051 052 /** 053 * Create a concurrent modification exception with a cause and a default 054 * message. 055 * 056 * @param cause 057 * The cause. 058 */ 059 public ConcurrentModificationException(Throwable cause) { 060 super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get(), cause); 061 } 062 063 /** 064 * Create a concurrent modification exception with a message and cause. 065 * 066 * @param message 067 * The message. 068 * @param cause 069 * The cause. 070 */ 071 public ConcurrentModificationException(LocalizableMessage message, Throwable cause) { 072 super(message, cause); 073 } 074 075 /** 076 * Create a concurrent modification exception with a message. 077 * 078 * @param message 079 * The message. 080 */ 081 public ConcurrentModificationException(LocalizableMessage message) { 082 super(message); 083 } 084}