@PublicApi
public interface ReindexRequestManager
Modifier and Type | Method and Description |
---|---|
void |
clearAll()
Clear any pending requests.
|
List<ReindexRequest> |
failRunningRequestsFromDeadNodes()
Finds any active or running requests from inactive nodes in the cluster and transitions them
to failed.
|
List<ReindexRequest> |
failRunningRequestsFromNode(String nodeId)
Finds any active or running requests from the specified node in the cluster and transitions them to failed.
|
Iterable<ReindexRequest> |
getPendingReindexRequests(Set<ReindexRequestType> reindexRequestTypes)
Retrieves all pending reindex requests, in order
from oldest to newest.
|
Set<ReindexRequest> |
getReindexProgress(Set<Long> requestIds)
Retrieves the progress of some requests.
|
boolean |
isReindexInProgress() |
boolean |
isReindexRequested()
Checks if any ReindexRequests of any type are waiting to be processed.
|
boolean |
isReindexRequested(Set<ReindexRequestType> reindexRequestTypes)
Checks if any ReindexRequests are waiting to be processed.
|
Set<ReindexRequest> |
processPendingRequests(boolean waitForCompletion,
Set<ReindexRequestType> reindexRequestTypes,
boolean runInBackground)
Process any outstanding reindex requests.
|
ReindexRequest |
requestReindex(ReindexRequestType type,
Set<AffectedIndex> affectedIndexes,
Set<SharedEntityType> entityTypes)
Requests a reindex.
|
List<ReindexRequest> |
transitionStatus(Iterable<ReindexRequest> requests,
ReindexStatus newStatus)
Transitions the status of reindex requests.
|
ReindexRequest |
transitionStatus(ReindexRequest request,
ReindexStatus newStatus)
Transitions the status of a reindex request.
|
boolean isReindexRequested()
boolean isReindexRequested(Set<ReindexRequestType> reindexRequestTypes)
reindexRequestTypes
- Types of requests to check for.@Nonnull Iterable<ReindexRequest> getPendingReindexRequests(Set<ReindexRequestType> reindexRequestTypes)
reindexRequestTypes
- Types of requests to check for.boolean isReindexInProgress()
@Nonnull ReindexRequest requestReindex(@Nonnull ReindexRequestType type, @Nonnull Set<AffectedIndex> affectedIndexes, @Nonnull Set<SharedEntityType> entityTypes)
type
- whether reindex is immediate or delayed.affectedIndexes
- the indexes to regenerate.entityTypes
- the entity types whose indexes are to be regenerated.@Nonnull List<ReindexRequest> transitionStatus(@Nonnull Iterable<ReindexRequest> requests, @Nonnull ReindexStatus newStatus)
requests
- the requests.newStatus
- the new status to transition to.@Nonnull ReindexRequest transitionStatus(@Nonnull ReindexRequest request, @Nonnull ReindexStatus newStatus)
request
- the request.newStatus
- the new status to transition to.@Nonnull Set<ReindexRequest> getReindexProgress(@Nonnull Set<Long> requestIds)
requestIds
- the set of reindex request IDs to look up.Set<ReindexRequest> processPendingRequests(boolean waitForCompletion, Set<ReindexRequestType> reindexRequestTypes, boolean runInBackground)
waitForCompletion
- If true this method will not return until the reindexing is complete, otherwise it will return
when the reindex task is submitted,reindexRequestTypes
- Types of requests to process either ReindexRequestType
runInBackground
- If true the reindex should be a background reindex otherwise a foreground stop the world reindex@Nonnull List<ReindexRequest> failRunningRequestsFromDeadNodes()
@Nonnull List<ReindexRequest> failRunningRequestsFromNode(@Nullable String nodeId)
nodeId
- the ID of the cluster node, or null if not clustered.void clearAll()
Copyright © 2002-2021 Atlassian. All Rights Reserved.