Package org.springframework.retry.stats
Class DefaultRetryStatistics
java.lang.Object
org.springframework.core.AttributeAccessorSupport
org.springframework.retry.stats.DefaultRetryStatistics
- All Implemented Interfaces:
Serializable
,org.springframework.core.AttributeAccessor
,RetryStatistics
,MutableRetryStatistics
- Direct Known Subclasses:
ExponentialAverageRetryStatistics
public class DefaultRetryStatistics
extends org.springframework.core.AttributeAccessorSupport
implements RetryStatistics, MutableRetryStatistics
- Author:
- Dave Syer
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of times a block failed to complete successfully, even after retry.int
int
Get the number of errors detected, whether or not they resulted in a retry.getName()
Get an identifier for the retry block for reporting purposes.int
Get the number of times a recovery callback was applied.int
Get the number of times a retry block has been entered, irrespective of how many times the operation was retried.void
void
void
void
void
void
toString()
Methods inherited from class org.springframework.core.AttributeAccessorSupport
attributeNames, computeAttribute, copyAttributesFrom, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttribute
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.core.AttributeAccessor
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
-
Constructor Details
-
DefaultRetryStatistics
-
-
Method Details
-
getCompleteCount
public int getCompleteCount()- Specified by:
getCompleteCount
in interfaceRetryStatistics
- Returns:
- the number of completed successful retry attempts.
-
getStartedCount
public int getStartedCount()Description copied from interface:RetryStatistics
Get the number of times a retry block has been entered, irrespective of how many times the operation was retried.- Specified by:
getStartedCount
in interfaceRetryStatistics
- Returns:
- the number of retry blocks started.
-
getErrorCount
public int getErrorCount()Description copied from interface:RetryStatistics
Get the number of errors detected, whether or not they resulted in a retry.- Specified by:
getErrorCount
in interfaceRetryStatistics
- Returns:
- the number of errors detected.
-
getAbortCount
public int getAbortCount()Description copied from interface:RetryStatistics
Get the number of times a block failed to complete successfully, even after retry.- Specified by:
getAbortCount
in interfaceRetryStatistics
- Returns:
- the number of retry attempts that failed overall.
-
getName
Description copied from interface:RetryStatistics
Get an identifier for the retry block for reporting purposes.- Specified by:
getName
in interfaceRetryStatistics
- Returns:
- an identifier for the block.
-
getRecoveryCount
public int getRecoveryCount()Description copied from interface:RetryStatistics
Get the number of times a recovery callback was applied.- Specified by:
getRecoveryCount
in interfaceRetryStatistics
- Returns:
- the number of recovered attempts.
-
setName
-
incrementStartedCount
public void incrementStartedCount()- Specified by:
incrementStartedCount
in interfaceMutableRetryStatistics
-
incrementCompleteCount
public void incrementCompleteCount()- Specified by:
incrementCompleteCount
in interfaceMutableRetryStatistics
-
incrementRecoveryCount
public void incrementRecoveryCount()- Specified by:
incrementRecoveryCount
in interfaceMutableRetryStatistics
-
incrementErrorCount
public void incrementErrorCount()- Specified by:
incrementErrorCount
in interfaceMutableRetryStatistics
-
incrementAbortCount
public void incrementAbortCount()- Specified by:
incrementAbortCount
in interfaceMutableRetryStatistics
-
toString
-