From 9c3cbf3436177facd5c172bbbae4311e5812dadf Mon Sep 17 00:00:00 2001 From: Edward Capriolo Date: Sat, 21 Feb 2015 19:07:32 -0500 Subject: [PATCH] add comments about id --- src/main/java/com/google/code/gossip/GossipMember.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/google/code/gossip/GossipMember.java b/src/main/java/com/google/code/gossip/GossipMember.java index bf60820..204ab5a 100644 --- a/src/main/java/com/google/code/gossip/GossipMember.java +++ b/src/main/java/com/google/code/gossip/GossipMember.java @@ -19,6 +19,11 @@ public abstract class GossipMember implements Comparable{ protected final String _host; protected final int _port; protected int _heartbeat; + /** + * The purpose of the id field is to be able for nodes to identify themselves beyond there host/port. For example + * an application might generate a persistent id so if they rejoin the cluster at a different host and port we + * are aware it is the same node. + */ protected String _id; /** @@ -26,6 +31,7 @@ public abstract class GossipMember implements Comparable{ * @param host The hostname or IP address. * @param port The port number. * @param heartbeat The current heartbeat. + * @param id an id that may be replaced after contact */ public GossipMember(String host, int port, String id, int heartbeat) { _host = host;