Class HeartbeatConnectionChecker
java.lang.Object
org.axonframework.axonserver.connector.heartbeat.connection.checker.HeartbeatConnectionChecker
- All Implemented Interfaces:
ConnectionSanityChecker
@Deprecated
public class HeartbeatConnectionChecker
extends Object
implements ConnectionSanityChecker
Deprecated.
in through use of the AxonServer java
connector
Implementation of
ConnectionSanityChecker which verifies that heartbeats are properly received.- Since:
- 4.2.1
- Author:
- Sara Pellegrini
-
Constructor Summary
ConstructorsConstructorDescriptionHeartbeatConnectionChecker(long heartbeatTimeout, Consumer<Runnable> registerOnHeartbeat, ConnectionSanityChecker delegate, Clock clock) Deprecated.Primary constructor ofHeartbeatConnectionChecker.HeartbeatConnectionChecker(Consumer<Runnable> registration, ConnectionSanityChecker delegate) Deprecated.Constructs an instance ofHeartbeatConnectionCheckerusing a default timeout of 5 seconds and the system clock.HeartbeatConnectionChecker(AxonServerConnectionManager connectionManager, String context) Deprecated.Constructs an instance ofHeartbeatConnectionCheckerusing the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid()Deprecated.Returns true if the connection is still alive, false otherwise.
-
Constructor Details
-
HeartbeatConnectionChecker
Deprecated.Constructs an instance ofHeartbeatConnectionCheckerusing the specified parameters.- Parameters:
connectionManager- the connectionManager to AxonServer instancecontext- the (Bounded) Context for which is verified the AxonServer connection
-
HeartbeatConnectionChecker
public HeartbeatConnectionChecker(Consumer<Runnable> registration, ConnectionSanityChecker delegate) Deprecated.Constructs an instance ofHeartbeatConnectionCheckerusing a default timeout of 5 seconds and the system clock.- Parameters:
registration- function which allows to register a callback for the reception of an heartbeatdelegate- another implementation ofConnectionSanityCheckerthat performs others kind of verifications
-
HeartbeatConnectionChecker
public HeartbeatConnectionChecker(long heartbeatTimeout, Consumer<Runnable> registerOnHeartbeat, ConnectionSanityChecker delegate, Clock clock) Deprecated.Primary constructor ofHeartbeatConnectionChecker.- Parameters:
heartbeatTimeout- the time without any heartbeat after which the connection is considered no more valid; it is expressed in millisecondsregisterOnHeartbeat- function which allows to register a callback for the reception of an heartbeatdelegate- another implementation ofConnectionSanityCheckerthat performs others kind of verificationsclock- clock used to verify the timeout
-
-
Method Details
-
isValid
public boolean isValid()Deprecated.Returns true if the connection is still alive, false otherwise.Detects if the connection is still available according with the heartbeat timeout. If no heartbeat at all is received since the startup of the connection, this implementation returns
trueas we suppose that Axon Server version doesn't support the heartbeat feature.- Specified by:
isValidin interfaceConnectionSanityChecker- Returns:
trueif the connection is valid,falseotherwise
-