Package org.elasticsearch.persistent
Class PersistentTasksCustomMetadata.PersistentTask<P extends PersistentTaskParams>
java.lang.Object
org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask<P>
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
- Enclosing class:
- PersistentTasksCustomMetadata
public static class PersistentTasksCustomMetadata.PersistentTask<P extends PersistentTaskParams>
extends Object
implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
A record that represents a single running persistent task
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionPersistentTask(String id, String name, P params, long allocationId, PersistentTasksCustomMetadata.Assignment assignment)
PersistentTask(PersistentTasksCustomMetadata.PersistentTask<P> task, long allocationId, PersistentTasksCustomMetadata.Assignment assignment)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
long
getId()
getState()
int
hashCode()
boolean
boolean
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params xParams)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Constructor Details
-
PersistentTask
public PersistentTask(String id, String name, P params, long allocationId, PersistentTasksCustomMetadata.Assignment assignment) -
PersistentTask
public PersistentTask(PersistentTasksCustomMetadata.PersistentTask<P> task, long allocationId, PersistentTasksCustomMetadata.Assignment assignment) -
PersistentTask
public PersistentTask(PersistentTasksCustomMetadata.PersistentTask<P> task, PersistentTaskState state) -
PersistentTask
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
getId
-
getAllocationId
public long getAllocationId() -
getTaskName
-
getParams
-
getExecutorNode
-
getAssignment
-
isAssigned
public boolean isAssigned() -
getState
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params xParams) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
isFragment
public boolean isFragment()- Specified by:
isFragment
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Specified by:
isFragment
in interfaceorg.elasticsearch.common.xcontent.ToXContentObject
-