Skip to content

Commit c1ea04e

Browse files
committed
Upon reviewer's request:
(FIX) Deleted .puml file (no longer required or used) (FIX) Removed @SInCE annotations (they add noise)
1 parent 10c0879 commit c1ea04e

File tree

13 files changed

+91
-66
lines changed

13 files changed

+91
-66
lines changed

retry/etc/retry.urm.puml

Lines changed: 0 additions & 38 deletions
This file was deleted.

retry/licenseheader.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
====
2+
The MIT License
3+
Copyright (c) 2014 Ilkka Seppälä
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+
====
23+
24+
<#if licenseFirst??>
25+
${licenseFirst}
26+
</#if>
27+
${licensePrefix}The MIT License (MIT)
28+
${licensePrefix}
29+
${licensePrefix}Copyright (c) 2014-2016 Ilkka Seppälä
30+
${licensePrefix}
31+
${licensePrefix}Permission is hereby granted, free of charge, to any person obtaining a copy
32+
${licensePrefix}of this software and associated documentation files (the "Software"), to deal
33+
${licensePrefix}in the Software without restriction, including without limitation the rights
34+
${licensePrefix}to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35+
${licensePrefix}copies of the Software, and to permit persons to whom the Software is
36+
${licensePrefix}furnished to do so, subject to the following conditions:
37+
${licensePrefix}
38+
${licensePrefix}The above copyright notice and this permission notice shall be included in all
39+
${licensePrefix}copies or substantial portions of the Software.
40+
${licensePrefix}
41+
${licensePrefix}THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42+
${licensePrefix}IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43+
${licensePrefix}FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44+
${licensePrefix}AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45+
${licensePrefix}LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46+
${licensePrefix}OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47+
${licensePrefix}SOFTWARE.
48+
<#if licenseLast??>
49+
${licenseLast}
50+
</#if>

retry/nb-configuration.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<netbeans.hint.licensePath>${project.basedir}/licenseheader.txt</netbeans.hint.licensePath>
17+
</properties>
18+
</project-shared-configuration>

retry/nbproject/project.properties

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# The MIT License
3+
# Copyright (c) 2014 Ilkka Seppälä
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in
13+
# all copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
# THE SOFTWARE.
22+
#
23+

