|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.faultdetection.PingFaultDetectionService
This class defines a PingFaultDetectionService. This will detect missing members by pinging them using regular emission of packets.
Field Summary |
Fields inherited from interface org.objectweb.tribe.faultdetection.FaultDetectionService |
DEFAULT_EMITTING_PORT, DEFAULT_LISTENING_PORT, DEFAULT_REFREST_RATE |
Constructor Summary | |
PingFaultDetectionService()
Creates a new PingFaultDetectionService object |
|
PingFaultDetectionService(int emittingPort,
int listeningPort)
Creates a new PingFaultDetectionService object |
Method Summary | |
void |
addGroup(Group group)
Add a group to analyse |
void |
addListener(FaultDetectionListener listener)
Add a listener of event |
void |
addMember(Member member)
Add a member to the ping service |
java.util.ArrayList |
getGroups()
Access all the groups the service is listening to. |
long |
getRefreshRate()
Return the value used for refresh rate. |
Group |
removeGroup(Group group)
Stop detecting failure for this group |
void |
removeListener(FaultDetectionListener listener)
Tell the fault service to no more send event to the listener |
void |
removeMember(Member member)
Remove this member from the service |
void |
setRefreshRate(long delay)
The intervals to check for new or lost members |
void |
start()
Start the service |
void |
stop()
Stop the service |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PingFaultDetectionService() throws java.net.UnknownHostException
PingFaultDetectionService
object
java.net.UnknownHostException
public PingFaultDetectionService(int emittingPort, int listeningPort) throws java.net.UnknownHostException
PingFaultDetectionService
object
emittingPort
- listeningPort
-
java.net.UnknownHostException
Method Detail |
public void setRefreshRate(long delay)
FaultDetectionService
setRefreshRate
in interface FaultDetectionService
delay
- long
value in millisecondsFaultDetectionService.setRefreshRate(long)
public long getRefreshRate()
FaultDetectionService
getRefreshRate
in interface FaultDetectionService
long
value in millisecondsFaultDetectionService.getRefreshRate()
public void addGroup(Group group)
FaultDetectionService
addGroup
in interface FaultDetectionService
group
- Group
object that contains the members to
listen toFaultDetectionService.addGroup(org.objectweb.tribe.common.Group)
public void addMember(Member member)
FaultDetectionService
addMember
in interface FaultDetectionService
member
- Member
to listen toFaultDetectionService.addMember(org.objectweb.tribe.common.Member)
public void removeMember(Member member)
FaultDetectionService
removeMember
in interface FaultDetectionService
member
- Member
to stop listening toFaultDetectionService.removeMember(org.objectweb.tribe.common.Member)
public Group removeGroup(Group group)
FaultDetectionService
removeGroup
in interface FaultDetectionService
group
- Group
object that contains the members to
listen to
FaultDetectionService.removeGroup(org.objectweb.tribe.common.Group)
public java.util.ArrayList getGroups()
FaultDetectionService
getGroups
in interface FaultDetectionService
ArrayList
of Group
FaultDetectionService.getGroups()
public void start()
Service
start
in interface Service
Service.start()
public void stop()
Service
stop
in interface Service
Service.stop()
public void addListener(FaultDetectionListener listener)
FaultDetectionService
addListener
in interface FaultDetectionService
listener
- FaultDetectionListener
to send notification toFaultDetectionService.addListener(org.objectweb.tribe.faultdetection.FaultDetectionListener)
public void removeListener(FaultDetectionListener listener)
FaultDetectionService
removeListener
in interface FaultDetectionService
listener
- FaultDetectionListener
to send notification toFaultDetectionService.removeListener(org.objectweb.tribe.faultdetection.FaultDetectionListener)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |