public static enum Replica.Type extends Enum<Replica.Type>
| 枚举常量和说明 |
|---|
NRT
Writes updates to transaction log and indexes locally.
|
PULL
Doesn’t index or writes to transaction log.
|
TLOG
Writes to transaction log, but not to index, uses replication.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Replica.Type |
get(String name) |
static Replica.Type |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Replica.Type[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Replica.Type NRT
public static final Replica.Type TLOG
TLOG replica can become leader (by first
applying all local transaction log elements). If a replica is of type TLOG but is also the leader, it will behave
as a NRT. A shard leader will forward updates to all active NRT and TLOG replicas.public static final Replica.Type PULL
NRT or TLOG replicas. PULL
replicas can’t become shard leaders (i.e., if there are only pull replicas in the collection at some point, updates will fail
same as if there is no leaders, queries continue to work), so they don’t even participate in elections.public static Replica.Type[] values()
for (Replica.Type c : Replica.Type.values()) System.out.println(c);
public static Replica.Type valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public static Replica.Type get(String name)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.