Class Value.Parameters

java.lang.Object
com.yahoo.statistics.Value.Parameters
Enclosing class:
Value

public static class Value.Parameters extends Object
Parameters for building Value instances. All settings are classes instead of primitive types to allow tri-state logic (true, false, unset).
  • Constructor Details

    • Parameters

      public Parameters()
      Get a fresh Parameters instance with all features turned/unset. Parameters instances may be recycled for construction multiple Value instances, but do note any Limits instance added must be frozen.
  • Method Details

    • setLogRaw

      public Value.Parameters setLogRaw(Boolean logRaw)
      (De-)Activate logging of raw values. Raw values are basically the last value logged.
      Returns:
      "this" for call chaining
    • setLogSum

      public Value.Parameters setLogSum(Boolean logSum)
      (De-)Activate logging the sum of all data points for each interval.
      Returns:
      "this" for call chaining
    • setLogMean

      public Value.Parameters setLogMean(Boolean logMean)
      (De)-activate loging the mean value for each interval.
      Returns:
      "this" for call chaining
    • setLogMax

      public Value.Parameters setLogMax(Boolean logMax)
      (De-)Activate logging the maximal value observed for each interval.
      Returns:
      "this" for call chaining
    • setLogMin

      public Value.Parameters setLogMin(Boolean logMin)
      (De-)Activate logging the minimal value observed for each interval.
      Returns:
      "this" for call chaining
    • setLogInsertions

      public Value.Parameters setLogInsertions(Boolean logInsertions)
      (De-)Activate loging the number of observations for each interval.
      Returns:
      "this" for call chaining
    • setNameExtension

      public Value.Parameters setNameExtension(Boolean nameExtension)
      Whether or not to add an identifying extension (like mean) to event names when logging derived values. It is useful to disable extensions if a only a single dervied value, e.g. the mean, is the only thing to be logged. The default is to use extensions. If extensions are disabled, the ability to log more than one of raw value, min, max, mean (i.e. the raw value and derived values of the same type) is disabled to avoid confusion. Since histograms are not Value events, these never have a name extension and are always available.
      Returns:
      "this" for call chaining
    • setLogHistogram

      public Value.Parameters setLogHistogram(Boolean logHistogram)
      (De-)Activate logging a data histogram.
      Returns:
      "this" for call chaining
    • setHistogramId

      public Value.Parameters setHistogramId(HistogramType histogramId)
      What kind of histogram to log.
      Returns:
      "this" for call chaining
      See Also:
    • setLimits

      public Value.Parameters setLimits(Limits limits)
      The limits to use if logging as a histogram. The Limits instance must be frozen before using the Parameters instance in a Value constructor call.
      Returns:
      "this" for call chaining*
      See Also:
    • setAppendChar

      public Value.Parameters setAppendChar(Character appendChar)
      Separator character to use between event name and type of nameExtension is set to true. The default is '.'.
      Returns:
      "this" for call chaining
    • setCallback

      public Value.Parameters setCallback(Callback callback)
      Set a callback to be invoked each time this Value is written to the log.
      Parameters:
      callback - to be invoked each time the Value is written to the log
      Returns:
      "this" for call chaining