Package org.apache.solr.cloud
Enum Class DistributedClusterStateUpdater.MutatingCommand
java.lang.Object
java.lang.Enum<DistributedClusterStateUpdater.MutatingCommand>
org.apache.solr.cloud.DistributedClusterStateUpdater.MutatingCommand
- All Implemented Interfaces:
Serializable,Comparable<DistributedClusterStateUpdater.MutatingCommand>,Constable
- Enclosing class:
DistributedClusterStateUpdater
public static enum DistributedClusterStateUpdater.MutatingCommand
extends Enum<DistributedClusterStateUpdater.MutatingCommand>
Naming of enum instances are the mutator object name (e.g.
Cluster for ClusterStateMutator or Collection for CollectionMutator) followed by the
method name of the mutator. For example SliceAddReplica represents SliceMutator.addReplica(org.apache.solr.common.cloud.ClusterState, org.apache.solr.common.cloud.ZkNodeProps).
Even though the various mutator classes do not implement any common interface, luckily their
constructors and methods take the same set of parameters so all can be called from the enum
method buildWriteCommand(SolrCloudManager, ClusterState, ZkNodeProps).
Given that OverseerAction.DOWNNODE is different (it returns a list of write commands
and impacts more than one collection), it is handled specifically in DistributedClusterStateUpdater.CollectionNodeDownChangeCalculator.executeNodeDownStateUpdate(java.lang.String, org.apache.solr.common.cloud.ZkStateReader).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionabstract ZkWriteCommandbuildWriteCommand(org.apache.solr.client.solrj.cloud.SolrCloudManager scm, org.apache.solr.common.cloud.ClusterState cs, org.apache.solr.common.cloud.ZkNodeProps message) mutating commands that return a single ZkWriteCommand override this methodgetCollectionName(org.apache.solr.common.cloud.ZkNodeProps message) booleanGiven only one command creates a collectionClusterCreateCollection, the default implementation is provided here.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BalanceShardsUnique
-
ClusterCreateCollection
-
ClusterDeleteCollection
-
CollectionDeleteShard
-
CollectionModifyCollection
-
CollectionCreateShard
-
ReplicaAddReplicaProperty
-
ReplicaDeleteReplicaProperty
-
ReplicaSetState
-
SliceAddReplica
-
SliceAddRoutingRule
-
SliceRemoveReplica
-
SliceRemoveRoutingRule
-
SliceSetShardLeader
-
SliceUpdateShardState
-
-
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
-
buildWriteCommand
public abstract ZkWriteCommand buildWriteCommand(org.apache.solr.client.solrj.cloud.SolrCloudManager scm, org.apache.solr.common.cloud.ClusterState cs, org.apache.solr.common.cloud.ZkNodeProps message) mutating commands that return a single ZkWriteCommand override this method -
getCollectionName
-
isCollectionCreation
public boolean isCollectionCreation()Given only one command creates a collectionClusterCreateCollection, the default implementation is provided here.
-