Interface AllocationCommand
- All Superinterfaces:
NamedWriteable
,ToXContent
,ToXContentObject
,Writeable
- All Known Implementing Classes:
AbstractAllocateAllocationCommand
,AllocateEmptyPrimaryAllocationCommand
,AllocateReplicaAllocationCommand
,AllocateStalePrimaryAllocationCommand
,BasePrimaryAllocationCommand
,CancelAllocationCommand
,MoveAllocationCommand
public interface AllocationCommand extends NamedWriteable, ToXContentObject
A command to move shards in some way.
Commands are registered in
NetworkModule
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
-
Method Summary
Modifier and Type Method Description RerouteExplanation
execute(RoutingAllocation allocation, boolean explain)
Executes the command on aRoutingAllocation
setupdefault java.util.Optional<java.lang.String>
getMessage()
Returns any feedback the command wants to provide for logging.default java.lang.String
getWriteableName()
Returns the name of the writeable objectjava.lang.String
name()
Get the name of the command
-
Method Details
-
name
java.lang.String name()Get the name of the command- Returns:
- name of the command
-
execute
Executes the command on aRoutingAllocation
setup- Parameters:
allocation
-RoutingAllocation
to modify- Throws:
ElasticsearchException
- if something happens during reconfiguration
-
getWriteableName
default java.lang.String getWriteableName()Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
-
getMessage
default java.util.Optional<java.lang.String> getMessage()Returns any feedback the command wants to provide for logging. This message should be appropriate to expose to the user after the command has been applied
-