Package org.apache.solr.common.cloud
Enum Replica.Type
- java.lang.Object
-
- java.lang.Enum<Replica.Type>
-
- org.apache.solr.common.cloud.Replica.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Replica.Type>
- Enclosing class:
- Replica
public static enum Replica.Type extends Enum<Replica.Type>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Replica.Type
get(String name)
static Replica.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static Replica.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NRT
public static final Replica.Type NRT
-
TLOG
public static final Replica.Type TLOG
Writes to transaction log, but not to index, uses replication. AnyTLOG
replica can become leader (by first applying all local transaction log elements). If a replica is of typeTLOG
but is also the leader, it will behave as aNRT
. A shard leader will forward updates to all activeNRT
andTLOG
replicas.
-
PULL
public static final Replica.Type PULL
Doesn’t index or writes to transaction log. Just replicates fromNRT
orTLOG
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.
-
-
Method Detail
-
values
public static Replica.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Replica.Type c : Replica.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Replica.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
get
public static Replica.Type get(String name)
-
-