Package org.jgroups.protocols
Class FD_ALL2
- java.lang.Object
-
- org.jgroups.stack.Protocol
-
- org.jgroups.protocols.FailureDetection
-
- org.jgroups.protocols.FD_ALL2
-
public class FD_ALL2 extends FailureDetection
Failure detection based on simple heartbeat protocol. Every member periodically (interval ms) multicasts a heartbeat. Every member also maintains a table of all members (minus itself). When data or a heartbeat from P is received, we set the flag associated with P to true. Periodically, we check for expired members, and suspect those whose flag is false (no heartbeat or message received within timeout ms).- Version:
- 3.5
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.FailureDetection
FailureDetection.HeartbeatHeader
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<Address,java.util.concurrent.atomic.AtomicBoolean>
timestamps
-
Fields inherited from class org.jgroups.protocols.FailureDetection
HAS_HEADER, has_suspected_mbrs, heartbeat_sender, interval, local_addr, lock, mcast_sent, members, num_heartbeats_received, num_heartbeats_sent, num_suspect_events, suspect_history, suspected_mbrs, timeout, timeout_checker, timer
-
Fields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
-
-
Constructor Summary
Constructors Constructor Description FD_ALL2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
_printTimestamps()
protected java.lang.String
getTimeoutCheckerInfo()
protected long
getTimeoutCheckInterval()
protected java.util.Map<Address,?>
getTimestamps()
protected <T> boolean
needsToBeSuspected(Address mbr, T value)
java.lang.String
printTimestamps()
protected void
update(Address sender, boolean log_msg, boolean skip_if_exists)
-
Methods inherited from class org.jgroups.protocols.FailureDetection
createTimeoutChecker, down, down, getHeartbeatsReceived, getHeartbeatsSent, getInterval, getLocalAddress, getMembers, getSuspectedMembers, getSuspectEventsSent, getTimeout, handleViewChange, init, isHeartbeatSenderRunning, isRunning, isTimeoutCheckerRunning, printSuspectHistory, resetStats, retainKeys, setInterval, setTimeout, startFailureDetection, startHeartbeatSender, startTimeoutChecker, stop, stopFailureDetection, stopHeartbeatSender, stopTimeoutChecker, suspect, unsuspect, up, up
-
Methods inherited from class org.jgroups.stack.Protocol
accept, afterCreationHook, destroy, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, start, statsEnabled, up
-
-
-
-
Field Detail
-
timestamps
protected final java.util.Map<Address,java.util.concurrent.atomic.AtomicBoolean> timestamps
-
-
Method Detail
-
getTimestamps
protected java.util.Map<Address,?> getTimestamps()
- Specified by:
getTimestamps
in classFailureDetection
-
getTimeoutCheckInterval
protected long getTimeoutCheckInterval()
- Specified by:
getTimeoutCheckInterval
in classFailureDetection
-
printTimestamps
public java.lang.String printTimestamps()
-
update
protected void update(Address sender, boolean log_msg, boolean skip_if_exists)
- Specified by:
update
in classFailureDetection
-
needsToBeSuspected
protected <T> boolean needsToBeSuspected(Address mbr, T value)
- Specified by:
needsToBeSuspected
in classFailureDetection
-
getTimeoutCheckerInfo
protected java.lang.String getTimeoutCheckerInfo()
- Specified by:
getTimeoutCheckerInfo
in classFailureDetection
-
_printTimestamps
protected java.lang.String _printTimestamps()
-
-