Skip to content

Commit 9799dba

Browse files
committed
javadoc fix in the RetryReasonCategory
1 parent 8c4ac80 commit 9799dba

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

  • hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/retryReasonCategories

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/retryReasonCategories/RetryReasonCategory.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@
2222

2323
/**
2424
* Provides methods to define if given exception can be categorised to certain category.
25-
* Each category has a different implementation of the interface.
25+
* Each category has a different implementation of the abstract class.
2626
* */
2727
public abstract class RetryReasonCategory {
2828

2929
/**
30-
* Returns if given server response error can be converted to an abbreviation
31-
* by the implementation.
30+
* Returns if given server response error can be categorised by the implementation.
3231
*
3332
* @param ex exception captured in the server response.
3433
* @param statusCode statusCode on the server response
3534
* @param serverErrorMessage serverErrorMessage on the server response.
3635
*
37-
* @return <ol><li>true if server response error can be converted to abbreviation by the implementation</li>
38-
* <li>false if response error can not be abbreviated by the implementation</li></ol>
36+
* @return <ol><li>true if server response error can be categorised by the implementation</li>
37+
* <li>false if response error can not be categorised by the implementation</li></ol>
3938
*/
4039
abstract Boolean canCapture(Exception ex,
4140
Integer statusCode,
@@ -51,6 +50,17 @@ abstract Boolean canCapture(Exception ex,
5150
*/
5251
abstract String getAbbreviation(Integer statusCode, String serverErrorMessage);
5352

53+
/**
54+
* Converts the server-error response to an abbreviation if the response can be
55+
* categorised by the implementation.
56+
*
57+
* @param ex exception received while making API request
58+
* @param statusCode statusCode received in the server-response
59+
* @param serverErrorMessage error-message received in the server-response
60+
*
61+
* @return abbreviation if the server-response can be categorised by the implementation.
62+
* null if the server-response can not be categorised by the implementation.
63+
* */
5464
public String captureAndGetAbbreviation(Exception ex, Integer statusCode, String serverErrorMessage) {
5565
if(canCapture(ex, statusCode, serverErrorMessage)) {
5666
return getAbbreviation(statusCode, serverErrorMessage);

0 commit comments

Comments
 (0)