@@ -0,0 +1,2141 @@
+/*%0A * Copyright 2014-2017 Groupon, Inc%0A * Copyright 2014-2017 The Billing Project, LLC%0A *%0A * The Billing Project licenses this file to you under the Apache License, version 2.0%0A * (the %22License%22); you may not use this file except in compliance with the%0A * License.  You may obtain a copy of the License at:%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the%0A * License for the specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage org.killbill.billing.invoice.plugin.api;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.joda.time.Period;%0A%0Apublic class InvoicePluginApiRetryException extends RuntimeException %7B%0A%0A    public static final List%3CPeriod%3E DEFAULT_RETRY_SCHEDULE = Arrays.asList(Period.minutes(5),%0A                                                                            Period.minutes(15),%0A                                                                            Period.hours(1),%0A                                                                            Period.hours(6),%0A                                                                            Period.hours(24));%0A%0A    private final List%3CPeriod%3E retrySchedule;%0A%0A    public InvoicePluginApiRetryException() %7B%0A        this(null, null);%0A    %7D%0A%0A    public InvoicePluginApiRetryException(final Exception e) %7B%0A        this(e, null);%0A    %7D%0A%0A    public InvoicePluginApiRetryException(final List%3CPeriod%3E retrySchedule) %7B%0A        this(null, retrySchedule);%0A    %7D%0A%0A    public InvoicePluginApiRetryException(final Exception e, final List%3CPeriod%3E retrySchedule) %7B%0A        super(e);%0A        this.retrySchedule = retrySchedule != null ? retrySchedule : DEFAULT_RETRY_SCHEDULE;%0A    %7D%0A%0A    public List%3CPeriod%3E getRetrySchedule() %7B%0A        return retrySchedule;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return String.format(%22%25s (retrySchedule: %25s)%22, super.toString(), retrySchedule);%0A    %7D%0A%7D%0A

introduce InvoicePluginApiRetryException