From fab0dc449a2f57778a92bb6c847925a2d9b60efa Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 4 Apr 2017 21:31:17 +0200 Subject: [PATCH] Remove PersistentTask#isCurrentStatus() usages --- .../elasticsearch/persistent/AllocatedPersistentTask.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java b/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java index b2115e5dd95..933586956d1 100644 --- a/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java +++ b/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java @@ -19,7 +19,6 @@ package org.elasticsearch.persistent; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.client.Client; import org.elasticsearch.common.Nullable; import org.elasticsearch.tasks.CancellableTask; import org.elasticsearch.tasks.Task; @@ -116,6 +115,10 @@ public class AllocatedPersistentTask extends CancellableTask { return state.get(); } + public long getAllocationId() { + return allocationId; + } + public enum State { STARTED, // the task is currently running CANCELLED, // the task is cancelled