Serializable, Comparable<ClusterConnectionMode>public enum ClusterConnectionMode extends Enum<ClusterConnectionMode>
| Enum Constant | Description | 
|---|---|
| MULTIPLE | Connect to multiple servers in a cluster (either a replica set or multiple mongos servers) | 
| SINGLE | Connect directly to a server, regardless of the type of cluster it is a part of. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static ClusterConnectionMode | valueOf(String name) | Returns the enum constant of this type with the specified name. | 
| static ClusterConnectionMode[] | values() | Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final ClusterConnectionMode SINGLE
public static final ClusterConnectionMode MULTIPLE
public static ClusterConnectionMode[] values()
for (ClusterConnectionMode c : ClusterConnectionMode.values()) System.out.println(c);
public static ClusterConnectionMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null