Class FD_ICMP
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.FD
org.jgroups.protocols.FD_ICMP
Protocol which uses InetAddress.isReachable() to check whether a given host is up or not,
taking 1 argument; the host name of the host to be pinged.
Note that this protocol only works with JDK 5 !
The implementation of this may or may not use ICMP ! An alternative is to create a TCP connection to port 7 (echo service)
and see whether it works ! This is obviously done in JDK 5, so unless an echo service is configured to run, this
won't work...
- Version:
- $Id: FD_ICMP.java,v 1.9 2007/08/27 08:09:19 belaban Exp $
- Author:
- Bela Ban
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classRuns InetAddress.isReachable().Nested classes/interfaces inherited from class FD
FD.Broadcaster, FD.BroadcastTask, FD.FdHeader, FD.Monitor -
Field Summary
Fields inherited from class FD
bcast_task, lock, num_heartbeats, num_suspect_events -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FD.MonitorgetName()voidinit()Called after instance has been created (null constructor) and before protocol is started.booleansetProperties(Properties props) Configures the protocol initially.An event was received from the layer below.Methods inherited from class FD
down, getCurrentNumTries, getLocalAddress, getMaxTries, getMembers, getNumberOfHeartbeatsSent, getNumSuspectEventsGenerated, getPingableMembers, getPingDest, getTimeout, isShun, printSuspectHistory, resetStats, setMaxTries, setShun, setTimeout, stopMethods inherited from class Protocol
destroy, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getProperties, getProtocolStack, getThreadFactory, getTransport, getUpProtocol, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, start, statsEnabled, upThreadEnabled
-
Constructor Details
-
FD_ICMP
public FD_ICMP()
-
-
Method Details
-
getName
-
setProperties
Description copied from class:ProtocolConfigures the protocol initially. A configuration string consists of name=value items, separated by a ';' (semicolon), e.g.:"loopback=false;unicast_inport=4444"
- Overrides:
setPropertiesin classFD
-
init
Description copied from class:ProtocolCalled after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent. -
up
Description copied from class:ProtocolAn event was received from the layer below. Usually the current layer will want to examine the event type and - depending on its type - perform some computation (e.g. removing headers from a MSG event type, or updating the internal membership list when receiving a VIEW_CHANGE event). Finally the event is either a) discarded, or b) an event is sent down the stack usingdown_prot.down()or c) the event (or another event) is sent up the stack usingup_prot.up(). -
createMonitor
-