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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the number of times a block failed to complete successfully, even after retry.intintGet the number of errors detected, whether or not they resulted in a retry.getName()Get an identifier for the retry block for reporting purposes.intGet the number of times a recovery callback was applied.intGet the number of times a retry block has been entered, irrespective of how many times the operation was retried.voidvoidvoidvoidvoidvoidtoString()Methods inherited from class org.springframework.core.AttributeAccessorSupport
attributeNames, computeAttribute, copyAttributesFrom, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.AttributeAccessor
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
-
Constructor Details
-
DefaultRetryStatistics
-
-
Method Details
-
getCompleteCount
public int getCompleteCount()- Specified by:
getCompleteCountin interfaceRetryStatistics- Returns:
- the number of completed successful retry attempts.
-
getStartedCount
public int getStartedCount()Description copied from interface:RetryStatisticsGet the number of times a retry block has been entered, irrespective of how many times the operation was retried.- Specified by:
getStartedCountin interfaceRetryStatistics- Returns:
- the number of retry blocks started.
-
getErrorCount
public int getErrorCount()Description copied from interface:RetryStatisticsGet the number of errors detected, whether or not they resulted in a retry.- Specified by:
getErrorCountin interfaceRetryStatistics- Returns:
- the number of errors detected.
-
getAbortCount
public int getAbortCount()Description copied from interface:RetryStatisticsGet the number of times a block failed to complete successfully, even after retry.- Specified by:
getAbortCountin interfaceRetryStatistics- Returns:
- the number of retry attempts that failed overall.
-
getName
Description copied from interface:RetryStatisticsGet an identifier for the retry block for reporting purposes.- Specified by:
getNamein interfaceRetryStatistics- Returns:
- an identifier for the block.
-
getRecoveryCount
public int getRecoveryCount()Description copied from interface:RetryStatisticsGet the number of times a recovery callback was applied.- Specified by:
getRecoveryCountin interfaceRetryStatistics- Returns:
- the number of recovered attempts.
-
setName
-
incrementStartedCount
public void incrementStartedCount()- Specified by:
incrementStartedCountin interfaceMutableRetryStatistics
-
incrementCompleteCount
public void incrementCompleteCount()- Specified by:
incrementCompleteCountin interfaceMutableRetryStatistics
-
incrementRecoveryCount
public void incrementRecoveryCount()- Specified by:
incrementRecoveryCountin interfaceMutableRetryStatistics
-
incrementErrorCount
public void incrementErrorCount()- Specified by:
incrementErrorCountin interfaceMutableRetryStatistics
-
incrementAbortCount
public void incrementAbortCount()- Specified by:
incrementAbortCountin interfaceMutableRetryStatistics
-
toString
-