public class

DefaultReindexRequestService

extends Object
implements ReindexRequestService
java.lang.Object
   ↳ com.atlassian.jira.index.request.DefaultReindexRequestService

Summary

Public Constructors
DefaultReindexRequestService(ReindexRequestManager reindexRequestManager, PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext)
Public Methods
@Nonnull Set<ReindexRequest> getReindexProgress(Set<Long> requestIds)
Reads progress of multiple reindex requests.
@Nullable ReindexRequest getReindexProgress(long requestId)
Reads progress of a reindex request.
boolean isReindexRequested()
@Nonnull Set<ReindexRequest> processRequests(Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground)
Processes any outstanding reindex requests asynchronously.
@Nonnull Set<ReindexRequest> processRequestsAndWait(Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground)
Processes any outstanding reindex requests and waits for them to finish.
@Nonnull ReindexRequest requestReindex(ReindexRequestType type, Set<AffectedIndex> affectedIndexes, Set<SharedEntityType> entityTypes)
Requests a reindex, adding a reindex request to the queue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.index.request.ReindexRequestService

Public Constructors

public DefaultReindexRequestService (ReindexRequestManager reindexRequestManager, PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext)

Public Methods

@Nonnull public Set<ReindexRequest> getReindexProgress (Set<Long> requestIds)

Reads progress of multiple reindex requests.

Parameters
requestIds a set of reindex request IDs.
Returns
  • the reindex request progress. Any reindex request specified in requestIds that was not found will not have a corresponding element in the return set.

@Nullable public ReindexRequest getReindexProgress (long requestId)

Reads progress of a reindex request.

Parameters
requestId the ID of the reindex request.
Returns
  • reindex progress, or null if no request with the specified ID exists.

public boolean isReindexRequested ()

@Nonnull public Set<ReindexRequest> processRequests (Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground)

Processes any outstanding reindex requests asynchronously.

Parameters
reindexRequestTypes The request types to process.
Returns
  • the reindex requests that are being processed.

@Nonnull public Set<ReindexRequest> processRequestsAndWait (Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground)

Processes any outstanding reindex requests and waits for them to finish.

Parameters
reindexRequestTypes The request types to process.
Returns
  • the reindex requests that were processed.

@Nonnull public ReindexRequest requestReindex (ReindexRequestType type, Set<AffectedIndex> affectedIndexes, Set<SharedEntityType> entityTypes)

Requests a reindex, adding a reindex request to the queue. There is no guarantee that this request will be performed immediately.

Parameters
type whether reindex is immediate or delayed.
affectedIndexes the indexes to regenerate.
entityTypes the entity types whose indexes are to be regenerated.
Returns
  • the request that was created.