@Override
 public int hashCode() {
   int result = address.hashCode();
   result = 31 * result + type.hashCode();
   result = 31 * result + (canonicalAddress != null ? canonicalAddress.hashCode() : 0);
   result = 31 * result + hosts.hashCode();
   result = 31 * result + passives.hashCode();
   result = 31 * result + arbiters.hashCode();
   result = 31 * result + (primary != null ? primary.hashCode() : 0);
   result = 31 * result + maxDocumentSize;
   result = 31 * result + tagSet.hashCode();
   result = 31 * result + (setName != null ? setName.hashCode() : 0);
   result = 31 * result + (electionId != null ? electionId.hashCode() : 0);
   result = 31 * result + (setVersion != null ? setVersion.hashCode() : 0);
   result = 31 * result + (ok ? 1 : 0);
   result = 31 * result + state.hashCode();
   result = 31 * result + version.hashCode();
   result = 31 * result + minWireVersion;
   result = 31 * result + maxWireVersion;
   result = 31 * result + (exception == null ? 0 : exception.getClass().hashCode());
   result = 31 * result + (exception == null ? 0 : exception.getMessage().hashCode());
   return result;
 }
 /**
  * Gets the type of the cluster this server is in (for example, replica set).
  *
  * @return a ClusterType representing the type of the cluster this server is in
  */
 public ClusterType getClusterType() {
   return type.getClusterType();
 }
 /**
  * Gets whether this server is a replica set member.
  *
  * @return true if this server is part of a replica set
  */
 public boolean isReplicaSetMember() {
   return type.getClusterType() == ClusterType.REPLICA_SET;
 }