Class SessionFlushTimeoutEvent

All Implemented Interfaces:
DurationAwareEvent, Event, Serializable

public class SessionFlushTimeoutEvent extends SessionEvent implements DurationAwareEvent
The SessionFlushTimeoutEvent indicates that the current Persistence Context (EntityManager or Session) has been flushed for more than the maximum allowed time threshold, which is given by the Config.Property.Session.FLUSH_TIMEOUT_MILLIS property value.

The more entities the current Persistence Context is managing, the longer it takes to process the dirty checking mechanism and synchronize the entity state changes with the database.

The flush execution time impacts the overall transaction response time, so you need to make sure that the current JPA EntityManager or Hibernate Session doesn't contain a very large number of entities.

Since:
2.2.0
Author:
Vlad Mihalcea
See Also:
  • Constructor Details

    • SessionFlushTimeoutEvent

      public SessionFlushTimeoutEvent(long flushTimeNanos)
      Instantiate the event using the provided parameters.
      Parameters:
      flushTimeNanos - session flush execution time
  • Method Details

    • getFlushTimeNanos

      public long getFlushTimeNanos()
      Get the Hibernate Session flush execution time in nanoseconds.
      Returns:
      Hibernate Session flush execution time in nanoseconds
    • getFlushTimeMillis

      public long getFlushTimeMillis()
      Get the Hibernate Session flush execution time in milliseconds.
      Returns:
      Hibernate Session flush execution time in milliseconds
    • getDurationMillis

      public long getDurationMillis()
      Get the duration, in milliseconds, associated with this Event.
      Specified by:
      getDurationMillis in interface DurationAwareEvent
      Returns:
      the duration, in milliseconds, associated with this Event
    • getPriority

      public Event.Priority getPriority()
      Get the Event.Priority of this Event
      Specified by:
      getPriority in interface Event
      Returns:
      the Event.Priority of this Event
    • getDescription

      public String getDescription()
      Get the String description of this Event
      Specified by:
      getDescription in interface Event
      Returns:
      the String description of this Event