public class DefaultReindexRequestService extends Object implements ReindexRequestService
Constructor and Description |
---|
DefaultReindexRequestService(ReindexRequestManager reindexRequestManager,
PermissionManager permissionManager,
JiraAuthenticationContext jiraAuthenticationContext) |
Modifier and Type | Method and Description |
---|---|
ReindexRequest |
getReindexProgress(long requestId)
Reads progress of a reindex request.
|
Set<ReindexRequest> |
getReindexProgress(Set<Long> requestIds)
Reads progress of multiple reindex requests.
|
boolean |
isReindexRequested() |
Set<ReindexRequest> |
processRequests(Set<ReindexRequestType> reindexRequestTypes,
boolean runInBackground)
Processes any outstanding reindex requests asynchronously.
|
Set<ReindexRequest> |
processRequestsAndWait(Set<ReindexRequestType> reindexRequestTypes,
boolean runInBackground)
Processes any outstanding reindex requests and waits for them to finish.
|
ReindexRequest |
requestReindex(ReindexRequestType type,
Set<AffectedIndex> affectedIndexes,
Set<SharedEntityType> entityTypes)
Requests a reindex, adding a reindex request to the queue.
|
public DefaultReindexRequestService(ReindexRequestManager reindexRequestManager, PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext)
@Nonnull public Set<ReindexRequest> processRequests(Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground) throws PermissionException
ReindexRequestService
processRequests
in interface ReindexRequestService
reindexRequestTypes
- The request types to process.PermissionException
@Nonnull public Set<ReindexRequest> processRequestsAndWait(Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground) throws PermissionException
ReindexRequestService
processRequestsAndWait
in interface ReindexRequestService
reindexRequestTypes
- The request types to process.PermissionException
@Nonnull public ReindexRequest requestReindex(@Nonnull ReindexRequestType type, @Nonnull Set<AffectedIndex> affectedIndexes, @Nonnull Set<SharedEntityType> entityTypes)
ReindexRequestService
requestReindex
in interface ReindexRequestService
type
- whether reindex is immediate or delayed.affectedIndexes
- the indexes to regenerate.entityTypes
- the entity types whose indexes are to be regenerated.@Nullable public ReindexRequest getReindexProgress(long requestId)
ReindexRequestService
getReindexProgress
in interface ReindexRequestService
requestId
- the ID of the reindex request.null
if no request with the specified ID exists.@Nonnull public Set<ReindexRequest> getReindexProgress(@Nonnull Set<Long> requestIds)
ReindexRequestService
getReindexProgress
in interface ReindexRequestService
requestIds
- a set of reindex request IDs.requestIds
that was not
found will not have a corresponding element in the return set.public boolean isReindexRequested()
isReindexRequested
in interface ReindexRequestService
Copyright © 2002-2019 Atlassian. All Rights Reserved.