Class ReindexMetrics


  • public final class ReindexMetrics
    extends Object
    This class listens to reindex events generated by confluence core, and uses the HibernateSqlCollector to capture and analyze SQL queries issued by the various threads that particiate in the reindexing process. The logic maks a few assumptions about how the reindexing proces works; (a) that paired ReindexStartedEvents and ReindexFinishedEvents are generated on the same thread, (b) that paired ReindexBatchStartedEvents and ReindexBatchFinishedEvents are on the same thread, and (c) that the events are synchronous, and are received by this class on the same thread that published them.
    • Constructor Detail

      • ReindexMetrics

        public ReindexMetrics​(com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar,
                              HibernateSqlCollector sqlCollector)
    • Method Detail

      • onReindexingStart

        @EventListener
        public void onReindexingStart​(ReindexStartedEvent event)
      • onReindexingFinish

        @EventListener
        public void onReindexingFinish​(ReindexFinishedEvent event)
      • registerEventListener

        @PostConstruct
        public void registerEventListener()
      • unregisterEventListener

        @PreDestroy
        public void unregisterEventListener()