Package org.apache.solr.common.cloud
Enum Class Replica.Type
- All Implemented Interfaces:
Serializable,Comparable<Replica.Type>,java.lang.constant.Constable
- Enclosing class:
Replica
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanWhether replicas of this type join the leader election and can be elected.final StringName of the property in messages that contains the number of replicas of this type.final booleanWhether replicas of this type continuously replicate from the leader, if they are not themselves the leader.final booleanWhether replicas of this type require a transaction log. -
Method Summary
Modifier and TypeMethodDescriptionstatic Replica.TypeReturns a default replica type.static Replica.Typestatic Replica.TypeReturns the enum constant of this class with the specified name.static Replica.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NRT
-
TLOG
Writes to transaction log, but not to index, uses replication. AnyTLOGreplica can become leader (by first applying all local transaction log elements). If a replica is of typeTLOGbut is also the leader, it will behave as aNRT. A shard leader will forward updates to all activeNRTandTLOGreplicas. -
PULL
Does not index or writes to transaction log. Just replicates fromNRTorTLOGreplicas.PULLreplicas 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.
-
-
Field Details
-
leaderEligible
public final boolean leaderEligibleWhether replicas of this type join the leader election and can be elected. -
requireTransactionLog
public final boolean requireTransactionLogWhether replicas of this type require a transaction log. A transaction log will be created only if this istrue. -
replicateFromLeader
public final boolean replicateFromLeaderWhether replicas of this type continuously replicate from the leader, if they are not themselves the leader. -
numReplicasPropertyName
Name of the property in messages that contains the number of replicas of this type.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
get
-
defaultType
Returns a default replica type. It is most notably used by the replica factor, which maps onto this replica type. This replica type needs to be leader-eligible.
-