public enum ServerType extends java.lang.Enum<ServerType>
| 枚举常量和说明 |
|---|
REPLICA_SET_ARBITER
A replica set arbiter.
|
REPLICA_SET_GHOST
A replica set member that does not report a set name or a hosts list
|
REPLICA_SET_OTHER
A replica set member that is none of the other types (a passive, for example).
|
REPLICA_SET_PRIMARY
A replica set primary.
|
REPLICA_SET_SECONDARY
A replica set secondary.
|
SHARD_ROUTER
A router to a sharded cluster, i.e. a mongos server.
|
STANDALONE
A standalone mongod server.
|
UNKNOWN
The server type is not yet known.
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract ClusterType |
getClusterType()
The type of the cluster to which this server belongs
|
static ServerType |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static ServerType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ServerType STANDALONE
public static final ServerType REPLICA_SET_PRIMARY
public static final ServerType REPLICA_SET_SECONDARY
public static final ServerType REPLICA_SET_ARBITER
public static final ServerType REPLICA_SET_OTHER
public static final ServerType REPLICA_SET_GHOST
public static final ServerType SHARD_ROUTER
public static final ServerType UNKNOWN
public static ServerType[] values()
for (ServerType c : ServerType.values()) System.out.println(c);
public static ServerType valueOf(java.lang.String name)
name - 要返回的枚举常量的名称。java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException - 如果参数为空值public abstract ClusterType getClusterType()