|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +package org.apache.shenyu.common.concurrent; |
| 19 | + |
| 20 | +/** |
| 21 | + * Exception thrown by an {@link MemorySafeLinkedBlockingQueue} |
| 22 | + * when a element cannot be accepted. |
| 23 | + */ |
| 24 | +public class RejectException extends RuntimeException { |
| 25 | + |
| 26 | + private static final long serialVersionUID = -3240015871717170195L; |
| 27 | + |
| 28 | + /** |
| 29 | + * Constructs a {@code RejectException} with no detail message. |
| 30 | + * The cause is not initialized, and may subsequently be |
| 31 | + * initialized by a call to {@link #initCause(Throwable) initCause}. |
| 32 | + */ |
| 33 | + public RejectException() { |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * Constructs a {@code RejectException} with the |
| 38 | + * specified detail message. The cause is not initialized, and may |
| 39 | + * subsequently be initialized by a call to {@link |
| 40 | + * #initCause(Throwable) initCause}. |
| 41 | + * |
| 42 | + * @param message the detail message |
| 43 | + */ |
| 44 | + public RejectException(final String message) { |
| 45 | + super(message); |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * Constructs a {@code RejectException} with the |
| 50 | + * specified detail message and cause. |
| 51 | + * |
| 52 | + * @param message the detail message |
| 53 | + * @param cause the cause (which is saved for later retrieval by the |
| 54 | + * {@link #getCause()} method) |
| 55 | + */ |
| 56 | + public RejectException(final String message, final Throwable cause) { |
| 57 | + super(message, cause); |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * Constructs a {@code RejectException} with the |
| 62 | + * specified cause. The detail message is set to {@code (cause == |
| 63 | + * null ? null : cause.toString())} (which typically contains |
| 64 | + * the class and detail message of {@code cause}). |
| 65 | + * |
| 66 | + * @param cause the cause (which is saved for later retrieval by the |
| 67 | + * {@link #getCause()} method) |
| 68 | + */ |
| 69 | + public RejectException(final Throwable cause) { |
| 70 | + super(cause); |
| 71 | + } |
| 72 | +} |
0 commit comments