Package org.apache.solr.cloud
Enum DistributedClusterStateUpdater.MutatingCommand
- java.lang.Object
- 
- java.lang.Enum<DistributedClusterStateUpdater.MutatingCommand>
- 
- org.apache.solr.cloud.DistributedClusterStateUpdater.MutatingCommand
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<DistributedClusterStateUpdater.MutatingCommand>
 - Enclosing class:
- DistributedClusterStateUpdater
 
 public static enum DistributedClusterStateUpdater.MutatingCommand extends Enum<DistributedClusterStateUpdater.MutatingCommand> Naming of enum instances are the mutator object name (e.g.ClusterforClusterStateMutatororCollectionforCollectionMutator) followed by the method name of the mutator. For exampleSliceAddReplicarepresentsSliceMutator.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.DOWNNODEis different (it returns a list of write commands and impacts more than one collection), it is handled specifically inDistributedClusterStateUpdater.CollectionNodeDownChangeCalculator.executeNodeDownStateUpdate(java.lang.String, org.apache.solr.common.cloud.ZkStateReader).
- 
- 
Enum Constant Summary
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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 methodStringgetCollectionName(org.apache.solr.common.cloud.ZkNodeProps message)static DistributedClusterStateUpdater.MutatingCommandgetCommandFor(org.apache.solr.common.params.CollectionParams.CollectionAction collectionAction)booleanisCollectionCreation()Given only one command creates a collectionClusterCreateCollection, the default implementation is provided here.static DistributedClusterStateUpdater.MutatingCommandvalueOf(String name)Returns the enum constant of this type with the specified name.static DistributedClusterStateUpdater.MutatingCommand[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
BalanceShardsUniquepublic static final DistributedClusterStateUpdater.MutatingCommand BalanceShardsUnique 
 - 
ClusterCreateCollectionpublic static final DistributedClusterStateUpdater.MutatingCommand ClusterCreateCollection 
 - 
ClusterDeleteCollectionpublic static final DistributedClusterStateUpdater.MutatingCommand ClusterDeleteCollection 
 - 
CollectionDeleteShardpublic static final DistributedClusterStateUpdater.MutatingCommand CollectionDeleteShard 
 - 
CollectionModifyCollectionpublic static final DistributedClusterStateUpdater.MutatingCommand CollectionModifyCollection 
 - 
CollectionCreateShardpublic static final DistributedClusterStateUpdater.MutatingCommand CollectionCreateShard 
 - 
ReplicaAddReplicaPropertypublic static final DistributedClusterStateUpdater.MutatingCommand ReplicaAddReplicaProperty 
 - 
ReplicaDeleteReplicaPropertypublic static final DistributedClusterStateUpdater.MutatingCommand ReplicaDeleteReplicaProperty 
 - 
ReplicaSetStatepublic static final DistributedClusterStateUpdater.MutatingCommand ReplicaSetState 
 - 
SliceAddReplicapublic static final DistributedClusterStateUpdater.MutatingCommand SliceAddReplica 
 - 
SliceAddRoutingRulepublic static final DistributedClusterStateUpdater.MutatingCommand SliceAddRoutingRule 
 - 
SliceRemoveReplicapublic static final DistributedClusterStateUpdater.MutatingCommand SliceRemoveReplica 
 - 
SliceRemoveRoutingRulepublic static final DistributedClusterStateUpdater.MutatingCommand SliceRemoveRoutingRule 
 - 
SliceSetShardLeaderpublic static final DistributedClusterStateUpdater.MutatingCommand SliceSetShardLeader 
 - 
SliceUpdateShardStatepublic static final DistributedClusterStateUpdater.MutatingCommand SliceUpdateShardState 
 
- 
 - 
Method Detail- 
valuespublic static DistributedClusterStateUpdater.MutatingCommand[] 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 (DistributedClusterStateUpdater.MutatingCommand c : DistributedClusterStateUpdater.MutatingCommand.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static DistributedClusterStateUpdater.MutatingCommand 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 name
- NullPointerException- if the argument is null
 
 - 
buildWriteCommandpublic 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
 - 
getCollectionNamepublic String getCollectionName(org.apache.solr.common.cloud.ZkNodeProps message) 
 - 
getCommandForpublic static DistributedClusterStateUpdater.MutatingCommand getCommandFor(org.apache.solr.common.params.CollectionParams.CollectionAction collectionAction) - Returns:
- the DistributedClusterStateUpdater.MutatingCommandcorresponding to the passedCollectionParams.CollectionActionornullif no cluster state update command is defined for that action (given thatCollectionParams.CollectionActionare used for the Collection API and only some are used for the cluster state updates, this is expected).
 
 - 
isCollectionCreationpublic boolean isCollectionCreation() Given only one command creates a collectionClusterCreateCollection, the default implementation is provided here.
 
- 
 
-