Class PrioritizedFilterStatistics

java.lang.Object
org.apache.camel.component.dynamicrouter.filter.PrioritizedFilterStatistics

public class PrioritizedFilterStatistics extends Object
Statistics for a PrioritizedFilter that tracks details that include:
  • the id of the filter
  • the number of times the filter was invoked
  • the first time the filter was invoked (as epoch milliseconds)
  • the last time the filter was invoked (as epoch milliseconds)
  • Constructor Details

    • PrioritizedFilterStatistics

      public PrioritizedFilterStatistics(String filterId)
      Creates a new PrioritizedFilterStatistics instance with the given filter id.
      Parameters:
      filterId - the id of the filter that these statistics represent
  • Method Details

    • getFilterId

      public String getFilterId()
      Returns the id of the filter that these statistics represent.
      Returns:
      the id of the filter that these statistics represent
    • incrementCount

      public void incrementCount()
      Increments the number of times the filter was invoked, and updates the first and last times the filter was invoked.
    • getCount

      public long getCount()
      Returns the number of times the filter was invoked.
      Returns:
      the number of times the filter was invoked
    • getFirst

      public long getFirst()
      Returns the first time the filter was invoked (as epoch milliseconds).
      Returns:
      the first time the filter was invoked (as epoch milliseconds)
    • getLast

      public long getLast()
      Returns the last time the filter was invoked (as epoch milliseconds).
      Returns:
      the last time the filter was invoked (as epoch milliseconds)
    • toString

      public String toString()
      Returns a string representation of this statistics object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this statistics object