Interface DurationAwareEvent

All Superinterfaces:
Event

public interface DurationAwareEvent extends Event
The DurationAwareEvent is an optional interface that can be implemented by Event types that carry a duration (e.g. a slow-running query or a long-running Session or transaction).

When the event persistence feature is enabled, the reported duration is accumulated into the total_duration_ms column of the runtime rollup, so that a slow operation triggered many times can be summarized rather than stored one row per occurrence.

Since:
2.14.0
Author:
Vlad Mihalcea
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.hypersistence.optimizer.core.event.Event

    Event.Priority
  • Field Summary

    Fields inherited from interface io.hypersistence.optimizer.core.event.Event

    HIDDEN_DESCRIPTION
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the duration, in milliseconds, associated with this Event.

    Methods inherited from interface io.hypersistence.optimizer.core.event.Event

    getPriority
  • Method Details

    • getDurationMillis

      long getDurationMillis()
      Get the duration, in milliseconds, associated with this Event.
      Returns:
      the duration, in milliseconds, associated with this Event