Skip to content

Instantly share code, notes, and snippets.

@Swarnim-singhal
Created September 2, 2020 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swarnim-singhal/76d08b2b47625a37fa933587e0ce9448 to your computer and use it in GitHub Desktop.
Save Swarnim-singhal/76d08b2b47625a37fa933587e0ce9448 to your computer and use it in GitHub Desktop.
GossipDigestAck2
public class GossipDigestAck2 {
final Map<InetAddressAndPort, EndpointState> epStateMap;
GossipDigestAck2(Map<InetAddressAndPort, EndpointState> epStateMap){
this.epStateMap = epStateMap;
}
Map<InetAddressAndPort, EndpointState> getEndpointStateMap(){
return epStateMap;
}
}
public class GossipDigestAck2VerbHandler extends GossipVerbHandler<GossipDigestAck2> {
public static final GossipDigestAck2VerbHandler instance = new GossipDigestAck2VerbHandler();
public void doVerb(Message<GossipDigestAck2> message){
Map<InetAddressAndPort, EndpointState> remoteEpStateMap = message.payload.getEndpointStateMap();
Gossiper.instance.applyStateLocally(remoteEpStateMap);
super.doVerb(message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment