|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.gms.Gossiper
public class Gossiper
This module is responsible for Gossiping information for the local endpoint. This abstraction maintains the list of live and dead endpoints. Periodically i.e. every 1 second this module chooses a random node and initiates a round of Gossip with it. A round of Gossip involves 3 rounds of messaging. For instance if node A wants to initiate a round of Gossip with node B it starts off by sending node B a GossipDigestSynMessage. Node B on receipt of this message sends node A a GossipDigestAckMessage. On receipt of this message node A sends node B a GossipDigestAck2Message which completes a round of Gossip. This module as and when it hears one of the three above mentioned messages updates the Failure Detector with the liveness information. Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
Method Summary | |
---|---|
void |
addApplicationState(java.lang.String key,
ApplicationState appState)
|
void |
convict(EndPoint endpoint)
This method is part of IFailureDetectionEventListener interface. |
java.util.Set<EndPoint> |
getAllMembers()
|
int |
getCurrentGenerationNumber(EndPoint endpoint)
|
java.util.Set<EndPoint> |
getLiveMembers()
|
java.util.Set<EndPoint> |
getUnreachableMembers()
|
static Gossiper |
instance()
|
void |
register(IEndPointStateChangeSubscriber subscriber)
Register for interesting state changes. |
void |
removeFromMembership(EndPoint ep)
This method is used to forcibly remove a node from the membership set. |
void |
shutdown()
|
void |
start(EndPoint localEndPoint,
int generationNbr)
|
void |
stop()
|
void |
suspect(EndPoint endpoint)
This method is part of IFailureDetectionEventListener interface. |
void |
unregister(IEndPointStateChangeSubscriber subscriber)
Unregister interest for state changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Gossiper instance()
public void register(IEndPointStateChangeSubscriber subscriber)
IEndPointStateChangePublisher
register
in interface IEndPointStateChangePublisher
subscriber
- module which implements the IEndPointStateChangeSubscriberpublic void unregister(IEndPointStateChangeSubscriber subscriber)
IEndPointStateChangePublisher
unregister
in interface IEndPointStateChangePublisher
subscriber
- module which implements the IEndPointStateChangeSubscriberpublic java.util.Set<EndPoint> getAllMembers()
public java.util.Set<EndPoint> getLiveMembers()
public java.util.Set<EndPoint> getUnreachableMembers()
public void removeFromMembership(EndPoint ep)
public void convict(EndPoint endpoint)
convict
in interface IFailureDetectionEventListener
endpoint
- endpoint to be convictedpublic void suspect(EndPoint endpoint)
suspect
in interface IFailureDetectionEventListener
endpoint
- endpoint to be suspected.public int getCurrentGenerationNumber(EndPoint endpoint)
public void start(EndPoint localEndPoint, int generationNbr) throws java.io.IOException
java.io.IOException
public void shutdown()
shutdown
in interface IComponentShutdown
public void addApplicationState(java.lang.String key, ApplicationState appState)
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |