Module org.elasticsearch.server
Class ShutdownPersistentTasksStatus
java.lang.Object
org.elasticsearch.cluster.metadata.ShutdownPersistentTasksStatus
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
Tracks the status of persistent tasks on a node that is shutting down.
Reports the total number of persistent tasks still assigned to the shutdown node (persistentTasksRemaining),
the subset of those that will be proactively reassigned by the persistent task framework
(autoReassignableTasksRemaining), and an overall status that is COMPLETE when no auto
reassigned tasks remain or IN_PROGRESS otherwise.
If the node is not present and has not been seen in the cluster, the status will be NOT_STARTED.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfromRemainingTasks(int persistentTasksRemaining, int autoReassignableTasksRemaining) intintinthashCode()toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
SHUTDOWN_PERSISTENT_TASKS_STATUS
-
-
Constructor Details
-
ShutdownPersistentTasksStatus
- Throws:
IOException
-
-
Method Details
-
notStarted
-
fromRemainingTasks
public static ShutdownPersistentTasksStatus fromRemainingTasks(int persistentTasksRemaining, int autoReassignableTasksRemaining) -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
getStatus
-
getPersistentTasksRemaining
public int getPersistentTasksRemaining() -
getAutoReassignableTasksRemaining
public int getAutoReassignableTasksRemaining() -
hashCode
public int hashCode() -
equals
-
toString
-