Package org.redisson.client
Class FailedCommandsDetector
java.lang.Object
org.redisson.client.FailedCommandsDetector
- All Implemented Interfaces:
FailedNodeDetector
- Direct Known Subclasses:
FailedCommandsTimeoutDetector
Detects failed Redis node if it has certain amount of command execution errors
failedCommandsLimit in checkInterval time interval.- Author:
- Nikita Koksharov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidonCommandFailed(Throwable cause) voidvoidvoidonConnectFailed(Throwable cause) voidvoidvoidonPingFailed(Throwable cause) voidvoidsetCheckInterval(long checkInterval) voidsetFailedCommandsLimit(long failedCommandsLimit)
-
Constructor Details
-
FailedCommandsDetector
public FailedCommandsDetector() -
FailedCommandsDetector
public FailedCommandsDetector(long checkInterval, int failedCommandsLimit)
-
-
Method Details
-
setCheckInterval
public void setCheckInterval(long checkInterval) -
setFailedCommandsLimit
public void setFailedCommandsLimit(long failedCommandsLimit) -
onConnectFailed
public void onConnectFailed()- Specified by:
onConnectFailedin interfaceFailedNodeDetector
-
onConnectFailed
- Specified by:
onConnectFailedin interfaceFailedNodeDetector
-
onConnectSuccessful
public void onConnectSuccessful()- Specified by:
onConnectSuccessfulin interfaceFailedNodeDetector
-
onPingSuccessful
public void onPingSuccessful()- Specified by:
onPingSuccessfulin interfaceFailedNodeDetector
-
onCommandSuccessful
public void onCommandSuccessful()- Specified by:
onCommandSuccessfulin interfaceFailedNodeDetector
-
onPingFailed
public void onPingFailed()- Specified by:
onPingFailedin interfaceFailedNodeDetector
-
onPingFailed
- Specified by:
onPingFailedin interfaceFailedNodeDetector
-
onCommandFailed
- Specified by:
onCommandFailedin interfaceFailedNodeDetector
-
isNodeFailed
public boolean isNodeFailed()- Specified by:
isNodeFailedin interfaceFailedNodeDetector
-