retry/src/main/java/com/iluwatar/retry/App.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
*
5757
* @author George Aristy ([email protected])
5858
* @see <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/retry">Retry pattern (Microsoft Azure Docs)</a>
59-
* @since 1.18.0
6059
*/
6160
public final class App {
6261
private static final Logger LOG = LoggerFactory.getLogger(App.class);
@@ -67,7 +66,6 @@ public final class App {
6766
*
6867
* @param args not used
6968
* @throws Exception not expected
70-
* @since 1.18.0
7169
*/
7270
public static void main(String[] args) throws Exception {
7371
noErrors();

retry/src/main/java/com/iluwatar/retry/BusinessException.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* be able to handle this error and should be reported to the maintainers immediately.
3232
*
3333
* @author George Aristy ([email protected])
34-
* @since 1.18.0
3534
*/
3635
public class BusinessException extends Exception {
3736
private static final long serialVersionUID = 6235833142062144336L;
@@ -40,7 +39,6 @@ public class BusinessException extends Exception {
4039
* Ctor
4140
*
4241
* @param message the error message
43-
* @since 1.18.0
4442
*/
4543
public BusinessException(String message) {
4644
super(message);

retry/src/main/java/com/iluwatar/retry/BusinessOperation.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*
3030
* @author George Aristy ([email protected])
3131
* @param <T> the return type
32-
* @since 1.18.0
3332
*/
3433
@FunctionalInterface
3534
public interface BusinessOperation<T> {
@@ -40,7 +39,6 @@ public interface BusinessOperation<T> {
4039
* @return the return value
4140
* @throws BusinessException if the operation fails. Implementations are allowed to throw more
4241
* specific subtypes depending on the error conditions
43-
* @since 1.18.0
4442
*/
4543
T perform() throws BusinessException;
4644
}

retry/src/main/java/com/iluwatar/retry/CustomerNotFoundException.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* by an input from some end user, or were the search parameters pulled from your database?
3232
*
3333
* @author George Aristy ([email protected])
34-
* @since 1.18.0
3534
*/
3635
public final class CustomerNotFoundException extends BusinessException {
3736
private static final long serialVersionUID = -6972888602621778664L;
@@ -40,7 +39,6 @@ public final class CustomerNotFoundException extends BusinessException {
4039
* Ctor.
4140
*
4241
* @param message the error message
43-
* @since 1.18.0
4442
*/
4543
public CustomerNotFoundException(String message) {
4644
super(message);

retry/src/main/java/com/iluwatar/retry/DatabaseNotAvailableException.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* Catastrophic error indicating that we have lost connection to our database.
2929
*
3030
* @author George Aristy ([email protected])
31-
* @since 1.18.0
3231
*/
3332
public final class DatabaseNotAvailableException extends BusinessException {
3433
private static final long serialVersionUID = -3750769625095997799L;
@@ -37,7 +36,6 @@ public final class DatabaseNotAvailableException extends BusinessException {
3736
* Ctor.
3837
*
3938
* @param message the error message
40-
* @since 1.18.0
4139
*/
4240
public DatabaseNotAvailableException(String message) {
4341
super(message);

retry/src/main/java/com/iluwatar/retry/FindCustomer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
* purposes of this example it fails in a programmed way depending on the constructor parameters.
3737
*
3838
* @author George Aristy ([email protected])
39-
* @since 1.18.0
4039
*/
4140
public final class FindCustomer implements BusinessOperation<String> {
4241
private final String customerId;
@@ -47,7 +46,6 @@ public final class FindCustomer implements BusinessOperation<String> {
4746
*
4847
* @param customerId the final result of the remote operation
4948
* @param errors the errors to throw before returning {@code customerId}
50-
* @since 1.18.0
5149
*/
5250
public FindCustomer(String customerId, BusinessException... errors) {
5351
this.customerId = customerId;

retry/src/main/java/com/iluwatar/retry/Retry.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
*
3737
* @author George Aristy ([email protected])
3838
* @param <T> the remote op's return type
39-
* @since 1.18.0
4039
*/
4140
public final class Retry<T> implements BusinessOperation<T> {
4241
private final BusinessOperation<T> op;
@@ -54,7 +53,6 @@ public final class Retry<T> implements BusinessOperation<T> {
5453
* @param delay delay (in milliseconds) between attempts
5554
* @param ignoreTests tests to check whether the remote exception can be ignored. No exceptions
5655
* will be ignored if no tests are given
57-
* @since 1.18.0
5856
*/
5957
@SafeVarargs
6058
public Retry(
@@ -75,7 +73,6 @@ public Retry(
7573
* The errors encountered while retrying, in the encounter order.
7674
*
7775
* @return the errors encountered while retrying
78-
* @since 1.18.0
7976
*/
8077
public List<Exception> errors() {
8178
return Collections.unmodifiableList(this.errors);
@@ -85,7 +82,6 @@ public List<Exception> errors() {
8582
* The number of retries performed.
8683
*
8784
* @return the number of retries performed
88-
* @since 1.18.0
8985
*/
9086
public int attempts() {
9187
return this.attempts.intValue();

retry/src/test/java/com/iluwatar/retry/FindCustomerTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@
3232
* Unit tests for {@link FindCustomer}.
3333
*
3434
* @author George Aristy ([email protected])
35-
* @since 1.18.0
3635
*/
3736
public class FindCustomerTest {
3837
/**
3938
* Returns the given result with no exceptions.
40-
*
41-
* @since 1.18.0
4239
*/
4340
@Test
4441
public void noExceptions() throws Exception {
@@ -52,7 +49,6 @@ public void noExceptions() throws Exception {
5249
* Throws the given exception.
5350
*
5451
* @throws Exception the expected exception
55-
* @since 1.18.0
5652
*/
5753
@Test(expected = BusinessException.class)
5854
public void oneException() throws Exception {
@@ -63,7 +59,6 @@ public void oneException() throws Exception {
6359
* Should first throw the given exceptions, then return the given result.
6460
*
6561
* @throws Exception not an expected exception
66-
* @since 1.18.0
6762
*/
6863
@Test
6964
public void resultAfterExceptions() throws Exception {

retry/src/test/java/com/iluwatar/retry/RetryTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@
3333
* Unit tests for {@link Retry}.
3434
*
3535
* @author George Aristy ([email protected])
36-
* @since 1.18.0
3736
*/
3837
public class RetryTest {
3938
/**
4039
* Should contain all errors thrown.
41-
*
42-
* @since 1.18.0
4340
*/
4441
@Test
4542
public void errors() throws Exception {
@@ -64,8 +61,6 @@ public void errors() throws Exception {
6461
/**
6562
* No exceptions will be ignored, hence final number of attempts should be 1 even if we're asking
6663
* it to attempt twice.
67-
*
68-
* @since 1.18.0
6964
*/
7065
@Test
7166
public void attempts() {
@@ -90,8 +85,6 @@ public void attempts() {
9085
/**
9186
* Final number of attempts should be equal to the number of attempts asked because we are
9287
* asking it to ignore the exception that will be thrown.
93-
*
94-
* @since 1.18.0
9588
*/
9689
@Test
9790
public void ignore() throws Exception {

0 commit comments

Comments
 (0)