Package com.atlassian.jira.dev.rest
Class DelayedReindexResource
java.lang.Object
com.atlassian.jira.dev.rest.DelayedReindexResource
@Path("delayedReindex")
@Produces("application/json")
@Consumes("application/json")
public class DelayedReindexResource
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
static class
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDelayedReindexResource
(IssueManager issueManager, CustomFieldManager customFieldManager, IssueIndexingService issueIndexingService, BarrierFactory barrierFactory) protected
DelayedReindexResource
(IssueManager issueManager, CustomFieldManager customFieldManager, IssueIndexingService issueIndexingService, BarrierFactory barrierFactory, DelayedReindexResource.DelayedReindexResourceConfig config) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
Cleans up the history of the tasks submitted byloadAndReindex(java.lang.String, java.lang.String)
.javax.ws.rs.core.Response
getTask
(int taskId) Return the short state representation of the task submitted byloadAndReindex(java.lang.String, java.lang.String)
.javax.ws.rs.core.Response
loadAndReindex
(String issueKey, String reindexBarrier) Submits issue to the load and reindex.
-
Constructor Details
-
DelayedReindexResource
@Inject public DelayedReindexResource(IssueManager issueManager, CustomFieldManager customFieldManager, IssueIndexingService issueIndexingService, BarrierFactory barrierFactory) -
DelayedReindexResource
protected DelayedReindexResource(IssueManager issueManager, CustomFieldManager customFieldManager, IssueIndexingService issueIndexingService, BarrierFactory barrierFactory, DelayedReindexResource.DelayedReindexResourceConfig config)
-
-
Method Details
-
loadAndReindex
@POST @Path("/reindexIssue") public javax.ws.rs.core.Response loadAndReindex(@QueryParam("issueKey") String issueKey, @QueryParam("reindexBarrierName") String reindexBarrier) Submits issue to the load and reindex. The reindex is performed after the barrier specified by is lowered. The load of issue includes loading all direct and in-direct issue fields values, including custom fields. Both load and reindex are performed in the same thread.- Parameters:
issueKey
- the key of the issue to load and then reindex.reindexBarrier
- the name of the barrier on which we should wait before reindex.- Returns:
- the
Integer
representing the task ID. The task is already started and should be waiting on the reindex barrier, unless issue load failed.
-
getTask
@GET @Path("{taskId}") public javax.ws.rs.core.Response getTask(@PathParam("taskId") int taskId) Return the short state representation of the task submitted byloadAndReindex(java.lang.String, java.lang.String)
.- Parameters:
taskId
- the id of the task to check the state for. This is the value returned by callingloadAndReindex(java.lang.String, java.lang.String)
- Returns:
- the
DelayedReindexResource.LoadAndReindexTaskResponse
representing task state
-
cleanHistory
@DELETE public javax.ws.rs.core.Response cleanHistory()Cleans up the history of the tasks submitted byloadAndReindex(java.lang.String, java.lang.String)
. Please note that the pending tasks will be removed as well.
-