|
@@ -28,6 +28,8 @@ import java.io.FileWriter;
|
|
|
import java.io.IOException;
|
|
|
import java.net.InetAddress;
|
|
|
import java.net.InetSocketAddress;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.Map;
|
|
|
import java.util.Properties;
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
@@ -488,6 +490,11 @@ public class QuorumPeerConfig {
|
|
|
return quorumVerifier;
|
|
|
}
|
|
|
|
|
|
+ public Map<Long,QuorumServer> getServers() {
|
|
|
+ // returns all configuration servers -- participants and observers
|
|
|
+ return Collections.unmodifiableMap(quorumVerifier.getAllMembers());
|
|
|
+ }
|
|
|
+
|
|
|
public long getServerId() { return serverId; }
|
|
|
|
|
|
public boolean isDistributed() { return (quorumVerifier!=null && quorumVerifier.getVotingMembers().size() > 1); }
|