Package org.jgroups.protocols
Class FD_ALL
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.FailureDetection
org.jgroups.protocols.FD_ALL
- All Implemented Interfaces:
Lifecycle
Failure detection based on simple heartbeat protocol. Every member periodically multicasts a heartbeat.
Every member also maintains a table of all members (minus itself). When data or a heartbeat from P is received,
we reset the timestamp for P to the current time. Periodically, we check for expired members, and suspect those.
Reduced number of messages exchanged on suspect event: https://issues.redhat.com/browse/JGRP-1241
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.protocols.FailureDetection
FailureDetection.HeartbeatHeader, FailureDetection.HeartbeatSender, FailureDetection.TimeoutChecker -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TimeServiceprotected longprotected final ConcurrentMap<Address, Long> protected booleanFields inherited from class org.jgroups.protocols.FailureDetection
HAS_HEADER, has_suspected_mbrs, heartbeat_sender, interval, lock, mcast_sent, members, num_heartbeats_received, num_heartbeats_sent, num_suspect_events, suspect_history, suspected_mbrs, timeout, timeout_checker, timerFields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, stack, stats, up_prot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringlongprotected longvoidinit()Called after a protocol has been created and before the protocol is started.protected <T> booleanneedsToBeSuspected(Address mbr, T value) <T extends FailureDetection>
TsetTimeoutCheckInterval(long i) protected voidMethods inherited from class org.jgroups.protocols.FailureDetection
createTimeoutChecker, down, down, getHeartbeatsReceived, getHeartbeatsSent, getInterval, getMembers, getSuspectedMembers, getSuspectEventsSent, getTimeout, handleViewChange, isHeartbeatSenderRunning, isRunning, isTimeoutCheckerRunning, printSuspectHistory, resetStats, retainKeys, setInterval, setTimeout, startFailureDetection, startHeartbeatSender, startTimeoutChecker, stop, stopFailureDetection, stopHeartbeatSender, stopTimeoutChecker, suspect, unsuspect, up, upMethods inherited from class org.jgroups.stack.Protocol
accept, addPolicy, addr, addr, afterCreationHook, destroy, down, enableStats, getAddress, getComponents, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getPolicies, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, policies, providedDownServices, providedUpServices, removePolicy, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setLevel, setPolicies, setProtocolStack, setSocketFactory, setUpProtocol, setValue, start, statsEnabled, toString, up
-
Field Details
-
timeout_check_interval
protected long timeout_check_interval -
use_time_service
protected boolean use_time_service -
timestamps
-
time_service
-
-
Constructor Details
-
FD_ALL
public FD_ALL()
-
-
Method Details
-
getTimestamps
- Specified by:
getTimestampsin classFailureDetection
-
getTimeoutCheckInterval
public long getTimeoutCheckInterval()- Specified by:
getTimeoutCheckIntervalin classFailureDetection
-
setTimeoutCheckInterval
-
printTimestamps
-
init
Description copied from class:ProtocolCalled after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.- Specified by:
initin interfaceLifecycle- Overrides:
initin classFailureDetection- Throws:
Exception- Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
-
update
- Specified by:
updatein classFailureDetection
-
getTimestamp
protected long getTimestamp() -
needsToBeSuspected
- Specified by:
needsToBeSuspectedin classFailureDetection
-
getTimeoutCheckerInfo
- Specified by:
getTimeoutCheckerInfoin classFailureDetection
-
_printTimestamps
-