Class ErrorsPerIntervalBlacklistingStrategy
java.lang.Object
org.distributeme.core.routing.blacklisting.ErrorsPerIntervalBlacklistingStrategy
- All Implemented Interfaces:
BlacklistingStrategy
A service instance is blacklisted after x successive intervals of length y, in which
z failures occur. x, y and z are configurable via configureme.
x: requiredNumberOfIntervalsWithErrors
y: intervalDurationInSeconds
z: errorsPerIntervalThreshold
If no valid configuration is given, then isBlacklisted() always returns false.
- Author:
- rboehling
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBlacklisted(String instanceId) Returns the blacklist decision for given service instanceID.voidnotifyCallFailed(ClientSideCallContext clientSideCallContext) Called by the router when a call to service instance failed.voidsetConfiguration(GenericRouterConfiguration configuration) Called by the router upon configuration change.
-
Constructor Details
-
ErrorsPerIntervalBlacklistingStrategy
public ErrorsPerIntervalBlacklistingStrategy()
-
-
Method Details
-
isBlacklisted
Description copied from interface:BlacklistingStrategyReturns the blacklist decision for given service instanceID.- Specified by:
isBlacklistedin interfaceBlacklistingStrategy
-
notifyCallFailed
Description copied from interface:BlacklistingStrategyCalled by the router when a call to service instance failed.- Specified by:
notifyCallFailedin interfaceBlacklistingStrategy- Parameters:
clientSideCallContext-
-
setConfiguration
Description copied from interface:BlacklistingStrategyCalled by the router upon configuration change.- Specified by:
setConfigurationin interfaceBlacklistingStrategy- Parameters:
configuration-
-