java.lang.Object
com.atlassian.confluence.functest.rest.admin.sqlcapture.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 Details

    • ReindexMetrics

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

    • onReindexingStart

      @EventListener public void onReindexingStart(ReindexStartedEvent event)
    • onReindexingBatchStart

      @EventListener public void onReindexingBatchStart(ReindexBatchStartedEvent event)
    • onReindexingBatchFinish

      @EventListener public void onReindexingBatchFinish(ReindexBatchFinishedEvent event)
    • onReindexingFinish

      @EventListener public void onReindexingFinish(ReindexFinishedEvent event)
    • registerEventListener

      @PostConstruct public void registerEventListener()
    • unregisterEventListener

      @PreDestroy public void unregisterEventListener()