@PublicApi public interface

ReindexRequestService

com.atlassian.jira.index.request.ReindexRequestService
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Summary

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.

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.