|
||||||||||
| 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.
| Nested Class Summary | |
|---|---|
static class |
Gossiper.GossipDigestAck2VerbHandler
|
static class |
Gossiper.GossipDigestAckVerbHandler
|
static class |
Gossiper.GossipDigestSynVerbHandler
|
static class |
Gossiper.JoinVerbHandler
|
| Field Summary | |
|---|---|
static Gossiper |
instance
|
static int |
intervalInMillis_
|
| Method Summary | |
|---|---|
void |
addLocalApplicationState(java.lang.String key,
ApplicationState appState)
|
void |
convict(java.net.InetAddress endpoint)
This method is part of IFailureDetectionEventListener interface. |
int |
getCurrentGenerationNumber(java.net.InetAddress endpoint)
|
java.util.Set<java.net.InetAddress> |
getLiveMembers()
|
java.util.Set<java.net.InetAddress> |
getUnreachableMembers()
|
boolean |
isKnownEndpoint(java.net.InetAddress endpoint)
|
void |
register(IEndPointStateChangeSubscriber subscriber)
Register with the Gossiper for EndPointState notifications |
void |
removeEndPoint(java.net.InetAddress endpoint)
Removes the endpoint completely from Gossip |
void |
start(java.net.InetAddress localEndPoint,
int generationNbr)
Start the gossiper with the generation # retrieved from the System table |
void |
stop()
|
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 |
| Field Detail |
|---|
public static final int intervalInMillis_
public static final Gossiper instance
| Method Detail |
|---|
public void register(IEndPointStateChangeSubscriber subscriber)
register in interface IEndPointStateChangePublishersubscriber - module which implements the IEndPointStateChangeSubscriberpublic void unregister(IEndPointStateChangeSubscriber subscriber)
IEndPointStateChangePublisher
unregister in interface IEndPointStateChangePublishersubscriber - module which implements the IEndPointStateChangeSubscriberpublic java.util.Set<java.net.InetAddress> getLiveMembers()
public java.util.Set<java.net.InetAddress> getUnreachableMembers()
public void convict(java.net.InetAddress endpoint)
convict in interface IFailureDetectionEventListenerendpoint - endpoint to be convictedpublic void removeEndPoint(java.net.InetAddress endpoint)
public boolean isKnownEndpoint(java.net.InetAddress endpoint)
public int getCurrentGenerationNumber(java.net.InetAddress endpoint)
public void start(java.net.InetAddress localEndPoint,
int generationNbr)
public void addLocalApplicationState(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 | |||||||||