コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
 /**
  * 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;
 }