Class ReIndexJobHelper


  • public class ReIndexJobHelper
    extends Object
    Since:
    7.11
    • Constructor Detail

      • ReIndexJobHelper

        public ReIndexJobHelper​(@NonNull com.atlassian.confluence.test.rest.api.ConfluenceRestClient restClient)
    • Method Detail

      • isReindexImprovementsEnabled

        public boolean isReindexImprovementsEnabled()
        Will tell you if the reindex improvements are enabled and thus if the bandana store for the ReIndexJobJson is available to query for the status.
        Returns:
        boolean true if the improvements are available.
      • waitForPossibleReindex

        public void waitForPossibleReindex​(@NonNull ConfluenceRpc rpc,
                                           @NonNull TimePeriod timeout,
                                           @Nullable Runnable runnable)
        Waits for a possible rebuild of the index. Triggers are for instance a global import or explicit calls to rebuild. If the reindex improvements are enabled, this will wait for propagation across a cluster. If not, it will wait using a latch on the ReindexFinishedEvent happening.
        Parameters:
        rpc - ConfluenceRpc needed for the EventWaitingLatch
        period - TimePeriod before this method throws an exception
        runnable - Runnable optional task to perform that may cause reindexing