Interface ReIndexJobManagerInternal
-
- All Superinterfaces:
ReIndexJobManager
- All Known Implementing Classes:
DefaultReIndexJobManager
public interface ReIndexJobManagerInternal extends ReIndexJobManager
To be used within Confluence''s core to manage re-index job statuses.- Since:
- 7.6.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
JOB_PERSISTER_LOCK_NAME
static String
REINDEX_IMPROVEMENT_DARKFEATURE_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
updateReIndexJob(ReIndexJob reIndexJob)
Update the reindexJob in an atomic operation (i.e.void
updateReIndexJobIfPresent(Consumer<ReIndexJob> updater)
Try to update current re-index job in an atomic operation.-
Methods inherited from interface com.atlassian.confluence.index.status.ReIndexJobManager
acknowledgeRunningJob, clear, createNewJob, getRunningOrMostRecentReIndex, isReIndexing
-
-
-
-
Field Detail
-
REINDEX_IMPROVEMENT_DARKFEATURE_KEY
static final String REINDEX_IMPROVEMENT_DARKFEATURE_KEY
- See Also:
- Constant Field Values
-
JOB_PERSISTER_LOCK_NAME
static final String JOB_PERSISTER_LOCK_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateReIndexJobIfPresent
void updateReIndexJobIfPresent(Consumer<ReIndexJob> updater) throws InterruptedException, TimeoutException
Try to update current re-index job in an atomic operation. 3 steps: 1. Fetch currentReIndexJob
, if not found then skip 2 and 3. 2. Mutate the running reIndexJob using the providedupdater
. 3. Persist the updated reIndexJob.- Parameters:
updater
- a callback to mutate runningReIndexJob
- Throws:
InterruptedException
- if interrupted while waiting to update the jobTimeoutException
- if cannot obtain exclusive access in order to update the job within reasonable time
-
updateReIndexJob
void updateReIndexJob(ReIndexJob reIndexJob) throws InterruptedException, TimeoutException
Update the reindexJob in an atomic operation (i.e. with a cluster lock)- Throws:
InterruptedException
TimeoutException
-
-