Interface LogThrottlingHelper.LogAction

Enclosing class:
LogThrottlingHelper

public static interface LogThrottlingHelper.LogAction
An indication of what action the caller should take. If shouldLog() is false, no other action should be taken, and it is an error to try to access any of the summary information. If shouldLog() is true, then the caller should write to its log, and can use the getCount() and getStats(int) methods to determine summary information about what has been recorded into this helper. All summary information in this action only represents LogThrottlingHelper.record(double...) statements which were called after the last time the caller logged something; that is, since the last time a log action was returned with a true value for shouldLog(). Information about the LogThrottlingHelper.record(double...) statement which created this log action is included.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    org.apache.commons.math3.stat.descriptive.SummaryStatistics
    getStats(int idx)
     
    boolean
     
  • Method Details

    • getCount

      int getCount()
      Returns:
      Return the number of records encapsulated in this action; that is, the number of times record was called to produce this action, including the current one.
    • getStats

      org.apache.commons.math3.stat.descriptive.SummaryStatistics getStats(int idx)
      Parameters:
      idx - input idx.
      Returns:
      Return summary information for the value that was recorded at index idx. Corresponds to the ordering of values passed to LogThrottlingHelper.record(double...).
    • shouldLog

      boolean shouldLog()
      Returns:
      If this is true, the caller should write to its log. Otherwise, the caller should take no action, and it is an error to call other methods on this object.