Class DataCountEndedEvent

All Implemented Interfaces:
Serializable

public class DataCountEndedEvent extends AbstractDataCountEvent
Event fired through the service event bus once a count query has returned or thrown, on the thread that issued it.

Fired in reverse listener registration order, so that listeners nest around the matching DataCountStartedEvent. It is fired whether the query returned normally or threw, so a listener can clean up its timing state in one place.

Since:
25.3
See Also:
  • Constructor Details

    • DataCountEndedEvent

      public DataCountEndedEvent(UI ui, Component component, boolean filtered, int count)
      Creates a new event.
      Parameters:
      ui - the UI the counting component belongs to, not null
      component - the component whose data is being counted, or null if it could not be resolved
      filtered - whether a filter was set on the query
      count - the number of items the data provider reported, or -1 if the query threw, in which case a DataCountFailedEvent carrying the throwable was fired first
  • Method Details

    • getCount

      public int getCount()
      Gets the number of items the data provider reported.
      Returns:
      the count, or -1 if the query threw