Class ReindexMetrics
- 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 theHibernateSqlCollector
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 pairedReindexStartedEvent
s andReindexFinishedEvent
s are generated on the same thread, (b) that pairedReindexBatchStartedEvent
s andReindexBatchFinishedEvent
s 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 Summary
Constructors Constructor Description ReindexMetrics(com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar, HibernateSqlCollector sqlCollector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onReindexingBatchFinish(ReindexBatchFinishedEvent event)
void
onReindexingBatchStart(ReindexBatchStartedEvent event)
void
onReindexingFinish(ReindexFinishedEvent event)
void
onReindexingStart(ReindexStartedEvent event)
void
registerEventListener()
void
unregisterEventListener()
-
-
-
Constructor Detail
-
ReindexMetrics
public ReindexMetrics(com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar, HibernateSqlCollector sqlCollector)
-
-
Method Detail
-
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()
-
-