Class PrioritizedFilterStatistics
java.lang.Object
org.apache.camel.component.dynamicrouter.filter.PrioritizedFilterStatistics
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 Summary
ConstructorsConstructorDescriptionPrioritizedFilterStatistics(String filterId) Creates a newPrioritizedFilterStatisticsinstance with the given filter id. -
Method Summary
Modifier and TypeMethodDescriptionlonggetCount()Returns the number of times the filter was invoked.Returns the id of the filter that these statistics represent.longgetFirst()Returns the first time the filter was invoked (as epoch milliseconds).longgetLast()Returns the last time the filter was invoked (as epoch milliseconds).voidIncrements the number of times the filter was invoked, and updates the first and last times the filter was invoked.toString()Returns a string representation of this statistics object.
-
Constructor Details
-
PrioritizedFilterStatistics
Creates a newPrioritizedFilterStatisticsinstance with the given filter id.- Parameters:
filterId- the id of the filter that these statistics represent
-
-
Method Details
-
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
Returns a string representation of this statistics object.
-