1 /**
2 * Copyright 2003-2007 Greg Luck
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package net.sf.ehcache.constructs.asynchronous;
18
19 /**
20 * Thrown when a command has unsuccessfully tried to be executed more than its retry limit.
21 * <p/>
22 * The {@link Command} will not accept any more {@link Command#execute()} attempts, so it will never be able
23 * to complete its task.
24 * @author <a href="mailto:gluck@thoughtworks.com">Greg Luck</a>
25 * @version $Id: TooManyRetriesException.java 512 2007-07-10 09:18:45Z gregluck $
26 */
27 public class TooManyRetriesException extends AsynchronousCommandException {
28
29 /**
30 * Constructs a new exception with the specified detail message. The
31 * cause is not initialized, and may subsequently be initialized by
32 * a call to {@link #initCause}.
33 *
34 * @param message the detail message. The detail message is saved for
35 * later retrieval by the {@link #getMessage()} method.
36 */
37 public TooManyRetriesException(String message) {
38 super(message);
39 }
40
41 /**
42 * Constructs a new exception with the specified detail message and
43 * cause. <p>Note that the detail message associated with
44 * <code>cause</code> is <i>not</i> automatically incorporated in
45 * this exception's detail message.
46 *
47 * @param message the detail message (which is saved for later retrieval
48 * by the {@link #getMessage()} method).
49 * @param cause the cause (which is saved for later retrieval by the
50 * {@link #getCause()} method). (A <tt>null</tt> value is
51 * permitted, and indicates that the cause is nonexistent or
52 * unknown.)
53 */
54 public TooManyRetriesException(String message, Throwable cause) {
55 super(message, cause);
56 }
57 }