Class ContentTreePermissionReindexEventBackgroundSender

  • All Implemented Interfaces:
    BackgroundJobProcessor

    public class ContentTreePermissionReindexEventBackgroundSender
    extends Object
    implements BackgroundJobProcessor
    Iterates over all descendants (including pages, comments, attachments, drafts etc) and sends ContentTreePermissionReindexEvent for each item.
    Since:
    8.1.0
    • Field Detail

      • PAGE_BATCH_SIZE

        public static final int PAGE_BATCH_SIZE
    • Constructor Detail

      • ContentTreePermissionReindexEventBackgroundSender

        public ContentTreePermissionReindexEventBackgroundSender​(PageDao pageDao,
                                                                 AttachmentManager attachmentManager,
                                                                 com.atlassian.event.api.EventPublisher eventPublisher)
    • Method Detail

      • process

        public BackgroundJobResponse process​(Long jobId,
                                             Map<String,​Object> parameters,
                                             long recommendedTimeout)
        Description copied from interface: BackgroundJobProcessor
        This method does the actual background operations. Need to stop its execution after recommendedTimeout timeout. This method is run inside a RW transaction. If something goes wrong, the method has to simply throw a runtime exception, it will be properly handled by the scheduler (logged, re-scheduled next run etc).
        Specified by:
        process in interface BackgroundJobProcessor
        Parameters:
        jobId - background job id
        parameters - background job parameters
        recommendedTimeout - timeout in milliseconds
        Returns:
        response