| 1 | /* |
| 2 | * Copyright 2006-2007 the original author or authors. |
| 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 | package org.springframework.batch.retry.policy; |
| 17 | |
| 18 | import org.springframework.batch.retry.RetryException; |
| 19 | |
| 20 | /** |
| 21 | * Exception that indicates that a cache limit was exceeded. This is often a |
| 22 | * sign of badly or inconsistently implemented hashCode, equals in failed items. |
| 23 | * Items can then fail repeatedly and appear different to the cache, so they get |
| 24 | * added over and over again until a limit is reached and this exception is |
| 25 | * thrown. Consult the documentation of the {@link RetryContextCache} in use to |
| 26 | * determine how to increase the limit if appropriate. |
| 27 | * |
| 28 | * @author Dave Syer |
| 29 | * |
| 30 | */ |
| 31 | public class RetryCacheCapacityExceededException extends RetryException { |
| 32 | |
| 33 | /** |
| 34 | * Constructs a new instance with a message. |
| 35 | * |
| 36 | * @param message |
| 37 | */ |
| 38 | public RetryCacheCapacityExceededException(String message) { |
| 39 | super(message); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Constructs a new instance with a message and nested exception. |
| 44 | * |
| 45 | * @param msg the exception message. |
| 46 | * |
| 47 | */ |
| 48 | public RetryCacheCapacityExceededException(String msg, Throwable nested) { |
| 49 | super(msg, nested); |
| 50 | } |
| 51 | |
| 52 | } |