-
- All Known Implementing Classes:
DefaultTimeoutModel
public interface TimeoutModel
TheTimeoutModel
is the common interface for all models of timing out a SNMP request. The default model is a linear model, thus each retry has the same delay as specified by theTarget.getTimeout()
value.- Version:
- 1.0
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getRequestTimeout(int totalNumberOfRetries, long targetTimeout)
Gets the timeout for all retries, which is defined as the sum ofgetRetryTimeout(int retryCount, int totalNumberOfRetries, long targetTimeout)
for allretryCount
in0 &lz;= retryCount < totalNumberOfRetries
.long
getRetryTimeout(int retryCount, int totalNumberOfRetries, long targetTimeout)
Gets the timeout for the specified retry (a zero value forretryCount
specifies the first request).
-
-
-
Method Detail
-
getRetryTimeout
long getRetryTimeout(int retryCount, int totalNumberOfRetries, long targetTimeout)
Gets the timeout for the specified retry (a zero value forretryCount
specifies the first request).- Parameters:
retryCount
- the number of retries already performed for the target.totalNumberOfRetries
- the total number of retries configured for the target.targetTimeout
- the timeout as specified for the target in milliseconds.- Returns:
- long the timeout duration in milliseconds for the supplied retry.
-
getRequestTimeout
long getRequestTimeout(int totalNumberOfRetries, long targetTimeout)
Gets the timeout for all retries, which is defined as the sum ofgetRetryTimeout(int retryCount, int totalNumberOfRetries, long targetTimeout)
for allretryCount
in0 &lz;= retryCount < totalNumberOfRetries
.- Parameters:
totalNumberOfRetries
- the total number of retries configured for the target.targetTimeout
- the timeout as specified for the target in milliseconds.- Returns:
- the time in milliseconds when the request will be timed out finally.
-
-